@vcmap/core 5.0.0-rc.28 → 5.0.0-rc.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/build/postinstall.js +13 -2
- package/index.d.ts +155 -106
- package/package.json +9 -4
- package/src/category/category.js +71 -32
- package/src/category/categoryCollection.js +27 -18
- package/src/cesium/cesiumVcsCameraPrimitive.js +13 -5
- package/src/cesium/entity.js +3 -1
- package/src/cesium/wallpaperMaterial.js +4 -2
- package/src/classRegistry.js +11 -4
- package/src/featureProvider/abstractFeatureProvider.js +43 -22
- package/src/featureProvider/tileProviderFeatureProvider.js +11 -5
- package/src/featureProvider/wmsFeatureProvider.js +37 -15
- package/src/interaction/abstractInteraction.js +5 -1
- package/src/interaction/coordinateAtPixel.js +34 -12
- package/src/interaction/eventHandler.js +63 -23
- package/src/interaction/featureAtPixelInteraction.js +96 -32
- package/src/interaction/featureProviderInteraction.js +23 -8
- package/src/interaction/interactionChain.js +19 -9
- package/src/interaction/interactionType.js +23 -26
- package/src/layer/cesium/cesiumTilesetCesiumImpl.js +45 -15
- package/src/layer/cesium/clusterContext.js +10 -3
- package/src/layer/cesium/dataSourceCesiumImpl.js +13 -4
- package/src/layer/cesium/openStreetMapCesiumImpl.js +7 -3
- package/src/layer/cesium/rasterLayerCesiumImpl.js +6 -2
- package/src/layer/cesium/singleImageCesiumImpl.js +14 -3
- package/src/layer/cesium/terrainCesiumImpl.js +3 -2
- package/src/layer/cesium/tmsCesiumImpl.js +15 -3
- package/src/layer/cesium/vectorCesiumImpl.js +69 -25
- package/src/layer/cesium/vectorContext.js +25 -5
- package/src/layer/cesium/vectorRasterTileCesiumImpl.js +15 -5
- package/src/layer/cesium/vectorTileImageryProvider.js +51 -13
- package/src/layer/cesium/wmsCesiumImpl.js +15 -3
- package/src/layer/cesium/wmtsCesiumImpl.js +18 -6
- package/src/layer/cesium/x3dmHelper.js +4 -1
- package/src/layer/cesiumTilesetLayer.js +55 -26
- package/src/layer/czmlLayer.js +11 -5
- package/src/layer/dataSourceLayer.js +25 -17
- package/src/layer/featureLayer.js +33 -18
- package/src/layer/featureStoreLayer.js +161 -99
- package/src/layer/featureStoreLayerChanges.js +57 -17
- package/src/layer/featureVisibility.js +89 -59
- package/src/layer/geojsonHelpers.js +70 -29
- package/src/layer/geojsonLayer.js +17 -11
- package/src/layer/globalHider.js +14 -4
- package/src/layer/layer.js +77 -44
- package/src/layer/layerImplementation.js +12 -4
- package/src/layer/oblique/layerObliqueImpl.js +3 -1
- package/src/layer/oblique/obliqueHelpers.js +75 -30
- package/src/layer/oblique/vectorObliqueImpl.js +175 -69
- package/src/layer/openStreetMapLayer.js +34 -20
- package/src/layer/openlayers/layerOpenlayersImpl.js +37 -15
- package/src/layer/openlayers/openStreetMapOpenlayersImpl.js +3 -1
- package/src/layer/openlayers/rasterLayerOpenlayersImpl.js +3 -1
- package/src/layer/openlayers/singleImageOpenlayersImpl.js +3 -1
- package/src/layer/openlayers/tileDebugOpenlayersImpl.js +3 -1
- package/src/layer/openlayers/tmsOpenlayersImpl.js +6 -3
- package/src/layer/openlayers/vectorOpenlayersImpl.js +14 -4
- package/src/layer/openlayers/vectorTileOpenlayersImpl.js +12 -5
- package/src/layer/openlayers/wmsOpenlayersImpl.js +3 -1
- package/src/layer/openlayers/wmtsOpenlayersImpl.js +12 -5
- package/src/layer/pointCloudLayer.js +21 -10
- package/src/layer/rasterLayer.js +73 -22
- package/src/layer/singleImageLayer.js +10 -7
- package/src/layer/terrainHelpers.js +30 -19
- package/src/layer/terrainLayer.js +16 -7
- package/src/layer/tileLoadedHelper.js +9 -4
- package/src/layer/tileProvider/mvtTileProvider.js +10 -4
- package/src/layer/tileProvider/staticGeojsonTileProvider.js +10 -4
- package/src/layer/tileProvider/tileProvider.js +163 -87
- package/src/layer/tileProvider/urlTemplateTileProvider.js +10 -4
- package/src/layer/tmsLayer.js +7 -6
- package/src/layer/vectorHelpers.js +34 -25
- package/src/layer/vectorLayer.js +77 -36
- package/src/layer/vectorProperties.js +245 -74
- package/src/layer/vectorSymbols.js +3 -1
- package/src/layer/vectorTileLayer.js +121 -70
- package/src/layer/wfsLayer.js +19 -8
- package/src/layer/wmsHelpers.js +11 -6
- package/src/layer/wmsLayer.js +36 -14
- package/src/layer/wmtsLayer.js +35 -20
- package/src/map/baseOLMap.js +57 -31
- package/src/map/cameraLimiter.js +67 -18
- package/src/map/cesiumMap.js +307 -95
- package/src/map/obliqueMap.js +84 -34
- package/src/map/openlayersMap.js +40 -19
- package/src/map/vcsMap.js +21 -8
- package/src/oblique/helpers.js +212 -64
- package/src/oblique/obliqueCollection.js +111 -48
- package/src/oblique/obliqueDataSet.js +53 -21
- package/src/oblique/obliqueImage.js +50 -17
- package/src/oblique/obliqueImageMeta.js +7 -6
- package/src/oblique/obliqueProvider.js +75 -27
- package/src/oblique/obliqueView.js +18 -7
- package/src/oblique/obliqueViewDirection.js +3 -2
- package/src/oblique/parseImageJson.js +57 -23
- package/src/ol/feature.js +8 -3
- package/src/ol/geom/circle.js +12 -3
- package/src/ol/geom/geometryCollection.js +11 -4
- package/src/ol/render/canvas/canvasTileRenderer.js +11 -9
- package/src/overrideClassRegistry.js +13 -3
- package/src/style/arcStyle.js +129 -36
- package/src/style/arrowStyle.js +57 -22
- package/src/style/declarativeStyleItem.js +107 -62
- package/src/style/shapesCategory.js +8 -6
- package/src/style/styleFactory.js +4 -1
- package/src/style/styleHelpers.js +17 -8
- package/src/style/styleItem.js +28 -10
- package/src/style/vectorStyleItem.js +160 -74
- package/src/style/writeStyle.js +5 -7
- package/src/util/clipping/clippingObject.js +72 -38
- package/src/util/clipping/clippingObjectManager.js +53 -19
- package/src/util/clipping/clippingPlaneHelper.js +120 -53
- package/src/util/collection.js +12 -6
- package/src/util/editor/createFeatureSession.js +21 -6
- package/src/util/editor/editFeaturesSession.js +41 -15
- package/src/util/editor/editGeometrySession.js +55 -30
- package/src/util/editor/editorHelpers.js +114 -29
- package/src/util/editor/editorSessionHelpers.js +8 -3
- package/src/util/editor/interactions/createBBoxInteraction.js +11 -3
- package/src/util/editor/interactions/createCircleInteraction.js +7 -2
- package/src/util/editor/interactions/createLineStringInteraction.js +7 -2
- package/src/util/editor/interactions/createPolygonInteraction.js +7 -2
- package/src/util/editor/interactions/editFeaturesMouseOverInteraction.js +7 -5
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.js +8 -3
- package/src/util/editor/interactions/ensureHandlerSelectionInteraction.js +4 -2
- package/src/util/editor/interactions/insertVertexInteraction.js +17 -6
- package/src/util/editor/interactions/mapInteractionController.js +31 -14
- package/src/util/editor/interactions/removeVertexInteraction.js +4 -1
- package/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +19 -10
- package/src/util/editor/interactions/selectMultiFeatureInteraction.js +33 -20
- package/src/util/editor/interactions/selectSingleFeatureInteraction.js +14 -8
- package/src/util/editor/selectFeaturesSession.js +37 -21
- package/src/util/editor/transformation/create2DHandlers.js +82 -37
- package/src/util/editor/transformation/create3DHandlers.js +187 -84
- package/src/util/editor/transformation/extrudeInteraction.js +20 -5
- package/src/util/editor/transformation/rotateInteraction.js +29 -16
- package/src/util/editor/transformation/scaleInteraction.js +31 -15
- package/src/util/editor/transformation/transformationHandler.js +23 -8
- package/src/util/editor/transformation/transformationTypes.js +8 -4
- package/src/util/editor/transformation/translateInteraction.js +86 -32
- package/src/util/editor/validateGeoemetry.js +3 -1
- package/src/util/exclusiveManager.js +6 -3
- package/src/util/extent.js +20 -10
- package/src/util/featureconverter/arcToCesium.js +46 -12
- package/src/util/featureconverter/circleToCesium.js +61 -27
- package/src/util/featureconverter/convert.js +85 -13
- package/src/util/featureconverter/extent3D.js +69 -28
- package/src/util/featureconverter/featureconverterHelper.js +232 -79
- package/src/util/featureconverter/lineStringToCesium.js +107 -35
- package/src/util/featureconverter/pointHelpers.js +117 -45
- package/src/util/featureconverter/pointToCesium.js +128 -31
- package/src/util/featureconverter/polygonToCesium.js +50 -16
- package/src/util/fetch.js +3 -1
- package/src/util/geometryHelpers.js +15 -10
- package/src/util/indexedCollection.js +7 -3
- package/src/util/isMobile.js +8 -2
- package/src/util/layerCollection.js +28 -12
- package/src/util/mapCollection.js +37 -18
- package/src/util/math.js +35 -19
- package/src/util/overrideCollection.js +57 -32
- package/src/util/projection.js +21 -5
- package/src/util/urlHelpers.js +5 -3
- package/src/util/viewpoint.js +66 -33
- package/src/vcsApp.js +133 -69
- package/src/vcsModule.js +3 -2
- package/src/vcsModuleHelpers.js +24 -9
- package/src/vcsObject.js +3 -2
- package/tests/data/dynamicPointCzml.json +24 -35
- package/tests/data/oblique/imageData/imagev34.json +56 -272
- package/tests/data/oblique/imageData/imagev35.json +272 -19
- package/tests/data/oblique/imageData/imagev35PerImageSize.json +299 -19
- package/tests/data/oblique/tiledImageData/12/2199/1342.json +11056 -1
- package/tests/data/oblique/tiledImageData/12/2199/1343.json +11236 -1
- package/tests/data/oblique/tiledImageData/12/2199/1344.json +11077 -1
- package/tests/data/oblique/tiledImageData/12/2200/1342.json +11036 -1
- package/tests/data/oblique/tiledImageData/12/2200/1343.json +11277 -1
- package/tests/data/oblique/tiledImageData/12/2200/1344.json +11131 -1
- package/tests/data/oblique/tiledImageData/12/2201/1342.json +10870 -1
- package/tests/data/oblique/tiledImageData/12/2201/1343.json +11492 -1
- package/tests/data/oblique/tiledImageData/12/2201/1344.json +10909 -1
- package/tests/data/oblique/tiledImageData/image.json +70 -1
- package/tests/data/terrain/layer.json +121 -130
- package/tests/data/testGeoJSON.json +4 -16
- package/tests/unit/helpers/cesiumHelpers.js +58 -33
- package/tests/unit/helpers/helpers.js +10 -2
- package/tests/unit/helpers/imageHelpers.js +8 -4
- package/tests/unit/helpers/obliqueData.js +39 -13
- package/tests/unit/helpers/obliqueHelpers.js +12 -9
- package/tests/unit/helpers/openlayersHelpers.js +4 -1
- package/tests/unit/helpers/terrain/terrainData.js +8 -7
package/src/util/collection.js
CHANGED
|
@@ -62,7 +62,7 @@ class Collection {
|
|
|
62
62
|
this.removed = new VcsEvent();
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
*
|
|
65
|
+
*[Symbol.iterator]() {
|
|
66
66
|
const arrayLength = this._array.length;
|
|
67
67
|
for (let i = 0; i < arrayLength; i++) {
|
|
68
68
|
yield this._array[i];
|
|
@@ -75,14 +75,18 @@ class Collection {
|
|
|
75
75
|
* @type {string|symbol}
|
|
76
76
|
* @api
|
|
77
77
|
*/
|
|
78
|
-
get uniqueKey() {
|
|
78
|
+
get uniqueKey() {
|
|
79
|
+
return this._uniqueKey;
|
|
80
|
+
}
|
|
79
81
|
|
|
80
82
|
/**
|
|
81
83
|
* @readonly
|
|
82
84
|
* @type {number}
|
|
83
85
|
* @api
|
|
84
86
|
*/
|
|
85
|
-
get size() {
|
|
87
|
+
get size() {
|
|
88
|
+
return this._array.length;
|
|
89
|
+
}
|
|
86
90
|
|
|
87
91
|
/**
|
|
88
92
|
* Returns an item identified by the unique constraint key. Returns null, if there is no uniqueness constraint.
|
|
@@ -94,7 +98,7 @@ class Collection {
|
|
|
94
98
|
if (!this._uniqueKey) {
|
|
95
99
|
return undefined;
|
|
96
100
|
}
|
|
97
|
-
return this._array.find(e => e[this._uniqueKey] === value);
|
|
101
|
+
return this._array.find((e) => e[this._uniqueKey] === value);
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
/**
|
|
@@ -180,7 +184,7 @@ class Collection {
|
|
|
180
184
|
if (!this._uniqueKey) {
|
|
181
185
|
return undefined;
|
|
182
186
|
}
|
|
183
|
-
return this._array.some(e => e[this._uniqueKey] === value);
|
|
187
|
+
return this._array.some((e) => e[this._uniqueKey] === value);
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
/**
|
|
@@ -188,7 +192,9 @@ class Collection {
|
|
|
188
192
|
* @api
|
|
189
193
|
*/
|
|
190
194
|
clear() {
|
|
191
|
-
this._array.forEach((i) => {
|
|
195
|
+
this._array.forEach((i) => {
|
|
196
|
+
this.removed.raiseEvent(i);
|
|
197
|
+
});
|
|
192
198
|
this._array.splice(0);
|
|
193
199
|
}
|
|
194
200
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { check } from '@vcsuite/check';
|
|
2
2
|
import { Feature } from 'ol';
|
|
3
3
|
import VcsEvent from '../../vcsEvent.js';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
GeometryType,
|
|
6
|
+
SessionType,
|
|
7
|
+
setupInteractionChain,
|
|
8
|
+
} from './editorSessionHelpers.js';
|
|
5
9
|
import CreateLineStringInteraction from './interactions/createLineStringInteraction.js';
|
|
6
10
|
import CreateCircleInteraction from './interactions/createCircleInteraction.js';
|
|
7
11
|
import CreateBBoxInteraction from './interactions/createBBoxInteraction.js';
|
|
@@ -9,7 +13,10 @@ import CreatePointInteraction from './interactions/createPointInteraction.js';
|
|
|
9
13
|
import CreatePolygonInteraction from './interactions/createPolygonInteraction.js';
|
|
10
14
|
import VcsApp from '../../vcsApp.js';
|
|
11
15
|
import VectorLayer from '../../layer/vectorLayer.js';
|
|
12
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
alreadyTransformedToMercator,
|
|
18
|
+
createSync,
|
|
19
|
+
} from '../../layer/vectorSymbols.js';
|
|
13
20
|
import geometryIsValid from './validateGeoemetry.js';
|
|
14
21
|
import ObliqueMap from '../../map/obliqueMap.js';
|
|
15
22
|
|
|
@@ -74,7 +81,9 @@ function startCreateFeatureSession(app, layer, geometryType) {
|
|
|
74
81
|
currentInteraction.destroy();
|
|
75
82
|
currentInteraction = null;
|
|
76
83
|
}
|
|
77
|
-
interactionListeners.forEach((cb) => {
|
|
84
|
+
interactionListeners.forEach((cb) => {
|
|
85
|
+
cb();
|
|
86
|
+
});
|
|
78
87
|
interactionListeners = [];
|
|
79
88
|
};
|
|
80
89
|
|
|
@@ -98,6 +107,7 @@ function startCreateFeatureSession(app, layer, geometryType) {
|
|
|
98
107
|
/** @type {ObliqueMap} */ (app.maps.activeMap).switchEnabled = false;
|
|
99
108
|
}
|
|
100
109
|
currentFeature = new Feature({ geometry });
|
|
110
|
+
currentFeature[alreadyTransformedToMercator] = true;
|
|
101
111
|
currentFeature[createSync] = true;
|
|
102
112
|
layer.addFeatures([currentFeature]);
|
|
103
113
|
featureCreated.raiseEvent(currentFeature);
|
|
@@ -108,7 +118,11 @@ function startCreateFeatureSession(app, layer, geometryType) {
|
|
|
108
118
|
}
|
|
109
119
|
if (currentFeature) {
|
|
110
120
|
delete currentFeature[createSync];
|
|
111
|
-
if (
|
|
121
|
+
if (
|
|
122
|
+
!geometry ||
|
|
123
|
+
currentFeature.getGeometry() !== geometry ||
|
|
124
|
+
!geometryIsValid(geometry)
|
|
125
|
+
) {
|
|
112
126
|
layer.removeFeaturesById([currentFeature.getId()]);
|
|
113
127
|
currentFeature = null;
|
|
114
128
|
}
|
|
@@ -138,8 +152,9 @@ function startCreateFeatureSession(app, layer, geometryType) {
|
|
|
138
152
|
const { activeMap } = app.maps;
|
|
139
153
|
isOblique = activeMap instanceof ObliqueMap;
|
|
140
154
|
if (isOblique) {
|
|
141
|
-
obliqueImageChangedListener = /** @type {ObliqueMap} */ (
|
|
142
|
-
|
|
155
|
+
obliqueImageChangedListener = /** @type {ObliqueMap} */ (
|
|
156
|
+
activeMap
|
|
157
|
+
).imageChanged.addEventListener(resetCurrentInteraction);
|
|
143
158
|
} else {
|
|
144
159
|
obliqueImageChangedListener = () => {};
|
|
145
160
|
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
extend as extendExtent,
|
|
3
|
+
createEmpty as createEmptyExtent,
|
|
4
|
+
getCenter,
|
|
5
|
+
isEmpty,
|
|
6
|
+
} from 'ol/extent.js';
|
|
2
7
|
import { getLogger } from '@vcsuite/logger';
|
|
3
8
|
|
|
4
9
|
import VcsEvent from '../../vcsEvent.js';
|
|
5
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
setupInteractionChain,
|
|
12
|
+
SessionType,
|
|
13
|
+
setupScratchLayer,
|
|
14
|
+
} from './editorSessionHelpers.js';
|
|
6
15
|
import createTransformationHandler from './transformation/transformationHandler.js';
|
|
7
16
|
import { TransformationMode } from './transformation/transformationTypes.js';
|
|
8
17
|
import MapInteractionController from './interactions/mapInteractionController.js';
|
|
@@ -72,7 +81,6 @@ function startEditFeaturesSession(
|
|
|
72
81
|
layer,
|
|
73
82
|
interactionId,
|
|
74
83
|
initialMode = TransformationMode.TRANSLATE,
|
|
75
|
-
|
|
76
84
|
) {
|
|
77
85
|
/**
|
|
78
86
|
* @type {VcsEvent<void>}
|
|
@@ -92,11 +100,15 @@ function startEditFeaturesSession(
|
|
|
92
100
|
const allowPickingMap = new Map();
|
|
93
101
|
let modificationKey;
|
|
94
102
|
/** Callback to remove the modifier changed listener. */
|
|
95
|
-
const modifierChangedListener =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
const modifierChangedListener =
|
|
104
|
+
app.maps.eventHandler.modifierChanged.addEventListener((mod) => {
|
|
105
|
+
// CTRL is used to modify the current selection set, we must allow picking again so you can deselect a feature
|
|
106
|
+
modificationKey = mod;
|
|
107
|
+
const allowPicking = modificationKey === ModificationKeyType.CTRL;
|
|
108
|
+
currentFeatures.forEach((feature) => {
|
|
109
|
+
feature.set('olcs_allowPicking', allowPicking);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
100
112
|
|
|
101
113
|
const scratchLayer = setupScratchLayer(app.layers);
|
|
102
114
|
|
|
@@ -109,7 +121,9 @@ function startEditFeaturesSession(
|
|
|
109
121
|
const mouseOverInteraction = new EditFeaturesMouseOverInteraction();
|
|
110
122
|
interactionChain.addInteraction(mouseOverInteraction);
|
|
111
123
|
|
|
112
|
-
interactionChain.addInteraction(
|
|
124
|
+
interactionChain.addInteraction(
|
|
125
|
+
new EnsureHandlerSelectionInteraction(currentFeatures),
|
|
126
|
+
);
|
|
113
127
|
|
|
114
128
|
const mapInteractionController = new MapInteractionController();
|
|
115
129
|
interactionChain.addInteraction(mapInteractionController);
|
|
@@ -152,7 +166,8 @@ function startEditFeaturesSession(
|
|
|
152
166
|
|
|
153
167
|
const scale = (sx, sy) => {
|
|
154
168
|
let center = transformationHandler?.center;
|
|
155
|
-
if (!center) {
|
|
169
|
+
if (!center) {
|
|
170
|
+
// XXX copy paste
|
|
156
171
|
const extent = createEmptyExtent();
|
|
157
172
|
currentFeatures.forEach((f) => {
|
|
158
173
|
extendExtent(extent, f.getGeometry().getExtent());
|
|
@@ -224,8 +239,13 @@ function startEditFeaturesSession(
|
|
|
224
239
|
const modeChanged = new VcsEvent();
|
|
225
240
|
const setMode = (newMode) => {
|
|
226
241
|
if (newMode !== mode) {
|
|
227
|
-
if (
|
|
228
|
-
|
|
242
|
+
if (
|
|
243
|
+
newMode === TransformationMode.EXTRUDE &&
|
|
244
|
+
!(app.maps.activeMap instanceof CesiumMap)
|
|
245
|
+
) {
|
|
246
|
+
getLogger('EditFeaturesSession').warning(
|
|
247
|
+
'Cannot set extrude mode if map is not a CesiumMap',
|
|
248
|
+
);
|
|
229
249
|
} else {
|
|
230
250
|
mode = newMode;
|
|
231
251
|
createTransformations();
|
|
@@ -261,7 +281,9 @@ function startEditFeaturesSession(
|
|
|
261
281
|
obliqueImageChangedListener();
|
|
262
282
|
mapChangedListener();
|
|
263
283
|
modifierChangedListener();
|
|
264
|
-
currentFeatures.forEach(feature =>
|
|
284
|
+
currentFeatures.forEach((feature) =>
|
|
285
|
+
clearAllowPicking(feature, allowPickingMap),
|
|
286
|
+
);
|
|
265
287
|
allowPickingMap.clear();
|
|
266
288
|
app.layers.remove(scratchLayer);
|
|
267
289
|
modeChanged.destroy();
|
|
@@ -284,10 +306,14 @@ function startEditFeaturesSession(
|
|
|
284
306
|
translate,
|
|
285
307
|
scale,
|
|
286
308
|
setFeatures(features) {
|
|
287
|
-
currentFeatures.forEach(feature =>
|
|
309
|
+
currentFeatures.forEach((feature) =>
|
|
310
|
+
clearAllowPicking(feature, allowPickingMap),
|
|
311
|
+
);
|
|
288
312
|
currentFeatures.length = 0;
|
|
289
313
|
currentFeatures.push(...features);
|
|
290
|
-
currentFeatures.forEach(feature =>
|
|
314
|
+
currentFeatures.forEach((feature) =>
|
|
315
|
+
setAllowPicking(feature, allowPickingMap, modificationKey),
|
|
316
|
+
);
|
|
291
317
|
transformationHandler?.setFeatures(features);
|
|
292
318
|
},
|
|
293
319
|
get features() {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { getLogger } from '@vcsuite/logger';
|
|
2
2
|
import { unByKey } from 'ol/Observable.js';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
GeometryType,
|
|
5
|
+
SessionType,
|
|
6
|
+
setupInteractionChain,
|
|
7
|
+
setupScratchLayer,
|
|
8
|
+
} from './editorSessionHelpers.js';
|
|
4
9
|
import InteractionChain from '../../interaction/interactionChain.js';
|
|
5
10
|
import VcsEvent from '../../vcsEvent.js';
|
|
6
11
|
import TranslateVertexInteraction from './interactions/translateVertexInteraction.js';
|
|
@@ -37,7 +42,9 @@ function createEditLineStringGeometryInteraction(feature, scratchLayer) {
|
|
|
37
42
|
const vertices = geometry.getCoordinates().map(createVertex);
|
|
38
43
|
scratchLayer.addFeatures(vertices);
|
|
39
44
|
const resetGeometry = () => {
|
|
40
|
-
geometry.setCoordinates(
|
|
45
|
+
geometry.setCoordinates(
|
|
46
|
+
vertices.map((f) => f.getGeometry().getCoordinates()),
|
|
47
|
+
);
|
|
41
48
|
};
|
|
42
49
|
const translateVertex = new TranslateVertexInteraction();
|
|
43
50
|
translateVertex.vertexChanged.addEventListener(resetGeometry);
|
|
@@ -68,7 +75,7 @@ function createEditLineStringGeometryInteraction(feature, scratchLayer) {
|
|
|
68
75
|
return {
|
|
69
76
|
interactionChain,
|
|
70
77
|
destroy: () => {
|
|
71
|
-
scratchLayer.removeFeaturesById(vertices.map(v => v.getId()));
|
|
78
|
+
scratchLayer.removeFeaturesById(vertices.map((v) => v.getId()));
|
|
72
79
|
interactionChain.destroy();
|
|
73
80
|
},
|
|
74
81
|
};
|
|
@@ -103,10 +110,9 @@ function createEditCircleGeometryInteraction(feature, scratchLayer) {
|
|
|
103
110
|
|
|
104
111
|
const geometryListener = geometry.on('change', () => {
|
|
105
112
|
if (!suspend) {
|
|
106
|
-
geometry.getCoordinates()
|
|
107
|
-
.
|
|
108
|
-
|
|
109
|
-
});
|
|
113
|
+
geometry.getCoordinates().forEach((c, index) => {
|
|
114
|
+
vertices[index].getGeometry().setCoordinates(c);
|
|
115
|
+
});
|
|
110
116
|
}
|
|
111
117
|
});
|
|
112
118
|
|
|
@@ -115,7 +121,7 @@ function createEditCircleGeometryInteraction(feature, scratchLayer) {
|
|
|
115
121
|
return {
|
|
116
122
|
interactionChain,
|
|
117
123
|
destroy: () => {
|
|
118
|
-
scratchLayer.removeFeaturesById(vertices.map(v => v.getId()));
|
|
124
|
+
scratchLayer.removeFeaturesById(vertices.map((v) => v.getId()));
|
|
119
125
|
interactionChain.destroy();
|
|
120
126
|
unByKey(geometryListener);
|
|
121
127
|
},
|
|
@@ -169,16 +175,17 @@ function createEditBBoxGeometryInteraction(feature, scratchLayer) {
|
|
|
169
175
|
updateOtherVertex(leftOfIndex);
|
|
170
176
|
|
|
171
177
|
suspend = true;
|
|
172
|
-
geometry.setCoordinates([
|
|
178
|
+
geometry.setCoordinates([
|
|
179
|
+
vertices.map((f) => f.getGeometry().getCoordinates()),
|
|
180
|
+
]);
|
|
173
181
|
suspend = false;
|
|
174
182
|
});
|
|
175
183
|
|
|
176
184
|
const geometryListener = geometry.on('change', () => {
|
|
177
185
|
if (!suspend) {
|
|
178
|
-
geometry.getCoordinates()[0]
|
|
179
|
-
.
|
|
180
|
-
|
|
181
|
-
});
|
|
186
|
+
geometry.getCoordinates()[0].forEach((c, index) => {
|
|
187
|
+
vertices[index].getGeometry().setCoordinates(c);
|
|
188
|
+
});
|
|
182
189
|
}
|
|
183
190
|
});
|
|
184
191
|
const interactionChain = new InteractionChain([translateVertex]);
|
|
@@ -186,7 +193,7 @@ function createEditBBoxGeometryInteraction(feature, scratchLayer) {
|
|
|
186
193
|
return {
|
|
187
194
|
interactionChain,
|
|
188
195
|
destroy: () => {
|
|
189
|
-
scratchLayer.removeFeaturesById(vertices.map(v => v.getId()));
|
|
196
|
+
scratchLayer.removeFeaturesById(vertices.map((v) => v.getId()));
|
|
190
197
|
interactionChain.destroy();
|
|
191
198
|
unByKey(geometryListener);
|
|
192
199
|
},
|
|
@@ -204,9 +211,11 @@ function createEditSimplePolygonInteraction(feature, scratchLayer) {
|
|
|
204
211
|
const vertices = linearRing.getCoordinates().map(createVertex);
|
|
205
212
|
scratchLayer.addFeatures(vertices);
|
|
206
213
|
const resetGeometry = () => {
|
|
207
|
-
const coordinates = vertices.map(f => f.getGeometry().getCoordinates());
|
|
214
|
+
const coordinates = vertices.map((f) => f.getGeometry().getCoordinates());
|
|
208
215
|
linearRing.setCoordinates(coordinates); // update linear ring for proper vertex insertion
|
|
209
|
-
geometry.setCoordinates([
|
|
216
|
+
geometry.setCoordinates([
|
|
217
|
+
vertices.map((f) => f.getGeometry().getCoordinates()),
|
|
218
|
+
]); // update actual geometry, since linear ring is a clone and not a ref
|
|
210
219
|
};
|
|
211
220
|
|
|
212
221
|
const translateVertex = new TranslateVertexInteraction();
|
|
@@ -238,7 +247,7 @@ function createEditSimplePolygonInteraction(feature, scratchLayer) {
|
|
|
238
247
|
return {
|
|
239
248
|
interactionChain,
|
|
240
249
|
destroy: () => {
|
|
241
|
-
scratchLayer.removeFeaturesById(vertices.map(v => v.getId()));
|
|
250
|
+
scratchLayer.removeFeaturesById(vertices.map((v) => v.getId()));
|
|
242
251
|
interactionChain.destroy();
|
|
243
252
|
},
|
|
244
253
|
};
|
|
@@ -271,9 +280,7 @@ function createEditPointInteraction(feature, scratchLayer, layer) {
|
|
|
271
280
|
}
|
|
272
281
|
});
|
|
273
282
|
|
|
274
|
-
const interactionChain = new InteractionChain([
|
|
275
|
-
translateVertex,
|
|
276
|
-
]);
|
|
283
|
+
const interactionChain = new InteractionChain([translateVertex]);
|
|
277
284
|
|
|
278
285
|
return {
|
|
279
286
|
interactionChain,
|
|
@@ -323,10 +330,11 @@ function startEditGeometrySession(app, layer, interactionId) {
|
|
|
323
330
|
*/
|
|
324
331
|
let currentFeature = null;
|
|
325
332
|
|
|
326
|
-
|
|
327
333
|
const destroyCurrentInteractionSet = () => {
|
|
328
334
|
if (currentInteractionSet) {
|
|
329
|
-
interactionChain.removeInteraction(
|
|
335
|
+
interactionChain.removeInteraction(
|
|
336
|
+
currentInteractionSet.interactionChain,
|
|
337
|
+
);
|
|
330
338
|
currentInteractionSet.destroy();
|
|
331
339
|
currentInteractionSet = null;
|
|
332
340
|
}
|
|
@@ -354,29 +362,43 @@ function startEditGeometrySession(app, layer, interactionId) {
|
|
|
354
362
|
if (geometryType === GeometryType.Polygon) {
|
|
355
363
|
if (geometry.get('_vcsGeomType') === GeometryType.BBox) {
|
|
356
364
|
currentInteractionSet = createEditBBoxGeometryInteraction(
|
|
357
|
-
/** @type {import("ol").Feature<import("ol/geom").Polygon>} */ (
|
|
365
|
+
/** @type {import("ol").Feature<import("ol/geom").Polygon>} */ (
|
|
366
|
+
feature
|
|
367
|
+
),
|
|
358
368
|
scratchLayer,
|
|
359
369
|
);
|
|
360
|
-
} else if (
|
|
370
|
+
} else if (
|
|
371
|
+
/** @type {import("ol/geom").Polygon} */ (
|
|
372
|
+
geometry
|
|
373
|
+
).getLinearRingCount() === 1
|
|
374
|
+
) {
|
|
361
375
|
currentInteractionSet = createEditSimplePolygonInteraction(
|
|
362
|
-
/** @type {import("ol").Feature<import("ol/geom").Polygon>} */ (
|
|
376
|
+
/** @type {import("ol").Feature<import("ol/geom").Polygon>} */ (
|
|
377
|
+
feature
|
|
378
|
+
),
|
|
363
379
|
scratchLayer,
|
|
364
380
|
);
|
|
365
381
|
}
|
|
366
382
|
} else if (geometryType === GeometryType.LineString) {
|
|
367
383
|
currentInteractionSet = createEditLineStringGeometryInteraction(
|
|
368
|
-
/** @type {import("ol").Feature<import("ol/geom").LineString>} */ (
|
|
384
|
+
/** @type {import("ol").Feature<import("ol/geom").LineString>} */ (
|
|
385
|
+
feature
|
|
386
|
+
),
|
|
369
387
|
scratchLayer,
|
|
370
388
|
);
|
|
371
389
|
} else if (geometryType === GeometryType.Point) {
|
|
372
390
|
currentInteractionSet = createEditPointInteraction(
|
|
373
|
-
/** @type {import("ol").Feature<import("ol/geom").Point>} */ (
|
|
391
|
+
/** @type {import("ol").Feature<import("ol/geom").Point>} */ (
|
|
392
|
+
feature
|
|
393
|
+
),
|
|
374
394
|
scratchLayer,
|
|
375
395
|
layer,
|
|
376
396
|
);
|
|
377
397
|
} else if (geometryType === GeometryType.Circle) {
|
|
378
398
|
currentInteractionSet = createEditCircleGeometryInteraction(
|
|
379
|
-
/** @type {import("ol").Feature<import("ol/geom").Circle>} */ (
|
|
399
|
+
/** @type {import("ol").Feature<import("ol/geom").Circle>} */ (
|
|
400
|
+
feature
|
|
401
|
+
),
|
|
380
402
|
scratchLayer,
|
|
381
403
|
);
|
|
382
404
|
}
|
|
@@ -384,7 +406,9 @@ function startEditGeometrySession(app, layer, interactionId) {
|
|
|
384
406
|
if (currentInteractionSet) {
|
|
385
407
|
interactionChain.addInteraction(currentInteractionSet.interactionChain);
|
|
386
408
|
} else {
|
|
387
|
-
getLogger('EditGeometrySession').warning(
|
|
409
|
+
getLogger('EditGeometrySession').warning(
|
|
410
|
+
`Geometry of type ${geometryType} is currently not supported`,
|
|
411
|
+
);
|
|
388
412
|
currentFeature[createSync] = false;
|
|
389
413
|
currentFeature = null;
|
|
390
414
|
}
|
|
@@ -396,7 +420,8 @@ function startEditGeometrySession(app, layer, interactionId) {
|
|
|
396
420
|
mouseOverInteraction.reset();
|
|
397
421
|
createCurrentInteractionSet(null);
|
|
398
422
|
};
|
|
399
|
-
const mapActivatedListener =
|
|
423
|
+
const mapActivatedListener =
|
|
424
|
+
app.maps.mapActivated.addEventListener(setupActiveMap);
|
|
400
425
|
setupActiveMap();
|
|
401
426
|
|
|
402
427
|
const stop = () => {
|
|
@@ -5,7 +5,10 @@ import {
|
|
|
5
5
|
Cartesian3,
|
|
6
6
|
Math as CesiumMath,
|
|
7
7
|
Plane,
|
|
8
|
-
Ray,
|
|
8
|
+
Ray,
|
|
9
|
+
IntersectionTests,
|
|
10
|
+
Cartographic,
|
|
11
|
+
HeightReference,
|
|
9
12
|
} from '@vcmap-cesium/engine';
|
|
10
13
|
|
|
11
14
|
import { mercatorToCartesian } from '../math.js';
|
|
@@ -46,15 +49,34 @@ let scratchCartesian33 = new Cartesian3();
|
|
|
46
49
|
* @returns {!import("ol/coordinate").Coordinate}
|
|
47
50
|
*/
|
|
48
51
|
export function getClosestPointOn2DLine(start, end, point) {
|
|
49
|
-
scratchCartesian21 = Cartesian2.fromElements(
|
|
52
|
+
scratchCartesian21 = Cartesian2.fromElements(
|
|
53
|
+
end[0] - start[0],
|
|
54
|
+
end[1] - start[1],
|
|
55
|
+
scratchCartesian21,
|
|
56
|
+
);
|
|
50
57
|
if (scratchCartesian21.equals(Cartesian2.ZERO)) {
|
|
51
58
|
scratchCartesian21 = Cartesian2.fromElements(1, 1, scratchCartesian21);
|
|
52
59
|
}
|
|
53
|
-
scratchCartesian21 = Cartesian2.normalize(
|
|
54
|
-
|
|
60
|
+
scratchCartesian21 = Cartesian2.normalize(
|
|
61
|
+
scratchCartesian21,
|
|
62
|
+
scratchCartesian21,
|
|
63
|
+
);
|
|
64
|
+
scratchCartesian22 = Cartesian2.fromElements(
|
|
65
|
+
point[0] - start[0],
|
|
66
|
+
point[1] - start[1],
|
|
67
|
+
scratchCartesian22,
|
|
68
|
+
);
|
|
55
69
|
const lambda = Cartesian2.dot(scratchCartesian21, scratchCartesian22);
|
|
56
|
-
scratchCartesian21 = Cartesian2.multiplyByScalar(
|
|
57
|
-
|
|
70
|
+
scratchCartesian21 = Cartesian2.multiplyByScalar(
|
|
71
|
+
scratchCartesian21,
|
|
72
|
+
lambda,
|
|
73
|
+
scratchCartesian21,
|
|
74
|
+
);
|
|
75
|
+
return [
|
|
76
|
+
scratchCartesian21.x + start[0],
|
|
77
|
+
scratchCartesian21.y + start[1],
|
|
78
|
+
point[2],
|
|
79
|
+
];
|
|
58
80
|
}
|
|
59
81
|
|
|
60
82
|
/**
|
|
@@ -65,12 +87,24 @@ export function getClosestPointOn2DLine(start, end, point) {
|
|
|
65
87
|
* @returns {boolean}
|
|
66
88
|
*/
|
|
67
89
|
export function pointOnLine3D(start, end, point, epsilon) {
|
|
68
|
-
scratchCartesian31 = Cartesian3
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
90
|
+
scratchCartesian31 = Cartesian3.fromElements(
|
|
91
|
+
end[0] - start[0],
|
|
92
|
+
end[1] - start[1],
|
|
93
|
+
end[2] - start[2],
|
|
94
|
+
scratchCartesian31,
|
|
95
|
+
);
|
|
96
|
+
scratchCartesian32 = Cartesian3.fromElements(
|
|
97
|
+
point[0] - start[0],
|
|
98
|
+
point[1] - start[1],
|
|
99
|
+
point[2] - start[2],
|
|
100
|
+
scratchCartesian32,
|
|
101
|
+
);
|
|
102
|
+
scratchCartesian33 = Cartesian3.fromElements(
|
|
103
|
+
point[0] - end[0],
|
|
104
|
+
point[1] - end[1],
|
|
105
|
+
point[2] - point[2],
|
|
106
|
+
scratchCartesian33,
|
|
107
|
+
);
|
|
74
108
|
const mag1 = Cartesian3.magnitude(scratchCartesian31);
|
|
75
109
|
if (
|
|
76
110
|
mag1 < Cartesian3.magnitude(scratchCartesian32) ||
|
|
@@ -79,9 +113,18 @@ export function pointOnLine3D(start, end, point, epsilon) {
|
|
|
79
113
|
return false;
|
|
80
114
|
}
|
|
81
115
|
|
|
82
|
-
scratchCartesian31 = Cartesian3.normalize(
|
|
83
|
-
|
|
84
|
-
|
|
116
|
+
scratchCartesian31 = Cartesian3.normalize(
|
|
117
|
+
scratchCartesian31,
|
|
118
|
+
scratchCartesian31,
|
|
119
|
+
);
|
|
120
|
+
scratchCartesian32 = Cartesian3.normalize(
|
|
121
|
+
scratchCartesian32,
|
|
122
|
+
scratchCartesian32,
|
|
123
|
+
);
|
|
124
|
+
return scratchCartesian31.equalsEpsilon(
|
|
125
|
+
scratchCartesian32,
|
|
126
|
+
epsilon || CesiumMath.EPSILON5,
|
|
127
|
+
);
|
|
85
128
|
}
|
|
86
129
|
|
|
87
130
|
/**
|
|
@@ -92,9 +135,21 @@ export function pointOnLine3D(start, end, point, epsilon) {
|
|
|
92
135
|
* @returns {boolean}
|
|
93
136
|
*/
|
|
94
137
|
export function pointOnLine2D(start, end, point, epsilon) {
|
|
95
|
-
scratchCartesian21 = Cartesian2.fromElements(
|
|
96
|
-
|
|
97
|
-
|
|
138
|
+
scratchCartesian21 = Cartesian2.fromElements(
|
|
139
|
+
end[0] - start[0],
|
|
140
|
+
end[1] - start[1],
|
|
141
|
+
scratchCartesian21,
|
|
142
|
+
);
|
|
143
|
+
scratchCartesian22 = Cartesian2.fromElements(
|
|
144
|
+
point[0] - start[0],
|
|
145
|
+
point[1] - start[1],
|
|
146
|
+
scratchCartesian22,
|
|
147
|
+
);
|
|
148
|
+
scratchCartesian23 = Cartesian2.fromElements(
|
|
149
|
+
point[0] - end[0],
|
|
150
|
+
point[1] - end[1],
|
|
151
|
+
scratchCartesian23,
|
|
152
|
+
);
|
|
98
153
|
const mag1 = Cartesian2.magnitude(scratchCartesian21);
|
|
99
154
|
if (
|
|
100
155
|
mag1 < Cartesian2.magnitude(scratchCartesian22) ||
|
|
@@ -103,10 +158,19 @@ export function pointOnLine2D(start, end, point, epsilon) {
|
|
|
103
158
|
return false;
|
|
104
159
|
}
|
|
105
160
|
|
|
106
|
-
scratchCartesian21 = Cartesian2.normalize(
|
|
107
|
-
|
|
161
|
+
scratchCartesian21 = Cartesian2.normalize(
|
|
162
|
+
scratchCartesian21,
|
|
163
|
+
scratchCartesian21,
|
|
164
|
+
);
|
|
165
|
+
scratchCartesian22 = Cartesian2.normalize(
|
|
166
|
+
scratchCartesian22,
|
|
167
|
+
scratchCartesian22,
|
|
168
|
+
);
|
|
108
169
|
|
|
109
|
-
return scratchCartesian21.equalsEpsilon(
|
|
170
|
+
return scratchCartesian21.equalsEpsilon(
|
|
171
|
+
scratchCartesian22,
|
|
172
|
+
epsilon || CesiumMath.EPSILON5,
|
|
173
|
+
);
|
|
110
174
|
}
|
|
111
175
|
|
|
112
176
|
/**
|
|
@@ -115,10 +179,23 @@ export function pointOnLine2D(start, end, point, epsilon) {
|
|
|
115
179
|
* @returns {!import("@vcmap-cesium/engine").Plane}
|
|
116
180
|
*/
|
|
117
181
|
export function createCameraVerticalPlane(originCoordinates, scene) {
|
|
118
|
-
scratchCartesian31 = mercatorToCartesian(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
182
|
+
scratchCartesian31 = mercatorToCartesian(
|
|
183
|
+
originCoordinates,
|
|
184
|
+
scratchCartesian31,
|
|
185
|
+
);
|
|
186
|
+
scratchCartesian32 = scene.globe.ellipsoid.geodeticSurfaceNormal(
|
|
187
|
+
scratchCartesian31,
|
|
188
|
+
scratchCartesian32,
|
|
189
|
+
);
|
|
190
|
+
scratchCartesian32 = Cartesian3.cross(
|
|
191
|
+
scene.camera.rightWC,
|
|
192
|
+
scratchCartesian32,
|
|
193
|
+
scratchCartesian32,
|
|
194
|
+
);
|
|
195
|
+
scratchCartesian32 = Cartesian3.normalize(
|
|
196
|
+
scratchCartesian32,
|
|
197
|
+
scratchCartesian32,
|
|
198
|
+
);
|
|
122
199
|
|
|
123
200
|
return Plane.fromPointNormal(scratchCartesian31, scratchCartesian32);
|
|
124
201
|
}
|
|
@@ -129,8 +206,14 @@ export function createCameraVerticalPlane(originCoordinates, scene) {
|
|
|
129
206
|
* @returns {!import("@vcmap-cesium/engine").Plane}
|
|
130
207
|
*/
|
|
131
208
|
export function createHorizontalPlane(originCoordinates, scene) {
|
|
132
|
-
scratchCartesian31 = mercatorToCartesian(
|
|
133
|
-
|
|
209
|
+
scratchCartesian31 = mercatorToCartesian(
|
|
210
|
+
originCoordinates,
|
|
211
|
+
scratchCartesian31,
|
|
212
|
+
);
|
|
213
|
+
scratchCartesian32 = scene.globe.ellipsoid.geodeticSurfaceNormal(
|
|
214
|
+
scratchCartesian31,
|
|
215
|
+
scratchCartesian32,
|
|
216
|
+
);
|
|
134
217
|
|
|
135
218
|
return Plane.fromPointNormal(scratchCartesian31, scratchCartesian32);
|
|
136
219
|
}
|
|
@@ -195,8 +278,10 @@ export async function placeGeometryOnTerrain(geometry, map) {
|
|
|
195
278
|
* @param {import("@vcmap/core").VcsMap} cesiumMap
|
|
196
279
|
* @returns {Promise<void>}
|
|
197
280
|
*/
|
|
198
|
-
export async function ensureFeatureAbsolute(feature, layer, cesiumMap) {
|
|
199
|
-
|
|
281
|
+
export async function ensureFeatureAbsolute(feature, layer, cesiumMap) {
|
|
282
|
+
// XXX this does not ensure 3D coordinates
|
|
283
|
+
const layerIsClamped =
|
|
284
|
+
layer.vectorProperties.altitudeMode === HeightReference.CLAMP_TO_GROUND;
|
|
200
285
|
const altitudeMode = feature.get('olcs_altitudeMode');
|
|
201
286
|
if (altitudeMode === 'clampToGround' || (!altitudeMode && layerIsClamped)) {
|
|
202
287
|
feature.set('olcs_altitudeMode', 'absolute', true);
|
|
@@ -38,7 +38,8 @@ export const SessionType = {
|
|
|
38
38
|
* @param {import("@vcmap/core").LayerCollection} layerCollection
|
|
39
39
|
* @returns {VectorLayer}
|
|
40
40
|
*/
|
|
41
|
-
export function setupScratchLayer(layerCollection) {
|
|
41
|
+
export function setupScratchLayer(layerCollection) {
|
|
42
|
+
// IDEA pass in stopped and cleanup ourselves?
|
|
42
43
|
const layer = new VectorLayer({
|
|
43
44
|
projection: mercatorProjection.toJSON(),
|
|
44
45
|
vectorProperties: {
|
|
@@ -91,12 +92,16 @@ export function setupInteractionChain(eventHandler, interactionId) {
|
|
|
91
92
|
const removed = new VcsEvent();
|
|
92
93
|
const listener = eventHandler.addExclusiveInteraction(
|
|
93
94
|
interactionChain,
|
|
94
|
-
() => {
|
|
95
|
+
() => {
|
|
96
|
+
removed.raiseEvent();
|
|
97
|
+
},
|
|
95
98
|
undefined,
|
|
96
99
|
interactionId,
|
|
97
100
|
);
|
|
98
101
|
const currentFeatureInteractionEvent = eventHandler.featureInteraction.active;
|
|
99
|
-
eventHandler.featureInteraction.setActive(
|
|
102
|
+
eventHandler.featureInteraction.setActive(
|
|
103
|
+
EventType.CLICKMOVE | EventType.DRAGSTART,
|
|
104
|
+
);
|
|
100
105
|
|
|
101
106
|
return {
|
|
102
107
|
interactionChain,
|