New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-distortableimage

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-distortableimage - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

.travis.yml

31

dist/leaflet.distortableimage.js

@@ -548,3 +548,3 @@ L.DomUtil = L.extend(L.DomUtil, {

var EditOverlayAction = L.ToolbarAction.extend({
var EditOverlayAction = LeafletToolbar.ToolbarAction.extend({
initialize: function(map, overlay, options) {

@@ -554,3 +554,3 @@ this._overlay = overlay;

L.ToolbarAction.prototype.initialize.call(this, options);
LeafletToolbar.ToolbarAction.prototype.initialize.call(this, options);
}

@@ -642,3 +642,3 @@ }),

L.DistortableImage.EditToolbar = L.Toolbar.Popup.extend({
L.DistortableImage.EditToolbar = LeafletToolbar.Popup.extend({
options: {

@@ -652,15 +652,2 @@ actions: [

]
},
/* Remove the toolbar after each action. */
_getActionConstructor: function(Action) {
var A = Action.extend({
removeHooks: function() {
var map = this._map;
map.removeLayer(this.toolbar);
}
});
return L.Toolbar.prototype._getActionConstructor.call(this, A);
}

@@ -696,3 +683,2 @@ });

addHooks: function() {
console.log('adding hooks');
var overlay = this._overlay,

@@ -731,5 +717,4 @@ map = overlay._map,

console.log('click listener');
//overlay.on('click', this._showToolbar, this);
L.DomEvent.on(overlay, 'click', this._showToolbar, this);
L.DomEvent.on(overlay._image, 'click', this._showToolbar, this);

@@ -750,3 +735,3 @@ /* Enable hotkeys. */

overlay.off('click', this._showToolbar, this);
L.DomEvent.off(overlay._image, 'click', this._showToolbar, this);

@@ -906,2 +891,3 @@ // First, check if dragging exists;

var overlay = this._overlay,
target = event.target,
map = overlay._map;

@@ -911,11 +897,10 @@

this._hideToolbar();
var point;
if (event.containerPoint) { point = event.containerPoint; }
else { point = event.target._dragStartTarget._leaflet_pos; }
else { point = target._leaflet_pos; }
var raised_point = map.containerPointToLatLng(new L.Point(point.x,point.y-20));
raised_point.lng = overlay.getCenter().lng;
this.toolbar = new L.DistortableImage.EditToolbar(raised_point).addTo(map, overlay);
overlay.fire('toolbar:created');
console.log('showToolbar');
L.DomEvent.stopPropagation(event);

@@ -922,0 +907,0 @@ },

@@ -29,2 +29,3 @@ module.exports = function(grunt) {

$: false,
LeafletToolbar: false,

@@ -31,0 +32,0 @@ // Mocha

{
"name": "leaflet-distortableimage",
"version": "0.1.2",
"version": "0.1.3",
"description": "Leaflet plugin enabling image overlays to be distorted, stretched, and warped (built for Public Lab's MapKnitter: http://publiclab.org).",

@@ -32,17 +32,17 @@ "scripts": {

"devDependencies": {
"chai": "^1.10.0",
"chai": "^4.1.2",
"font-awesome": "^4.2.0",
"grunt": "^0.4.5",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-karma": "^0.9.0",
"grunt": "^1.0.1",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-karma": "^2.0.0",
"jquery": "^2.1.3",
"karma": "^0.12.28",
"karma-coverage": "^0.2.7",
"karma-mocha": "^0.1.10",
"karma-mocha-reporter": "^0.3.1",
"karma-phantomjs-launcher": "^0.1.4",
"karma": "^1.7.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"leaflet": "^1.0.0",
"leaflet-toolbar": "git+https://github.com/Leaflet/Leaflet.toolbar.git",
"leaflet-toolbar": "^0.3.0",
"matchdep": "^0.3.0",

@@ -49,0 +49,0 @@ "mocha": "^2.0.1",

@@ -28,3 +28,2 @@ L.DistortableImage = L.DistortableImage || {};

addHooks: function() {
console.log('adding hooks');
var overlay = this._overlay,

@@ -63,5 +62,4 @@ map = overlay._map,

console.log('click listener');
//overlay.on('click', this._showToolbar, this);
L.DomEvent.on(overlay, 'click', this._showToolbar, this);
L.DomEvent.on(overlay._image, 'click', this._showToolbar, this);

@@ -82,3 +80,3 @@ /* Enable hotkeys. */

overlay.off('click', this._showToolbar, this);
L.DomEvent.off(overlay._image, 'click', this._showToolbar, this);

@@ -238,2 +236,3 @@ // First, check if dragging exists;

var overlay = this._overlay,
target = event.target,
map = overlay._map;

@@ -243,11 +242,10 @@

this._hideToolbar();
var point;
if (event.containerPoint) { point = event.containerPoint; }
else { point = event.target._dragStartTarget._leaflet_pos; }
else { point = target._leaflet_pos; }
var raised_point = map.containerPointToLatLng(new L.Point(point.x,point.y-20));
raised_point.lng = overlay.getCenter().lng;
this.toolbar = new L.DistortableImage.EditToolbar(raised_point).addTo(map, overlay);
overlay.fire('toolbar:created');
console.log('showToolbar');
L.DomEvent.stopPropagation(event);

@@ -254,0 +252,0 @@ },

L.DistortableImage = L.DistortableImage || {};
var EditOverlayAction = L.ToolbarAction.extend({
var EditOverlayAction = LeafletToolbar.ToolbarAction.extend({
initialize: function(map, overlay, options) {

@@ -8,3 +8,3 @@ this._overlay = overlay;

L.ToolbarAction.prototype.initialize.call(this, options);
LeafletToolbar.ToolbarAction.prototype.initialize.call(this, options);
}

@@ -96,3 +96,3 @@ }),

L.DistortableImage.EditToolbar = L.Toolbar.Popup.extend({
L.DistortableImage.EditToolbar = LeafletToolbar.Popup.extend({
options: {

@@ -106,16 +106,3 @@ actions: [

]
},
/* Remove the toolbar after each action. */
_getActionConstructor: function(Action) {
var A = Action.extend({
removeHooks: function() {
var map = this._map;
map.removeLayer(this.toolbar);
}
});
return L.Toolbar.prototype._getActionConstructor.call(this, A);
}
});
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