loleaflet/src/layer/tile/TileLayer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit b7b9f76007178e47b92211221ca6e487acd216f1 Author: László Németh <laszlo.nem...@collabora.com> Date: Tue Oct 27 22:10:44 2015 +0100 tdf#94245 fix refused resizing of pictures anchored as characters diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 97b8714..34ef53e 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -62,6 +62,8 @@ L.TileLayer = L.GridLayer.extend({ this._isCursorOverlayVisible = false; // Cursor is visible or hidden (e.g. for graphic selection). this._isCursorVisible = true; + // Original rectangle graphic selection in twips + this._graphicSelectionTwips = new L.bounds(new L.point(0, 0), new L.point(0, 0)); // Rectangle graphic selection this._graphicSelection = new L.LatLngBounds(new L.LatLng(0, 0), new L.LatLng(0, 0)); // Position and size of the selection start (as if there would be a cursor caret there). @@ -313,6 +315,7 @@ L.TileLayer = L.GridLayer.extend({ _onGraphicSelectionMsg: function (textMsg) { if (textMsg.match('EMPTY')) { + this._graphicSelectionTwips = new L.bounds(new L.point(0, 0), new L.point(0, 0)); this._graphicSelection = new L.LatLngBounds(new L.LatLng(0, 0), new L.LatLng(0, 0)); } else { @@ -320,6 +323,7 @@ L.TileLayer = L.GridLayer.extend({ var topLeftTwips = new L.Point(parseInt(strTwips[0]), parseInt(strTwips[1])); var offset = new L.Point(parseInt(strTwips[2]), parseInt(strTwips[3])); var bottomRightTwips = topLeftTwips.add(offset); + this._graphicSelectionTwips = new L.bounds(topLeftTwips, bottomRightTwips); this._graphicSelection = new L.LatLngBounds( this._twipsToLatLng(topLeftTwips, this._map.getZoom()), this._twipsToLatLng(bottomRightTwips, this._map.getZoom())); @@ -628,7 +632,9 @@ L.TileLayer = L.GridLayer.extend({ var aPos = this._latLngToTwips(e.handle.getLatLng()); if (e.type === 'editstart') { this._graphicMarker.isDragged = true; - this._postSelectGraphicEvent('start', aPos.x, aPos.y); + this._postSelectGraphicEvent('start', + Math.min(aPos.x, this._graphicSelectionTwips.max.x - 1), + Math.min(aPos.y, this._graphicSelectionTwips.max.y - 1)); } else if (e.type === 'editend') { this._postSelectGraphicEvent('end', aPos.x, aPos.y);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits