kosmtik-map-compare
Advanced tools
Comparing version 0.0.9 to 0.0.10
12
front.js
@@ -19,3 +19,3 @@ var TILELAYERS = [ | ||
['http://{s}.tile.openstreetmap.fr/openriverboatmap/{z}/{x}/{y}.png', 'OpenRiverboatMap'], | ||
['http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', 'OSM - Deutschland'], | ||
['http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', 'OSM - Deutschland'] | ||
]; | ||
@@ -65,8 +65,8 @@ | ||
if (!otherMap) init(); | ||
tilelayer.setUrl(params.url || params.suggestedUrl); | ||
tilelayer.setUrl(params.url || params.suggestedUrl); | ||
}; | ||
builder.on('synced', function (e) { | ||
if (e.field === 'active') { | ||
builder.on('postsync', function (e) { | ||
if (e.helper.field === 'active') { | ||
L.bind(toggle, this)(); | ||
} else if (e.field === 'url' || e.field === 'suggestedUrl') { | ||
} else if (e.helper.field === 'url' || e.helper.field === 'suggestedUrl') { | ||
setUrl(); | ||
@@ -96,3 +96,3 @@ } | ||
this.commands.add({ | ||
callback: function () {this.sidebar.open('.compare');}, | ||
callback: function () { this.sidebar.open('.compare'); }, | ||
context: this, | ||
@@ -99,0 +99,0 @@ name: 'Map compare: configure' |
@@ -0,1 +1,5 @@ | ||
var patchConfig = function (e) { | ||
e.options.compareUrl = e.project.mml.compareUrl || this.userConfig.compareUrl || 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; | ||
}; | ||
exports.Plugin = function (config) { | ||
@@ -6,5 +10,1 @@ config.addJS('/node_modules/kosmtik-map-compare/front.js'); | ||
}; | ||
var patchConfig = function (e) { | ||
e.options.compareUrl = e.project.mml.compareUrl || this.userConfig.compareUrl || 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; | ||
}; |
{ | ||
"name": "kosmtik-map-compare", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"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.9" | ||
"kosmtik": "~0.0.11" | ||
} |
81403