You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just lot quite a bit of time for something that could be better explained within the Custom Mode documentation.
I've created a custom mode for drawing nodes and lines, and I wanted the "active" styling that is used in the pre-determined modes to be usable as well.
The documentation mentions that using this.select will control which features are selected, which does work internally, but does not control the 'active' state on the drawn features. I had to dig through the un-minified MapDraw file to discover that the 'active' state is actually to be controlled manually within the toDisplayFeatures, like so:
It's a simple bit of code obviously, however the documentation could do with a note that the active property in the drawn GeoJSON is to be manually controlled within the custom mode, and isn't actually related to the selected states.
The text was updated successfully, but these errors were encountered:
I've just lot quite a bit of time for something that could be better explained within the Custom Mode documentation.
I've created a custom mode for drawing nodes and lines, and I wanted the "active" styling that is used in the pre-determined modes to be usable as well.
The documentation mentions that using
this.select
will control which features are selected, which does work internally, but does not control the 'active' state on the drawn features. I had to dig through the un-minified MapDraw file to discover that the 'active' state is actually to be controlled manually within thetoDisplayFeatures
, like so:It's a simple bit of code obviously, however the documentation could do with a note that the
active
property in the drawn GeoJSON is to be manually controlled within the custom mode, and isn't actually related to theselected
states.The text was updated successfully, but these errors were encountered: