Refactoring for better layer management
The only feature on the temporary layer is now the vertexFeature, and the temporary layer's style is dynamically changed to the style of the layer whose segment is being edited (the topmost layer if more than one segment are being edited). With this simplification, we can also put all segments on a single RTree. Finally, we no longer rely on structures set on layers - all we need is now on the instance itself. This refactoring also changes the way we define layers to participate in modification - by using an array or a filter function, or assuming all layers if no layers property is set.
This commit is contained in:
@@ -379,8 +379,8 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.interaction.ModifyOptions
|
||||
* @property {undefined|function(ol.layer.Layer):boolean} layerFilter Filter
|
||||
* function to restrict modification to a subset of layers.
|
||||
* @property {undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer):boolean} layers
|
||||
* Layers or filter function to restrict modification to a subset of layers.
|
||||
* @property {number|undefined} pixelTolerance Pixel tolerance for considering
|
||||
* the pointer close enough to a vertex for editing. Default is 20 pixels.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user