We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If draw-tools is installed, something goes wrong in layer-count and it doesn't work.
I fixed it by basically disabling the chunk of code that interacts with draw tools.
Here's my local fix:
` plugin.layerCount.onBtnClick = function(ev) { var btn = plugin.layerCount.button, tooltip = plugin.layerCount.tooltip, layer = plugin.layerCount.layer;
var drawToolsEnabled = false; if(btn.classList.contains("active")) { if(window.plugin.drawTools !== undefined && drawToolsEnabled) { window.plugin.drawTools.drawnItems.eachLayer(function(layer) { if (layer instanceof L.GeodesicPolygon) { L.DomUtil.addClass(layer._path, "leaflet-clickable"); layer._path.setAttribute("pointer-events", layer.options.pointerEventsBackup); layer.options.pointerEvents = layer.options.pointerEventsBackup; layer.options.clickable = true; } }); } map.off("click", plugin.layerCount.calculate); btn.classList.remove("active"); } else { console.log("inactive"); if(window.plugin.drawTools !== undefined && drawToolsEnabled) { window.plugin.drawTools.drawnItems.eachLayer(function(layer) { if (layer instanceof L.GeodesicPolygon) { layer.options.pointerEventsBackup = layer.options.pointerEvents; layer.options.pointerEvents = null; layer.options.clickable = false; L.DomUtil.removeClass(layer._path, "leaflet-clickable"); layer._path.setAttribute("pointer-events", "none"); } }); } map.on("click", plugin.layerCount.calculate); btn.classList.add("active"); setTimeout(function(){ tooltip.textContent = "Click on map"; }, 10); }
}; `
The text was updated successfully, but these errors were encountered:
https://github.com/IITC-CE/ingress-intel-total-conversion
Sorry, something went wrong.
No branches or pull requests
If draw-tools is installed, something goes wrong in layer-count and it doesn't work.
I fixed it by basically disabling the chunk of code that interacts with draw tools.
Here's my local fix:
`
plugin.layerCount.onBtnClick = function(ev) {
var btn = plugin.layerCount.button,
tooltip = plugin.layerCount.tooltip,
layer = plugin.layerCount.layer;
};
`
The text was updated successfully, but these errors were encountered: