@vcmap/core 5.3.3 → 6.0.0-rc.10
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/dist/cesium.d.ts +12 -0
- package/dist/index.d.ts +27 -19
- package/dist/index.js +22 -14
- package/dist/index.js.map +1 -1
- package/dist/ol.d.ts +15 -2
- package/dist/src/category/category.d.ts +5 -4
- package/dist/src/category/category.js +2 -1
- package/dist/src/category/category.js.map +1 -1
- package/dist/src/category/categoryCollection.js.map +1 -1
- package/dist/src/cesium/cesiumVcsCameraPrimitive.d.ts +1 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js +4 -0
- package/dist/src/cesium/cesiumVcsCameraPrimitive.js.map +1 -1
- package/dist/src/classRegistry.d.ts +4 -3
- package/dist/src/classRegistry.js +2 -0
- package/dist/src/classRegistry.js.map +1 -1
- package/dist/src/featureProvider/abstractFeatureProvider.js.map +1 -1
- package/dist/src/featureProvider/wmsFeatureProvider.js.map +1 -1
- package/dist/src/interaction/abstractInteraction.js.map +1 -1
- package/dist/src/interaction/coordinateAtPixel.js.map +1 -1
- package/dist/src/interaction/eventHandler.js.map +1 -1
- package/dist/src/interaction/featureAtPixelInteraction.d.ts +4 -12
- package/dist/src/interaction/featureAtPixelInteraction.js +5 -21
- package/dist/src/interaction/featureAtPixelInteraction.js.map +1 -1
- package/dist/src/interaction/featureProviderInteraction.js.map +1 -1
- package/dist/src/interaction/interactionChain.js.map +1 -1
- package/dist/src/interaction/interactionType.js +4 -4
- package/dist/src/interaction/interactionType.js.map +1 -1
- package/dist/src/layer/cesium/cesiumTilesetCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/clusterContext.d.ts +12 -16
- package/dist/src/layer/cesium/clusterContext.js +75 -43
- package/dist/src/layer/cesium/clusterContext.js.map +1 -1
- package/dist/src/layer/cesium/dataSourceCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/rasterLayerCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/resourceHelper.js.map +1 -1
- package/dist/src/layer/cesium/singleImageCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/terrainCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/tmsCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorCesiumImpl.d.ts +2 -3
- package/dist/src/layer/cesium/vectorCesiumImpl.js +16 -10
- package/dist/src/layer/cesium/vectorCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorContext.d.ts +11 -54
- package/dist/src/layer/cesium/vectorContext.js +154 -171
- package/dist/src/layer/cesium/vectorContext.js.map +1 -1
- package/dist/src/layer/cesium/vectorRasterTileCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesium/vectorTileImageryProvider.js.map +1 -1
- package/dist/src/layer/cesium/wmsCesiumImpl.js.map +1 -1
- package/dist/src/layer/cesiumTilesetLayer.js.map +1 -1
- package/dist/src/layer/czmlLayer.js.map +1 -1
- package/dist/src/layer/dataSourceLayer.js.map +1 -1
- package/dist/src/layer/featureLayer.js.map +1 -1
- package/dist/src/layer/featureStoreFeatureVisibility.js.map +1 -1
- package/dist/src/layer/featureStoreLayer.js.map +1 -1
- package/dist/src/layer/featureStoreLayerChanges.js.map +1 -1
- package/dist/src/layer/featureVisibility.js +4 -5
- package/dist/src/layer/featureVisibility.js.map +1 -1
- package/dist/src/layer/geojsonHelpers.d.ts +1 -1
- package/dist/src/layer/geojsonHelpers.js +5 -10
- package/dist/src/layer/geojsonHelpers.js.map +1 -1
- package/dist/src/layer/geojsonLayer.js.map +1 -1
- package/dist/src/layer/globalHider.js.map +1 -1
- package/dist/src/layer/layer.js.map +1 -1
- package/dist/src/layer/layerImplementation.js.map +1 -1
- package/dist/src/layer/oblique/layerObliqueImpl.js.map +1 -1
- package/dist/src/layer/oblique/obliqueHelpers.js +9 -9
- package/dist/src/layer/oblique/obliqueHelpers.js.map +1 -1
- package/dist/src/layer/oblique/vectorObliqueImpl.d.ts +3 -3
- package/dist/src/layer/oblique/vectorObliqueImpl.js.map +1 -1
- package/dist/src/layer/openStreetMapLayer.js.map +1 -1
- package/dist/src/layer/openlayers/layerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/rasterLayerOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/singleImageOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/tmsOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.d.ts +2 -2
- package/dist/src/layer/openlayers/vectorOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.d.ts +1 -7
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js +18 -47
- package/dist/src/layer/openlayers/vectorTileOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/wmsOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/openlayers/wmtsOpenlayersImpl.js.map +1 -1
- package/dist/src/layer/pointCloudLayer.js.map +1 -1
- package/dist/src/layer/rasterLayer.js +1 -1
- package/dist/src/layer/rasterLayer.js.map +1 -1
- package/dist/src/layer/singleImageLayer.js.map +1 -1
- package/dist/src/layer/terrainHelpers.js.map +1 -1
- package/dist/src/layer/terrainLayer.js.map +1 -1
- package/dist/src/layer/tileLoadedHelper.js.map +1 -1
- package/dist/src/layer/tileProvider/mvtTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/staticGeojsonTileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/tileProvider.js.map +1 -1
- package/dist/src/layer/tileProvider/urlTemplateTileProvider.js.map +1 -1
- package/dist/src/layer/tmsLayer.js.map +1 -1
- package/dist/src/layer/vectorHelpers.js.map +1 -1
- package/dist/src/layer/vectorLayer.d.ts +0 -37
- package/dist/src/layer/vectorLayer.js +1 -3
- package/dist/src/layer/vectorLayer.js.map +1 -1
- package/dist/src/layer/vectorProperties.d.ts +10 -5
- package/dist/src/layer/vectorProperties.js +59 -10
- package/dist/src/layer/vectorProperties.js.map +1 -1
- package/dist/src/layer/vectorTileLayer.js.map +1 -1
- package/dist/src/layer/wfsLayer.js.map +1 -1
- package/dist/src/layer/wmsHelpers.js.map +1 -1
- package/dist/src/layer/wmsLayer.js.map +1 -1
- package/dist/src/layer/wmtsLayer.js.map +1 -1
- package/dist/src/map/baseOLMap.js +1 -1
- package/dist/src/map/baseOLMap.js.map +1 -1
- package/dist/src/map/cameraLimiter.js +1 -1
- package/dist/src/map/cameraLimiter.js.map +1 -1
- package/dist/src/map/cesiumMap.js.map +1 -1
- package/dist/src/map/obliqueMap.js.map +1 -1
- package/dist/src/map/openlayersMap.js +1 -1
- package/dist/src/map/openlayersMap.js.map +1 -1
- package/dist/src/map/vcsMap.js.map +1 -1
- package/dist/src/oblique/helpers.js +5 -5
- package/dist/src/oblique/helpers.js.map +1 -1
- package/dist/src/oblique/obliqueCollection.js.map +1 -1
- package/dist/src/oblique/obliqueDataSet.js +5 -5
- package/dist/src/oblique/obliqueDataSet.js.map +1 -1
- package/dist/src/oblique/obliqueImage.js.map +1 -1
- package/dist/src/oblique/obliqueImageMeta.js.map +1 -1
- package/dist/src/oblique/obliqueProvider.js.map +1 -1
- package/dist/src/oblique/obliqueView.js.map +1 -1
- package/dist/src/oblique/obliqueViewDirection.js +1 -1
- package/dist/src/oblique/obliqueViewDirection.js.map +1 -1
- package/dist/src/oblique/parseImageJson.js.map +1 -1
- package/dist/src/ol/feature.js.map +1 -1
- package/dist/src/ol/geom/geometryCollection.js +80 -6
- package/dist/src/ol/geom/geometryCollection.js.map +1 -1
- package/dist/src/ol/render/canvas/canvasTileRenderer.js.map +1 -1
- package/dist/src/ol/source/ClusterEnhancedVectorSource.js.map +1 -1
- package/dist/src/ol/source/VcsCluster.js.map +1 -1
- package/dist/src/overrideClassRegistry.d.ts +2 -2
- package/dist/src/overrideClassRegistry.js +5 -3
- package/dist/src/overrideClassRegistry.js.map +1 -1
- package/dist/src/style/arcStyle.js +1 -0
- package/dist/src/style/arcStyle.js.map +1 -1
- package/dist/src/style/arrowStyle.js +6 -6
- package/dist/src/style/arrowStyle.js.map +1 -1
- package/dist/src/style/declarativeStyleItem.js.map +1 -1
- package/dist/src/style/shapesCategory.js.map +1 -1
- package/dist/src/style/styleFactory.js.map +1 -1
- package/dist/src/style/styleHelpers.js +4 -2
- package/dist/src/style/styleHelpers.js.map +1 -1
- package/dist/src/style/styleItem.js.map +1 -1
- package/dist/src/style/vectorStyleItem.js +9 -9
- package/dist/src/style/vectorStyleItem.js.map +1 -1
- package/dist/src/style/writeStyle.js.map +1 -1
- package/dist/src/util/clipping/clippingObject.js.map +1 -1
- package/dist/src/util/clipping/clippingObjectManager.js.map +1 -1
- package/dist/src/util/clipping/clippingPlaneHelper.js +2 -2
- package/dist/src/util/clipping/clippingPlaneHelper.js.map +1 -1
- package/dist/src/util/collection.js.map +1 -1
- package/dist/src/util/displayQuality/displayQuality.d.ts +1 -0
- package/dist/src/util/displayQuality/displayQuality.js +13 -2
- package/dist/src/util/displayQuality/displayQuality.js.map +1 -1
- package/dist/src/util/editor/createFeatureSession.d.ts +10 -2
- package/dist/src/util/editor/createFeatureSession.js +75 -9
- package/dist/src/util/editor/createFeatureSession.js.map +1 -1
- package/dist/src/util/editor/editFeaturesSession.d.ts +10 -4
- package/dist/src/util/editor/editFeaturesSession.js +74 -37
- package/dist/src/util/editor/editFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/editGeometrySession.d.ts +7 -2
- package/dist/src/util/editor/editGeometrySession.js +109 -66
- package/dist/src/util/editor/editGeometrySession.js.map +1 -1
- package/dist/src/util/editor/editorHelpers.d.ts +13 -6
- package/dist/src/util/editor/editorHelpers.js +53 -23
- package/dist/src/util/editor/editorHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSessionHelpers.d.ts +6 -6
- package/dist/src/util/editor/editorSessionHelpers.js +8 -18
- package/dist/src/util/editor/editorSessionHelpers.js.map +1 -1
- package/dist/src/util/editor/editorSymbols.d.ts +1 -1
- package/dist/src/util/editor/editorSymbols.js +1 -1
- package/dist/src/util/editor/editorSymbols.js.map +1 -1
- package/dist/src/util/editor/interactions/createBBoxInteraction.d.ts +1 -0
- package/dist/src/util/editor/interactions/createBBoxInteraction.js +20 -16
- package/dist/src/util/editor/interactions/createBBoxInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js +1 -1
- package/dist/src/util/editor/interactions/createCircleInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createLineStringInteraction.js +3 -3
- package/dist/src/util/editor/interactions/createLineStringInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js +1 -1
- package/dist/src/util/editor/interactions/createPointInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/createPolygonInteraction.d.ts +4 -0
- package/dist/src/util/editor/interactions/createPolygonInteraction.js +9 -3
- package/dist/src/util/editor/interactions/createPolygonInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/creationSnapping.d.ts +26 -0
- package/dist/src/util/editor/interactions/creationSnapping.js +139 -0
- package/dist/src/util/editor/interactions/creationSnapping.js.map +1 -0
- package/dist/src/util/editor/interactions/editFeaturesMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js +11 -9
- package/dist/src/util/editor/interactions/editGeometryMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/ensureHandlerSelectionInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.d.ts +3 -1
- package/dist/src/util/editor/interactions/insertVertexInteraction.js +14 -6
- package/dist/src/util/editor/interactions/insertVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/layerSnapping.d.ts +19 -0
- package/dist/src/util/editor/interactions/layerSnapping.js +87 -0
- package/dist/src/util/editor/interactions/layerSnapping.js.map +1 -0
- package/dist/src/util/editor/interactions/mapInteractionController.js.map +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.d.ts +1 -1
- package/dist/src/util/editor/interactions/removeVertexInteraction.js +2 -2
- package/dist/src/util/editor/interactions/removeVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/segmentLengthInteraction.d.ts +16 -0
- package/dist/src/util/editor/interactions/segmentLengthInteraction.js +167 -0
- package/dist/src/util/editor/interactions/segmentLengthInteraction.js.map +1 -0
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js +1 -1
- package/dist/src/util/editor/interactions/selectFeatureMouseOverInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.d.ts +1 -1
- package/dist/src/util/editor/interactions/selectMultiFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.d.ts +1 -1
- package/dist/src/util/editor/interactions/selectSingleFeatureInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translateVertexInteraction.js +4 -8
- package/dist/src/util/editor/interactions/translateVertexInteraction.js.map +1 -1
- package/dist/src/util/editor/interactions/translationSnapping.d.ts +25 -0
- package/dist/src/util/editor/interactions/translationSnapping.js +180 -0
- package/dist/src/util/editor/interactions/translationSnapping.js.map +1 -0
- package/dist/src/util/editor/selectFeaturesSession.js.map +1 -1
- package/dist/src/util/editor/snappingHelpers.d.ts +44 -0
- package/dist/src/util/editor/snappingHelpers.js +329 -0
- package/dist/src/util/editor/snappingHelpers.js.map +1 -0
- package/dist/src/util/editor/transformation/create2DHandlers.js +26 -26
- package/dist/src/util/editor/transformation/create2DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/create3DHandlers.js +65 -14
- package/dist/src/util/editor/transformation/create3DHandlers.js.map +1 -1
- package/dist/src/util/editor/transformation/extrudeInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/rotateInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/scaleInteraction.js +27 -5
- package/dist/src/util/editor/transformation/scaleInteraction.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationHandler.js +56 -38
- package/dist/src/util/editor/transformation/transformationHandler.js.map +1 -1
- package/dist/src/util/editor/transformation/transformationTypes.d.ts +2 -0
- package/dist/src/util/editor/transformation/transformationTypes.js +6 -2
- package/dist/src/util/editor/transformation/transformationTypes.js.map +1 -1
- package/dist/src/util/editor/transformation/translateInteraction.js.map +1 -1
- package/dist/src/util/editor/validateGeoemetry.js.map +1 -1
- package/dist/src/util/exclusiveManager.js.map +1 -1
- package/dist/src/util/extent.js.map +1 -1
- package/dist/src/util/featureconverter/arcToCesium.d.ts +5 -19
- package/dist/src/util/featureconverter/arcToCesium.js +15 -42
- package/dist/src/util/featureconverter/arcToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/circleToCesium.d.ts +2 -27
- package/dist/src/util/featureconverter/circleToCesium.js +85 -64
- package/dist/src/util/featureconverter/circleToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/clampedPrimitive.d.ts +2 -0
- package/dist/src/util/featureconverter/clampedPrimitive.js +29 -0
- package/dist/src/util/featureconverter/clampedPrimitive.js.map +1 -0
- package/dist/src/util/featureconverter/convert.d.ts +30 -7
- package/dist/src/util/featureconverter/convert.js +221 -44
- package/dist/src/util/featureconverter/convert.js.map +1 -1
- package/dist/src/util/featureconverter/extent3D.d.ts +4 -3
- package/dist/src/util/featureconverter/extent3D.js +4 -3
- package/dist/src/util/featureconverter/extent3D.js.map +1 -1
- package/dist/src/util/featureconverter/lineStringToCesium.d.ts +12 -27
- package/dist/src/util/featureconverter/lineStringToCesium.js +85 -107
- package/dist/src/util/featureconverter/lineStringToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/pointHelpers.d.ts +8 -11
- package/dist/src/util/featureconverter/pointHelpers.js +141 -121
- package/dist/src/util/featureconverter/pointHelpers.js.map +1 -1
- package/dist/src/util/featureconverter/pointToCesium.d.ts +14 -17
- package/dist/src/util/featureconverter/pointToCesium.js +50 -98
- package/dist/src/util/featureconverter/pointToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/polygonToCesium.d.ts +2 -26
- package/dist/src/util/featureconverter/polygonToCesium.js +63 -73
- package/dist/src/util/featureconverter/polygonToCesium.js.map +1 -1
- package/dist/src/util/featureconverter/storeyHelpers.d.ts +17 -0
- package/dist/src/util/featureconverter/storeyHelpers.js +78 -0
- package/dist/src/util/featureconverter/storeyHelpers.js.map +1 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.d.ts +54 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.js +278 -0
- package/dist/src/util/featureconverter/vectorGeometryFactory.js.map +1 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.d.ts +86 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js +240 -0
- package/dist/src/util/featureconverter/vectorHeightInfo.js.map +1 -0
- package/dist/src/util/fetch.js.map +1 -1
- package/dist/src/util/flight/flightAnchor.js.map +1 -1
- package/dist/src/util/flight/flightCollection.js.map +1 -1
- package/dist/src/util/flight/flightHelpers.js.map +1 -1
- package/dist/src/util/flight/flightInstance.js.map +1 -1
- package/dist/src/util/flight/flightPlayer.d.ts +11 -6
- package/dist/src/util/flight/flightPlayer.js +52 -16
- package/dist/src/util/flight/flightPlayer.js.map +1 -1
- package/dist/src/util/flight/flightVisualizer.js.map +1 -1
- package/dist/src/util/geometryHelpers.d.ts +34 -2
- package/dist/src/util/geometryHelpers.js +172 -4
- package/dist/src/util/geometryHelpers.js.map +1 -1
- package/dist/src/util/hiddenObjects.js.map +1 -1
- package/dist/src/util/indexedCollection.js.map +1 -1
- package/dist/src/util/layerCollection.js.map +1 -1
- package/dist/src/util/locale.js.map +1 -1
- package/dist/src/util/mapCollection.js.map +1 -1
- package/dist/src/util/math.d.ts +18 -2
- package/dist/src/util/math.js +55 -12
- package/dist/src/util/math.js.map +1 -1
- package/dist/src/util/overrideCollection.d.ts +7 -7
- package/dist/src/util/overrideCollection.js +10 -7
- package/dist/src/util/overrideCollection.js.map +1 -1
- package/dist/src/util/projection.js.map +1 -1
- package/dist/src/util/urlHelpers.js.map +1 -1
- package/dist/src/util/viewpoint.js.map +1 -1
- package/dist/src/vcsApp.d.ts +3 -3
- package/dist/src/vcsApp.js +1 -0
- package/dist/src/vcsApp.js.map +1 -1
- package/dist/src/vcsEvent.js.map +1 -1
- package/dist/src/vcsModule.js.map +1 -1
- package/dist/src/vcsModuleHelpers.d.ts +1 -0
- package/dist/src/vcsModuleHelpers.js +16 -2
- package/dist/src/vcsModuleHelpers.js.map +1 -1
- package/dist/src/vcsObject.js.map +1 -1
- package/dist/tests/unit/helpers/cesiumHelpers.d.ts +11 -11
- package/dist/tests/unit/helpers/cesiumHelpers.js +6 -1
- package/dist/tests/unit/helpers/cesiumHelpers.js.map +1 -1
- package/dist/tests/unit/helpers/helpers.d.ts +2 -9
- package/dist/tests/unit/helpers/helpers.js +4 -10
- package/dist/tests/unit/helpers/helpers.js.map +1 -1
- package/dist/tests/unit/helpers/importJSON.js.map +1 -1
- package/dist/tests/unit/helpers/obliqueHelpers.js.map +1 -1
- package/index.ts +84 -36
- package/package.json +21 -21
- package/src/category/category.ts +11 -9
- package/src/category/categoryCollection.ts +1 -1
- package/src/cesium/cesium.d.ts +12 -0
- package/src/cesium/cesiumVcsCameraPrimitive.ts +5 -0
- package/src/classRegistry.ts +7 -4
- package/src/featureProvider/wmsFeatureProvider.ts +1 -1
- package/src/global.d.ts +6 -1
- package/src/interaction/featureAtPixelInteraction.ts +7 -26
- package/src/layer/cesium/clusterContext.ts +97 -93
- package/src/layer/cesium/vectorCesiumImpl.ts +17 -11
- package/src/layer/cesium/vectorContext.ts +229 -348
- package/src/layer/featureVisibility.ts +3 -6
- package/src/layer/geojsonHelpers.ts +9 -12
- package/src/layer/oblique/obliqueHelpers.ts +9 -9
- package/src/layer/oblique/vectorObliqueImpl.ts +2 -2
- package/src/layer/openlayers/vectorOpenlayersImpl.ts +2 -2
- package/src/layer/openlayers/vectorTileOpenlayersImpl.ts +23 -53
- package/src/layer/tileLoadedHelper.ts +1 -3
- package/src/layer/tileProvider/mvtTileProvider.ts +2 -2
- package/src/layer/vectorLayer.ts +1 -74
- package/src/layer/vectorProperties.ts +80 -16
- package/src/map/baseOLMap.ts +1 -1
- package/src/oblique/helpers.ts +11 -5
- package/src/oblique/obliqueDataSet.ts +4 -4
- package/src/ol/geom/geometryCollection.js +96 -6
- package/src/ol/ol.d.ts +15 -2
- package/src/overrideClassRegistry.ts +13 -7
- package/src/style/arcStyle.ts +1 -0
- package/src/style/arrowStyle.ts +7 -7
- package/src/style/declarativeStyleItem.ts +2 -2
- package/src/style/styleHelpers.ts +15 -13
- package/src/style/vectorStyleItem.ts +14 -14
- package/src/util/clipping/clippingObject.ts +1 -3
- package/src/util/clipping/clippingPlaneHelper.ts +3 -4
- package/src/util/displayQuality/displayQuality.ts +13 -1
- package/src/util/editor/createFeatureSession.ts +107 -13
- package/src/util/editor/editFeaturesSession.ts +105 -39
- package/src/util/editor/editGeometrySession.ts +157 -83
- package/src/util/editor/editorHelpers.ts +85 -33
- package/src/util/editor/editorSessionHelpers.ts +13 -20
- package/src/util/editor/editorSymbols.ts +1 -1
- package/src/util/editor/interactions/createBBoxInteraction.ts +25 -16
- package/src/util/editor/interactions/createCircleInteraction.ts +1 -1
- package/src/util/editor/interactions/createLineStringInteraction.ts +9 -3
- package/src/util/editor/interactions/createPointInteraction.ts +1 -1
- package/src/util/editor/interactions/createPolygonInteraction.ts +16 -3
- package/src/util/editor/interactions/creationSnapping.ts +226 -0
- package/src/util/editor/interactions/editGeometryMouseOverInteraction.ts +7 -6
- package/src/util/editor/interactions/insertVertexInteraction.ts +27 -7
- package/src/util/editor/interactions/layerSnapping.ts +136 -0
- package/src/util/editor/interactions/removeVertexInteraction.ts +3 -4
- package/src/util/editor/interactions/segmentLengthInteraction.ts +227 -0
- package/src/util/editor/interactions/translateVertexInteraction.ts +11 -12
- package/src/util/editor/interactions/translationSnapping.ts +302 -0
- package/src/util/editor/snappingHelpers.ts +490 -0
- package/src/util/editor/transformation/create2DHandlers.ts +38 -26
- package/src/util/editor/transformation/create3DHandlers.ts +84 -22
- package/src/util/editor/transformation/scaleInteraction.ts +28 -5
- package/src/util/editor/transformation/transformationHandler.ts +72 -41
- package/src/util/editor/transformation/transformationTypes.ts +5 -0
- package/src/util/featureconverter/arcToCesium.ts +25 -95
- package/src/util/featureconverter/circleToCesium.ts +128 -114
- package/src/util/featureconverter/clampedPrimitive.ts +70 -0
- package/src/util/featureconverter/convert.ts +447 -113
- package/src/util/featureconverter/extent3D.ts +13 -6
- package/src/util/featureconverter/lineStringToCesium.ts +134 -181
- package/src/util/featureconverter/pointHelpers.ts +285 -219
- package/src/util/featureconverter/pointToCesium.ts +117 -177
- package/src/util/featureconverter/polygonToCesium.ts +99 -118
- package/src/util/featureconverter/storeyHelpers.ts +104 -0
- package/src/util/featureconverter/vectorGeometryFactory.ts +601 -0
- package/src/util/featureconverter/vectorHeightInfo.ts +392 -0
- package/src/util/flight/flightPlayer.ts +64 -22
- package/src/util/geometryHelpers.ts +239 -9
- package/src/util/hiddenObjects.ts +4 -4
- package/src/util/math.ts +87 -12
- package/src/util/overrideCollection.ts +33 -21
- package/src/vcsApp.ts +11 -4
- package/src/vcsModuleHelpers.ts +25 -2
- package/dist/src/util/featureconverter/featureconverterHelper.d.ts +0 -35
- package/dist/src/util/featureconverter/featureconverterHelper.js +0 -403
- package/dist/src/util/featureconverter/featureconverterHelper.js.map +0 -1
- package/src/util/featureconverter/featureconverterHelper.ts +0 -668
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Feature } from 'ol';
|
|
2
|
+
import VectorSource from 'ol/source/Vector.js';
|
|
3
|
+
import AbstractInteraction from '../../../interaction/abstractInteraction.js';
|
|
4
|
+
import {
|
|
5
|
+
EventType,
|
|
6
|
+
ModificationKeyType,
|
|
7
|
+
} from '../../../interaction/interactionType.js';
|
|
8
|
+
import VectorLayer from '../../../layer/vectorLayer.js';
|
|
9
|
+
import { originalFeatureSymbol } from '../../../layer/vectorSymbols.js';
|
|
10
|
+
import ObliqueMap from '../../../map/obliqueMap.js';
|
|
11
|
+
import type VectorObliqueImpl from '../../../layer/oblique/vectorObliqueImpl.js';
|
|
12
|
+
import {
|
|
13
|
+
alreadySnapped,
|
|
14
|
+
SnappingInteractionEvent,
|
|
15
|
+
} from '../editorSessionHelpers.js';
|
|
16
|
+
import {
|
|
17
|
+
setSnappingFeatures,
|
|
18
|
+
getGeometrySnapResult,
|
|
19
|
+
SnapType,
|
|
20
|
+
} from '../snappingHelpers.js';
|
|
21
|
+
|
|
22
|
+
export default class LayerSnapping extends AbstractInteraction {
|
|
23
|
+
layers: VectorLayer[];
|
|
24
|
+
|
|
25
|
+
private _scratchLayer: VectorLayer;
|
|
26
|
+
|
|
27
|
+
private _removeFeatures: (() => void) | undefined;
|
|
28
|
+
|
|
29
|
+
private _filter: (f: Feature) => boolean;
|
|
30
|
+
|
|
31
|
+
private _snapToVertex = true;
|
|
32
|
+
|
|
33
|
+
private _snapToEdge = true;
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
layers: VectorLayer[],
|
|
37
|
+
scratchLayer: VectorLayer,
|
|
38
|
+
filter: (f: Feature) => boolean,
|
|
39
|
+
snapTo: SnapType[] = ['vertex', 'edge'],
|
|
40
|
+
type: EventType = EventType.CLICKMOVE | EventType.DBLCLICK,
|
|
41
|
+
) {
|
|
42
|
+
super(type, ModificationKeyType.NONE | ModificationKeyType.CTRL);
|
|
43
|
+
|
|
44
|
+
this.layers = layers;
|
|
45
|
+
this._scratchLayer = scratchLayer;
|
|
46
|
+
this._filter = filter;
|
|
47
|
+
this.snapTo = snapTo;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get snapTo(): SnapType[] {
|
|
51
|
+
const snapTo: SnapType[] = [];
|
|
52
|
+
if (this._snapToVertex) {
|
|
53
|
+
snapTo.push('vertex');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (this._snapToEdge) {
|
|
57
|
+
snapTo.push('edge');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return snapTo;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
set snapTo(snapTo: SnapType[]) {
|
|
64
|
+
this._snapToVertex = snapTo.includes('vertex');
|
|
65
|
+
this._snapToEdge = snapTo.includes('edge');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
pipe(event: SnappingInteractionEvent): Promise<SnappingInteractionEvent> {
|
|
69
|
+
this._removeFeatures?.();
|
|
70
|
+
if (event.key !== ModificationKeyType.CTRL) {
|
|
71
|
+
const coordinate = event.positionOrPixel!;
|
|
72
|
+
const bufferDistance = event.map.getCurrentResolution(coordinate) * 12;
|
|
73
|
+
const maxDistanceSquared = bufferDistance ** 2;
|
|
74
|
+
|
|
75
|
+
const isOblique = event.map instanceof ObliqueMap;
|
|
76
|
+
|
|
77
|
+
const geometries = this.layers
|
|
78
|
+
.flatMap((layer) => {
|
|
79
|
+
let source: VectorSource;
|
|
80
|
+
|
|
81
|
+
if (isOblique) {
|
|
82
|
+
source = (
|
|
83
|
+
layer.getImplementationsForMap(event.map)[0] as VectorObliqueImpl
|
|
84
|
+
)
|
|
85
|
+
.getOLLayer()
|
|
86
|
+
.getSource() as VectorSource;
|
|
87
|
+
} else {
|
|
88
|
+
source = layer.getSource();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return source.getFeaturesInExtent([
|
|
92
|
+
coordinate[0] - bufferDistance,
|
|
93
|
+
coordinate[1] - bufferDistance,
|
|
94
|
+
coordinate[0] + bufferDistance,
|
|
95
|
+
coordinate[1] + bufferDistance,
|
|
96
|
+
]);
|
|
97
|
+
})
|
|
98
|
+
.filter((feature) => {
|
|
99
|
+
const originalFeature = feature[originalFeatureSymbol] ?? feature;
|
|
100
|
+
return this._filter(originalFeature);
|
|
101
|
+
})
|
|
102
|
+
.map((f) => f.getGeometry()!);
|
|
103
|
+
|
|
104
|
+
const result = getGeometrySnapResult(
|
|
105
|
+
geometries,
|
|
106
|
+
coordinate,
|
|
107
|
+
maxDistanceSquared,
|
|
108
|
+
this._snapToVertex,
|
|
109
|
+
this._snapToEdge,
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
if (result) {
|
|
113
|
+
const closest = result.snapped;
|
|
114
|
+
if (coordinate.length > closest.length) {
|
|
115
|
+
closest[2] = coordinate[2];
|
|
116
|
+
} else if (coordinate.length < closest.length) {
|
|
117
|
+
closest.pop();
|
|
118
|
+
}
|
|
119
|
+
event.positionOrPixel = closest;
|
|
120
|
+
event[alreadySnapped] = true;
|
|
121
|
+
this._removeFeatures = setSnappingFeatures(
|
|
122
|
+
[result],
|
|
123
|
+
[result.snapped],
|
|
124
|
+
this._scratchLayer,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return Promise.resolve(event);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
destroy(): void {
|
|
132
|
+
this._removeFeatures?.();
|
|
133
|
+
this.layers = [];
|
|
134
|
+
super.destroy();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -5,9 +5,8 @@ import {
|
|
|
5
5
|
EventType,
|
|
6
6
|
ModificationKeyType,
|
|
7
7
|
} from '../../../interaction/interactionType.js';
|
|
8
|
-
import { vertexSymbol } from '../editorSymbols.js';
|
|
9
8
|
import VcsEvent from '../../../vcsEvent.js';
|
|
10
|
-
import
|
|
9
|
+
import { isVertex, Vertex } from '../editorHelpers.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* This interaction will raise the passed in event for each feature clicked with the vertex symbol
|
|
@@ -22,8 +21,8 @@ class RemoveVertexInteraction extends AbstractInteraction {
|
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
pipe(event: EventAfterEventHandler): Promise<EventAfterEventHandler> {
|
|
25
|
-
if (
|
|
26
|
-
this.vertexRemoved.raiseEvent(event.feature
|
|
24
|
+
if (isVertex(event.feature)) {
|
|
25
|
+
this.vertexRemoved.raiseEvent(event.feature);
|
|
27
26
|
}
|
|
28
27
|
return Promise.resolve(event);
|
|
29
28
|
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Circle, LineString, Point, Polygon } from 'ol/geom.js';
|
|
2
|
+
import type { Coordinate } from 'ol/coordinate.js';
|
|
3
|
+
import { Style, Text as OLText } from 'ol/style.js';
|
|
4
|
+
import { Feature } from 'ol';
|
|
5
|
+
import { HeightReference } from '@vcmap-cesium/engine';
|
|
6
|
+
import AbstractInteraction, {
|
|
7
|
+
InteractionEvent,
|
|
8
|
+
} from '../../../interaction/abstractInteraction.js';
|
|
9
|
+
import {
|
|
10
|
+
EventType,
|
|
11
|
+
ModificationKeyType,
|
|
12
|
+
} from '../../../interaction/interactionType.js';
|
|
13
|
+
import { isVertex } from '../editorHelpers.js';
|
|
14
|
+
import { vertexIndexSymbol } from '../editorSymbols.js';
|
|
15
|
+
import type VectorLayer from '../../../layer/vectorLayer.js';
|
|
16
|
+
import { is2DLayout } from '../../geometryHelpers.js';
|
|
17
|
+
|
|
18
|
+
import { ecef3DDistance, getMidPoint, spherical2Distance } from '../../math.js';
|
|
19
|
+
import { validityPlaceholder } from './createPolygonInteraction.js';
|
|
20
|
+
import { createSync } from '../../../layer/vectorSymbols.js';
|
|
21
|
+
|
|
22
|
+
type Segment = [Coordinate, Coordinate];
|
|
23
|
+
|
|
24
|
+
function getSegmentForCoordinateIndex(
|
|
25
|
+
geometry: LineString | Polygon | Circle,
|
|
26
|
+
index: number,
|
|
27
|
+
): Segment[] {
|
|
28
|
+
if (geometry instanceof Circle) {
|
|
29
|
+
return [geometry.getCoordinates() as Segment];
|
|
30
|
+
}
|
|
31
|
+
const flats = geometry.getFlatCoordinates();
|
|
32
|
+
let end;
|
|
33
|
+
let isPolygon = false;
|
|
34
|
+
if (geometry instanceof Polygon) {
|
|
35
|
+
isPolygon = true;
|
|
36
|
+
end = geometry.getEnds()[0];
|
|
37
|
+
} else {
|
|
38
|
+
end = flats.length;
|
|
39
|
+
}
|
|
40
|
+
const stride = geometry.getStride();
|
|
41
|
+
const layout = geometry.getLayout();
|
|
42
|
+
|
|
43
|
+
if (flats.length < stride * 2) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let flatIndex = Math.round(index * stride);
|
|
48
|
+
if (index === -1) {
|
|
49
|
+
flatIndex = end - stride;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (flats.length < flatIndex + stride) {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const previousIndex = index === 0 ? stride : flatIndex - stride;
|
|
57
|
+
let nextIndex;
|
|
58
|
+
|
|
59
|
+
if (isPolygon && !(geometry as Polygon)[validityPlaceholder]) {
|
|
60
|
+
if (flatIndex === 0) {
|
|
61
|
+
nextIndex = end - stride;
|
|
62
|
+
} else if (flatIndex + stride === end) {
|
|
63
|
+
nextIndex = 0;
|
|
64
|
+
} else {
|
|
65
|
+
nextIndex = flatIndex + stride;
|
|
66
|
+
}
|
|
67
|
+
} else if (flatIndex > 0 && flatIndex + stride < end) {
|
|
68
|
+
nextIndex = flatIndex + stride;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const getCoordinateFromIndex = is2DLayout(layout)
|
|
72
|
+
? (i: number): Coordinate => {
|
|
73
|
+
return [flats[i], flats[i + 1]];
|
|
74
|
+
}
|
|
75
|
+
: (i: number): Coordinate => {
|
|
76
|
+
return [flats[i], flats[i + 1], flats[i + 2]];
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const segments: Segment[] = [
|
|
80
|
+
[getCoordinateFromIndex(flatIndex), getCoordinateFromIndex(previousIndex)],
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
if (nextIndex != null && flats.length >= nextIndex + stride) {
|
|
84
|
+
segments.push([
|
|
85
|
+
getCoordinateFromIndex(flatIndex),
|
|
86
|
+
getCoordinateFromIndex(nextIndex),
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return segments;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function createSegmentsLabels(
|
|
94
|
+
segments: Segment[],
|
|
95
|
+
layer: VectorLayer,
|
|
96
|
+
is3D: boolean,
|
|
97
|
+
): () => void {
|
|
98
|
+
const features = segments.map((segment) => {
|
|
99
|
+
const midPoint = getMidPoint(segment[0], segment[1]);
|
|
100
|
+
const feature = new Feature({
|
|
101
|
+
geometry: new Point(midPoint),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const segmentLength = is3D
|
|
105
|
+
? ecef3DDistance(segment[0], segment[1])
|
|
106
|
+
: spherical2Distance(segment[0], segment[1]);
|
|
107
|
+
|
|
108
|
+
feature.setStyle(
|
|
109
|
+
new Style({
|
|
110
|
+
text: new OLText({
|
|
111
|
+
text: `${segmentLength.toFixed(2)} m`,
|
|
112
|
+
font: '16px Helvetica, sans-serif',
|
|
113
|
+
}),
|
|
114
|
+
}),
|
|
115
|
+
);
|
|
116
|
+
feature[createSync] = true;
|
|
117
|
+
|
|
118
|
+
return feature;
|
|
119
|
+
});
|
|
120
|
+
layer.addFeatures(features);
|
|
121
|
+
|
|
122
|
+
return () => {
|
|
123
|
+
layer.removeFeaturesById(features.map((f) => f.getId()!));
|
|
124
|
+
features.splice(0);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function createSegmentGeometry(
|
|
129
|
+
segment: Segment,
|
|
130
|
+
layer: VectorLayer,
|
|
131
|
+
): () => void {
|
|
132
|
+
const feature = new Feature({
|
|
133
|
+
geometry: new LineString(segment),
|
|
134
|
+
});
|
|
135
|
+
feature[createSync] = true;
|
|
136
|
+
|
|
137
|
+
const features = [feature];
|
|
138
|
+
layer.addFeatures(features);
|
|
139
|
+
|
|
140
|
+
return () => {
|
|
141
|
+
layer.removeFeaturesById(features.map((f) => f.getId()!));
|
|
142
|
+
features.splice(0);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export default class SegmentLengthInteraction extends AbstractInteraction {
|
|
147
|
+
private _scratchLayer: VectorLayer;
|
|
148
|
+
|
|
149
|
+
private _geometry: Polygon | LineString | Circle | undefined;
|
|
150
|
+
|
|
151
|
+
private _isCircle = false;
|
|
152
|
+
|
|
153
|
+
// eslint-disable-next-line class-methods-use-this
|
|
154
|
+
private _removeLabels = (): void => {};
|
|
155
|
+
|
|
156
|
+
// eslint-disable-next-line class-methods-use-this
|
|
157
|
+
private _vectorPropertiesListener = (): void => {};
|
|
158
|
+
|
|
159
|
+
private _is3D = false;
|
|
160
|
+
|
|
161
|
+
creation: boolean;
|
|
162
|
+
|
|
163
|
+
constructor(scratchLayer: VectorLayer, creation: boolean) {
|
|
164
|
+
super(
|
|
165
|
+
creation ? EventType.MOVE : EventType.DRAGEVENTS,
|
|
166
|
+
ModificationKeyType.CTRL | ModificationKeyType.NONE,
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
this._scratchLayer = scratchLayer;
|
|
170
|
+
this._is3D =
|
|
171
|
+
scratchLayer.vectorProperties.altitudeMode === HeightReference.NONE;
|
|
172
|
+
this._vectorPropertiesListener =
|
|
173
|
+
scratchLayer.vectorProperties.propertyChanged.addEventListener(() => {
|
|
174
|
+
this._is3D =
|
|
175
|
+
scratchLayer.vectorProperties.altitudeMode === HeightReference.NONE;
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
this.creation = creation;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
pipe(event: InteractionEvent): Promise<InteractionEvent> {
|
|
182
|
+
this._removeLabels();
|
|
183
|
+
|
|
184
|
+
if (this._geometry) {
|
|
185
|
+
let index: number | undefined;
|
|
186
|
+
if (this.creation) {
|
|
187
|
+
index = -1;
|
|
188
|
+
} else if (isVertex(event.feature)) {
|
|
189
|
+
index = event.feature[vertexIndexSymbol];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (index != null) {
|
|
193
|
+
const segments = getSegmentForCoordinateIndex(this._geometry, index);
|
|
194
|
+
let removeLabels = createSegmentsLabels(
|
|
195
|
+
segments,
|
|
196
|
+
this._scratchLayer,
|
|
197
|
+
this._is3D,
|
|
198
|
+
);
|
|
199
|
+
if (this._isCircle) {
|
|
200
|
+
const removeTextLabels = removeLabels;
|
|
201
|
+
const removeSegment = createSegmentGeometry(
|
|
202
|
+
segments[0],
|
|
203
|
+
this._scratchLayer,
|
|
204
|
+
);
|
|
205
|
+
removeLabels = (): void => {
|
|
206
|
+
removeTextLabels();
|
|
207
|
+
removeSegment();
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
this._removeLabels = removeLabels;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return Promise.resolve(event);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
setGeometry(geometry: LineString | Polygon | Circle): void {
|
|
218
|
+
this._geometry = geometry;
|
|
219
|
+
this._isCircle = geometry instanceof Circle;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
destroy(): void {
|
|
223
|
+
this._removeLabels();
|
|
224
|
+
this._vectorPropertiesListener();
|
|
225
|
+
super.destroy();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -2,10 +2,12 @@ import Feature from 'ol/Feature.js';
|
|
|
2
2
|
import AbstractInteraction, {
|
|
3
3
|
EventAfterEventHandler,
|
|
4
4
|
} from '../../../interaction/abstractInteraction.js';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import {
|
|
6
|
+
EventType,
|
|
7
|
+
ModificationKeyType,
|
|
8
|
+
} from '../../../interaction/interactionType.js';
|
|
7
9
|
import VcsEvent from '../../../vcsEvent.js';
|
|
8
|
-
import { Vertex } from '../editorHelpers.js';
|
|
10
|
+
import { isVertex, Vertex } from '../editorHelpers.js';
|
|
9
11
|
import { emptyStyle } from '../../../style/styleHelpers.js';
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -20,7 +22,10 @@ class TranslateVertexInteraction extends AbstractInteraction {
|
|
|
20
22
|
private _feature: Feature;
|
|
21
23
|
|
|
22
24
|
constructor(feature: Feature) {
|
|
23
|
-
super(
|
|
25
|
+
super(
|
|
26
|
+
EventType.DRAGEVENTS,
|
|
27
|
+
ModificationKeyType.NONE | ModificationKeyType.CTRL,
|
|
28
|
+
);
|
|
24
29
|
this._feature = feature;
|
|
25
30
|
this.setActive();
|
|
26
31
|
}
|
|
@@ -36,17 +41,11 @@ class TranslateVertexInteraction extends AbstractInteraction {
|
|
|
36
41
|
this._vertex.setStyle(undefined);
|
|
37
42
|
this._vertex = null;
|
|
38
43
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
event.type & EventType.DRAGSTART &&
|
|
42
|
-
event.feature &&
|
|
43
|
-
(event.feature as Vertex)[vertexSymbol]
|
|
44
|
-
) {
|
|
45
|
-
this._vertex = event.feature as Vertex;
|
|
44
|
+
} else if (event.type & EventType.DRAGSTART && isVertex(event.feature)) {
|
|
45
|
+
this._vertex = event.feature;
|
|
46
46
|
this._vertex.set('olcs_allowPicking', false);
|
|
47
47
|
this._feature.set('olcs_allowPicking', false);
|
|
48
48
|
this._vertex.setStyle(emptyStyle);
|
|
49
|
-
event.stopPropagation = true;
|
|
50
49
|
}
|
|
51
50
|
return Promise.resolve(event);
|
|
52
51
|
}
|