Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-draw-rotate

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-draw-rotate - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

36

dist/Edit.Rectangle.Rotate.js

@@ -31,2 +31,4 @@ (function (factory) {

this._enableScale();
this._initMarkers();

@@ -163,2 +165,36 @@ }

this._fireEdit();
},
/* ------------------- SCALE (RESIZE) STUFF ------------------*/
/**
* Adds scale listeners
*/
_enableScale: function () {
this._shape.on('scalestart', this._onStartScaleFeature, this).on('scaleend', this._onStopScaleFeature, this);
},
/**
* Removes drag start listeners
*/
_disableScale: function () {
this._shape.off('scalestart', this._onStartDragFeature, this).off('scaleend', this._onStopScaleFeature, this);
},
/**
* Start scale
* @param {L.MouseEvent} evt
*/
_onStartScaleFeature: function () {
this._shape._map.removeLayer(this._markerGroup);
this._shape.fire('editstart');
},
/**
* Scale stopped
* @param {L.MouseEvent} evt
*/
_onStopScaleFeature: function () {
this._fireEdit();
}

@@ -165,0 +201,0 @@ });

2

package.json
{
"name": "leaflet-draw-rotate",
"description": "Add rotate functionality to the Leaflet.Draw plugin",
"version": "0.0.4",
"version": "0.0.5",
"license": "See LICENSE in LICENSE",

@@ -6,0 +6,0 @@ "author": "Daniel.Wild@csiro.au",

@@ -23,2 +23,3 @@ /**

this._enableDragging();
this._enableScale();
this._initMarkers();

@@ -146,3 +147,39 @@ }

this._fireEdit();
},
/* ------------------- SCALE (RESIZE) STUFF ------------------*/
/**
* Adds scale listeners
*/
_enableScale: function() {
this._shape
.on('scalestart', this._onStartScaleFeature, this)
.on('scaleend', this._onStopScaleFeature, this);
},
/**
* Removes drag start listeners
*/
_disableScale: function() {
this._shape
.off('scalestart', this._onStartDragFeature, this)
.off('scaleend', this._onStopScaleFeature, this);
},
/**
* Start scale
* @param {L.MouseEvent} evt
*/
_onStartScaleFeature: function() {
this._shape._map.removeLayer(this._markerGroup);
this._shape.fire('editstart');
},
/**
* Scale stopped
* @param {L.MouseEvent} evt
*/
_onStopScaleFeature: function() {
this._fireEdit();
}
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc