plugins - ensure they pass a default for shown/hidden when being added to the map
This commit is contained in:
		| @@ -1,7 +1,7 @@ | |||||||
| // ==UserScript== | // ==UserScript== | ||||||
| // @id             iitc-plugin-draw-tools@breunigs | // @id             iitc-plugin-draw-tools@breunigs | ||||||
| // @name           IITC plugin: draw tools | // @name           IITC plugin: draw tools | ||||||
| // @version        0.4.0.@@DATETIMEVERSION@@ | // @version        0.4.1.@@DATETIMEVERSION@@ | ||||||
| // @namespace      https://github.com/jonatkins/ingress-intel-total-conversion | // @namespace      https://github.com/jonatkins/ingress-intel-total-conversion | ||||||
| // @updateURL      @@UPDATEURL@@ | // @updateURL      @@UPDATEURL@@ | ||||||
| // @downloadURL    @@DOWNLOADURL@@ | // @downloadURL    @@DOWNLOADURL@@ | ||||||
| @@ -141,7 +141,7 @@ window.plugin.drawTools.boot = function() { | |||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   //add the layer |   //add the layer | ||||||
|   window.addLayerGroup('Drawn Items', window.plugin.drawTools.drawnItems); |   window.addLayerGroup('Drawn Items', window.plugin.drawTools.drawnItems, true); | ||||||
|  |  | ||||||
|  |  | ||||||
|   //place created items into the specific layer |   //place created items into the specific layer | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| // ==UserScript== | // ==UserScript== | ||||||
| // @id             max-links@boombuler | // @id             max-links@boombuler | ||||||
| // @name           IITC plugin: Max Links | // @name           IITC plugin: Max Links | ||||||
| // @version        0.3.0.@@DATETIMEVERSION@@ | // @version        0.3.1.@@DATETIMEVERSION@@ | ||||||
| // @updateURL      @@UPDATEURL@@ | // @updateURL      @@UPDATEURL@@ | ||||||
| // @downloadURL    @@DOWNLOADURL@@ | // @downloadURL    @@DOWNLOADURL@@ | ||||||
| // @description    [@@BUILDNAME@@-@@BUILDDATE@@] Calculates how to link the portals to create the maximum number of fields. | // @description    [@@BUILDNAME@@-@@BUILDDATE@@] Calculates how to link the portals to create the maximum number of fields. | ||||||
| @@ -117,7 +117,7 @@ window.plugin.maxLinks.setup = function() { | |||||||
|       window.plugin.maxLinks.updateLayer(); |       window.plugin.maxLinks.updateLayer(); | ||||||
|   }); |   }); | ||||||
|   window.map.on('zoomend moveend', window.plugin.maxLinks.updateLayer); |   window.map.on('zoomend moveend', window.plugin.maxLinks.updateLayer); | ||||||
|   window.addLayerGroup('Maximum Links', window.plugin.maxLinks.layer); |   window.addLayerGroup('Maximum Links', window.plugin.maxLinks.layer, false); | ||||||
| } | } | ||||||
| var setup = window.plugin.maxLinks.setup; | var setup = window.plugin.maxLinks.setup; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| // ==UserScript== | // ==UserScript== | ||||||
| // @id             iitc-plugin-player-tracker@breunigs | // @id             iitc-plugin-player-tracker@breunigs | ||||||
| // @name           IITC Plugin: Player tracker | // @name           IITC Plugin: Player tracker | ||||||
| // @version        0.9.3.@@DATETIMEVERSION@@ | // @version        0.9.4.@@DATETIMEVERSION@@ | ||||||
| // @namespace      https://github.com/jonatkins/ingress-intel-total-conversion | // @namespace      https://github.com/jonatkins/ingress-intel-total-conversion | ||||||
| // @updateURL      @@UPDATEURL@@ | // @updateURL      @@UPDATEURL@@ | ||||||
| // @downloadURL    @@DOWNLOADURL@@ | // @downloadURL    @@DOWNLOADURL@@ | ||||||
| @@ -48,7 +48,7 @@ window.plugin.playerTracker.setup = function() { | |||||||
|   }}); |   }}); | ||||||
|  |  | ||||||
|   plugin.playerTracker.drawnTraces = new L.LayerGroup(); |   plugin.playerTracker.drawnTraces = new L.LayerGroup(); | ||||||
|   window.addLayerGroup('Player Tracker', plugin.playerTracker.drawnTraces); |   window.addLayerGroup('Player Tracker', plugin.playerTracker.drawnTraces, true); | ||||||
|   map.on('layeradd',function(obj) { |   map.on('layeradd',function(obj) { | ||||||
|     if(obj.layer === plugin.playerTracker.drawnTraces) |     if(obj.layer === plugin.playerTracker.drawnTraces) | ||||||
|     { |     { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user