Leaflet.DistortableImage
Leaflet.DistortableImage copied to clipboard
Get the transparency tool to work on a range
Currently we just have two levels - opaque (opacity level at 1) and transparent (opacity level at 0.7)
Relevant lines of code are:
-
an
opacity
option for the 0.7 value https://github.com/publiclab/Leaflet.DistortableImage/blob/c2bf3def17149735ab5790ae5f4a09fa9be513eb/src/edit/DistortableImage.Edit.js#L3-L20 -
The
_toggleTransparency
action: https://github.com/publiclab/Leaflet.DistortableImage/blob/c2bf3def17149735ab5790ae5f4a09fa9be513eb/src/edit/DistortableImage.Edit.js#L294-L303 -
The corresponding toolbar icon code: https://github.com/publiclab/Leaflet.DistortableImage/blob/c2bf3def17149735ab5790ae5f4a09fa9be513eb/src/edit/DistortableImage.EditToolbar.js#L12-L26
It would be great to get the transparency tool to work on a range – going from opaque to increasingly more transparent.
Hello Can I give this issue a go? I would love to contribute to the project once more. Just to clarify the transparency should be toggled still just by clicks that instead of two values go through a range of values sequentially?
#1231