Skip to content

Conversation

@trafficonese
Copy link

This is my first PR for a JS-library, so please excuse me if there are some obvious problems or better solutions.

  • I acutally want to wrap this plugin to R and had to define the map in the functions onClickHigherOpacity and onClickLowerOpacity, as otherwise i get an error in R, saying that map.doubleClickZoom is undefined. So I defined the map as:
    var map = opacity_layer._map;
    This works for me in JS and in R.

  • Further changes are the synchronisation of the slider with the buttons. This could definitly be further optimized, but as a start it looked fine.

  • I also exposed more options for the slider. (range, max, animate)
    If an initial opacity is set, it has to be passed to the slider aswell, so it is integrated in the options (init_opac).
    I changed the demo to show the use of those options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant