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

kosmtik-map-compare

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kosmtik-map-compare - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

36

front.js

@@ -23,2 +23,35 @@ var TILELAYERS = [

L.K.MapCompare = L.Evented.extend({
initialize: function () {
this._maps = [];
for (var i = 0; i < arguments.length; i++) {
this.register(arguments[i]);
}
},
register: function (map) {
if (this._maps.indexOf(map) !== -1) return;
this._maps.push(map);
map.on('moveend', this.moveend, this);
},
moveend: function (e) {
if (!this._master) {
this._master = e.target;
this.propagate();
this._master = null;
}
},
propagate: function () {
for (var map of this._maps) {
if (map === this._master) continue;
map.setView(this._master.getCenter(), this._master.getZoom(), {animate: false});
}
}
});
L.K.Map.addInitHook(function () {

@@ -28,2 +61,3 @@ this.whenReady(function () {

title = L.DomUtil.create('h3', '', container),
self = this,
params = {

@@ -44,3 +78,3 @@ tms: false,

tilelayer = L.tileLayer(L.K.Config.project.compareUrl, params).addTo(otherMap);
new L.Hash(otherMap);
new L.K.MapCompare(self, otherMap);
};

@@ -47,0 +81,0 @@ var builder = new L.K.FormBuilder(params, [

4

package.json
{
"name": "kosmtik-map-compare",
"version": "0.0.10",
"version": "0.0.11",
"description": "Add a map to compare side-by-side with your work",

@@ -25,3 +25,3 @@ "main": "index.js",

"homepage": "https://github.com/kosmtik/kosmtik-map-compare",
"kosmtik": "~0.0.11"
"kosmtik": "~0.0.13"
}
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