[Libreoffice-commits] online.git: 2 commits - loleaflet/src
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 26 23:10:07 UTC 2019
loleaflet/src/layer/tile/TileLayer.TableOverlay.js | 9 ++++--
loleaflet/src/layer/tile/TileLayer.js | 28 +++++++++++----------
2 files changed, 21 insertions(+), 16 deletions(-)
New commits:
commit ed8707bcfdaeb9baae057c319f7b3382abcdcd32
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Aug 26 20:28:53 2019 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Aug 27 01:09:21 2019 +0200
loleaflet: enable cell selection resize markers for impress table
Change-Id: I77346f13e7955f265653c79a5e4a93c124f0d94e
Reviewed-on: https://gerrit.libreoffice.org/78126
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
Tested-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index ea0c58c7c..bbd91a889 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2557,15 +2557,20 @@ L.TileLayer = L.GridLayer.extend({
posEnd = this._map.unproject(posEnd);
this._cellResizeMarkerEnd.setLatLng(posEnd);
}
- if (!this._cellAutofillMarker.isDragged) {
- this._map.addLayer(this._cellAutofillMarker);
- var cellAutoFillMarkerPoisition = cellRectangle.getCenter();
- cellAutoFillMarkerPoisition.lat = cellRectangle.getSouth();
- cellAutoFillMarkerPoisition = this._map.project(cellAutoFillMarkerPoisition);
- var sizeAutoFill = this._cellAutofillMarker._icon.getBoundingClientRect();
- cellAutoFillMarkerPoisition = cellAutoFillMarkerPoisition.subtract(new L.Point(sizeAutoFill.width / 2, sizeAutoFill.height / 2));
- cellAutoFillMarkerPoisition = this._map.unproject(cellAutoFillMarkerPoisition);
- this._cellAutofillMarker.setLatLng(cellAutoFillMarkerPoisition);
+ if (this._cellAutoFillArea) {
+ if (!this._cellAutofillMarker.isDragged) {
+ this._map.addLayer(this._cellAutofillMarker);
+ var cellAutoFillMarkerPoisition = cellRectangle.getCenter();
+ cellAutoFillMarkerPoisition.lat = cellRectangle.getSouth();
+ cellAutoFillMarkerPoisition = this._map.project(cellAutoFillMarkerPoisition);
+ var sizeAutoFill = this._cellAutofillMarker._icon.getBoundingClientRect();
+ cellAutoFillMarkerPoisition = cellAutoFillMarkerPoisition.subtract(new L.Point(sizeAutoFill.width / 2, sizeAutoFill.height / 2));
+ cellAutoFillMarkerPoisition = this._map.unproject(cellAutoFillMarkerPoisition);
+ this._cellAutofillMarker.setLatLng(cellAutoFillMarkerPoisition);
+ }
+ else if (this._cellAutofillMarker) {
+ this._map.removeLayer(this._cellAutofillMarker);
+ }
}
}
else {
@@ -2577,10 +2582,7 @@ L.TileLayer = L.GridLayer.extend({
// Update text selection handlers.
_onUpdateTextSelection: function () {
- if (this._docType === 'spreadsheet') {
- this._onUpdateCellResizeMarkers();
- return;
- }
+ this._onUpdateCellResizeMarkers();
var startMarker, endMarker;
for (var key in this._selectionHandles) {
commit 45d5715e0d34fefd2c993a812d95b059f1f1963c
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Aug 26 17:26:41 2019 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Aug 27 01:09:17 2019 +0200
send table border drag positions as offset, not absolute value
Change-Id: Ie23ff9533eb258acb93a46e00f44141fc7ad12b2
Reviewed-on: https://gerrit.libreoffice.org/78110
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
Tested-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/loleaflet/src/layer/tile/TileLayer.TableOverlay.js b/loleaflet/src/layer/tile/TileLayer.TableOverlay.js
index 4ace14da0..f2d72e33e 100644
--- a/loleaflet/src/layer/tile/TileLayer.TableOverlay.js
+++ b/loleaflet/src/layer/tile/TileLayer.TableOverlay.js
@@ -42,6 +42,7 @@ L.TileLayer.include({
this._map.addLayer(marker);
marker._type = markerType + '-' + entry.type;
marker._position = parseInt(entry.position);
+ marker._initialPosition = marker._position;
marker._min = parseInt(entry.min);
marker._max = parseInt(entry.max);
marker._index = parseInt(entry.index);
@@ -155,7 +156,6 @@ L.TileLayer.include({
e.target._pointTop.lat = aLatLonPosition.lat;
e.target._pointBottom.lat = aLatLonPosition.lat;
}
-
e.target._position = newPosition;
var bounds = new L.LatLngBounds(e.target._pointTop, e.target._pointBottom);
@@ -171,6 +171,9 @@ L.TileLayer.include({
this._map.removeLayer(this._rectangle);
this._rectangle = null;
+ var offset = newPosition - e.target._initialPosition;
+ e.target._initialPosition = e.target._position;
+
var params = {
BorderType: {
type : 'string',
@@ -180,9 +183,9 @@ L.TileLayer.include({
type : 'uint16',
value : e.target._index
},
- NewPosition: {
+ Offset: {
type : 'int32',
- value : e.target._position
+ value : offset
}
}
More information about the Libreoffice-commits
mailing list