From e1443e3648a3195c754cd8fe9d980e2ccc4ce6d4 Mon Sep 17 00:00:00 2001 From: fkloft Date: Thu, 13 Feb 2014 22:47:52 +0100 Subject: [PATCH] [draw-tools] fix error on mobile (Leaflet is not available until setup() is called) --- plugins/draw-tools.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/draw-tools.user.js b/plugins/draw-tools.user.js index d07c4ebe..702a6181 100644 --- a/plugins/draw-tools.user.js +++ b/plugins/draw-tools.user.js @@ -55,7 +55,6 @@ window.plugin.drawTools.getMarkerIcon = function(color) { window.plugin.drawTools.currentColor = '#a24ac3'; window.plugin.drawTools.markerTemplate = '@@INCLUDESTRING:images/marker-icon.svg.template@@'; -window.plugin.drawTools.currentMarker = window.plugin.drawTools.getMarkerIcon(window.plugin.drawTools.currentColor); window.plugin.drawTools.setOptions = function() { @@ -360,6 +359,8 @@ window.plugin.drawTools.optReset = function() { } window.plugin.drawTools.boot = function() { + window.plugin.drawTools.currentMarker = window.plugin.drawTools.getMarkerIcon(window.plugin.drawTools.currentColor); + window.plugin.drawTools.setOptions(); //create a leaflet FeatureGroup to hold drawn items