Closed hupe13 closed 2 years ago
Ignore the commits, see only the changed files. I did something wrong.
In README.md you should write:
// closeBtn: true || false
Thanks for the contribution, in this regard I think that we could handle all the possible variations with a single svg file (e.g. via a css variable passed to an svg file?), essentially it isn't always the same shape but filled with different colors?
Check if something is missing from version 2.2.3
https://github.com/Raruto/leaflet-elevation/commit/5a88a70d316bc985f42b3fe3b54dab0fd9ef20f1
Please change the line https://github.com/Raruto/leaflet-elevation/blob/13fc8023be4a537616f371f112478859b739ee25/src/control.js#L26 to consider the valid url of the file elevation.svg.
The files leaflet-elevation.js resp. leaflet-elevation.min.js are in an extra directory "dist" of my installation. So this works for me:
__btnIcon: document.currentScript.src+'/../../images/elevation.svg',
But this is not true for all.
Thank you very much.
Although they are "private attributes", there are already several ways to accomplish this:
L.Control.Elevation.include({
__btnIcon: document.currentScript.src + '/../../images/elevation.svg',
__modulesFolder: document.currentScript.src + '/../../src/handlers/',
});
L.Control.Elevation.prototype.__btnIcon = document.currentScript.src + '/../../images/elevation.svg';
L.Control.Elevation.prototype.__modulesFolder = document.currentScript.src + '/../../src/handlers/';
L.Control.Elevation.addInitHook(function() {
this.__btnIcon = document.currentScript.src + '/../../images/elevation.svg';
this.__modulesFolder = document.currentScript.src + '/../../src/handlers/';
});
Reference:
Thank you very much! Now this works.
match the color of the themes