Hi All,

Is there an easier way to implement this functionality short of remaking my 
own version of the Modify Interaction, or extending it? 
if Not
Would there be interest in adding some functionality like the following to 
the Modify Interaction? On all the conditional options in a Modify 
Interaction, add a new integer index parameter that describes the point 
about to be edited, or the segment about to get inserted on. I would be 
fine with trying to make a PR for this.

I want to provide functionality for the user to edit a`LineString` so that 
has certain points can't be moved, and/or deleted, and has certain segments 
that can't be inserted on, and I have not been able to find an easy to do 
this yet using the Modify Interaction. 
So far I have checked if I could add this functionality by using the 
`condition`, `deleteCondition`, and `insertVertexCondition` options, but 
the only thing that gets passed to those functions is a standard 
`MapBrowserEvent`. Which I could use to pick which thing is being edited, 
but it wouldn't be guaranteed to match what the Modify Interaction picks, 
so I started looking at the Modify Interaction Source code, and found that 
the Modify Interaction private variables `vertexFeature_`, `rBush_`, and 
`dragSegments_`  have the data I need, unfortunately they are not defined 
when any of the condition functions above gets called.  So I wrote some 
prototype code to override some Modify functions to do a condition check 
later on in the execution after those private variables got populated.

Thanks,
Matt


Also I see in the title/header of this group is for openlayers 3. Is that 
still the case, is there an openlayers 5 group, or has it just not been 
updated?

-- 
You received this message because you are subscribed to the Google Groups 
"OpenLayers Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/openlayers-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/openlayers-dev/e0573b3e-7000-4619-a815-db4aa4ba4393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to