[Libreoffice-commits] online.git: loleaflet/plugins

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Mar 9 15:10:38 UTC 2019


 loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js |  148 ----------
 1 file changed, 148 deletions(-)

New commits:
commit 655c2642edf8845e19cabf5bb39ae0cbc1a375e8
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Sat Mar 9 11:05:57 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Sat Mar 9 11:08:55 2019 -0400

    loleaflet: purge "draw-0.2.4" plugin
    
    for some reason I forgot to delete remaining files
    
    Change-Id: Ia5e0fc4ae5e594d5cebbd14f33ecd3163cd076c8

diff --git a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js b/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js
deleted file mode 100644
index e5670f741..000000000
--- a/loleaflet/plugins/draw-0.2.4/src/edit/handler/Edit.SimpleShape.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-L.Edit = L.Edit || {};
-
-L.Edit.SimpleShape = L.Handler.extend({
-	options: {
-		moveIcon: new L.DivIcon({
-			iconSize: new L.Point(8, 8),
-			className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move'
-		}),
-		resizeIcon: new L.DivIcon({
-			iconSize: new L.Point(8, 8),
-			className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize'
-		})
-	},
-
-	initialize: function (shape, options) {
-		this._shape = shape;
-		L.Util.setOptions(this, options);
-	},
-
-	addHooks: function () {
-		var shape = this._shape;
-
-		shape.setStyle(shape.options.editing);
-
-		if (shape._map) {
-			this._map = shape._map;
-
-			if (!this._markerGroup) {
-				this._initMarkers();
-			}
-			this._map.addLayer(this._markerGroup);
-		}
-	},
-
-	removeHooks: function () {
-		var shape = this._shape;
-
-		shape.setStyle(shape.options.original);
-
-		if (shape._map) {
-			this._unbindMarker(this._moveMarker);
-
-			for (var i = 0, l = this._resizeMarkers.length; i < l; i++) {
-				this._unbindMarker(this._resizeMarkers[i]);
-			}
-			this._resizeMarkers = null;
-
-			this._map.removeLayer(this._markerGroup);
-			delete this._markerGroup;
-		}
-
-		this._map = null;
-	},
-
-	updateMarkers: function () {
-		this._markerGroup.clearLayers();
-		this._initMarkers();
-	},
-
-	_initMarkers: function () {
-		if (!this._markerGroup) {
-			this._markerGroup = new L.LayerGroup();
-		}
-
-		// Create center marker
-		this._createMoveMarker();
-
-		// Create edge marker
-		this._createResizeMarker();
-	},
-
-	_createMoveMarker: function () {
-		// Children override
-	},
-
-	_createResizeMarker: function () {
-		// Children override
-	},
-
-	_createMarker: function (latlng, icon) {
-		var marker = new L.Marker(latlng, {
-			draggable: true,
-			icon: icon,
-			zIndexOffset: 10
-		});
-
-		this._bindMarker(marker);
-
-		this._markerGroup.addLayer(marker);
-
-		return marker;
-	},
-
-	_bindMarker: function (marker) {
-		marker
-			.on('dragstart', this._onMarkerDragStart, this)
-			.on('drag', this._onMarkerDrag, this)
-			.on('dragend', this._onMarkerDragEnd, this);
-	},
-
-	_unbindMarker: function (marker) {
-		marker
-			.off('dragstart', this._onMarkerDragStart, this)
-			.off('drag', this._onMarkerDrag, this)
-			.off('dragend', this._onMarkerDragEnd, this);
-	},
-
-	_onMarkerDragStart: function (e) {
-		var marker = e.target;
-		marker.setOpacity(0);
-
-		this._shape.fire('editstart', { handle: e.target });
-	},
-
-	_fireEdit: function (e) {
-		this._shape.edited = true;
-		this._shape.fire('editend', { handle: e.target });
-	},
-
-	_onMarkerDrag: function (e) {
-		var marker = e.target,
-		latlng = marker.getLatLng();
-
-		if (marker === this._moveMarker) {
-			this._move(latlng);
-		} else {
-			this._resize(latlng);
-		}
-
-		this._shape.redraw();
-	},
-
-	_onMarkerDragEnd: function (e) {
-		var marker = e.target;
-		marker.setOpacity(1);
-
-		this._fireEdit(e);
-	},
-
-	_move: function () {
-		// Children override
-	},
-
-	_resize: function () {
-		// Children override
-	}
-});


More information about the Libreoffice-commits mailing list