@mapxus/mapxus-visual-jp 1.8.1 → 1.9.0
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/bitbucket-pipelines.yml +50 -0
- package/config/rollup.js +33 -0
- package/config/rollup.serve.config.js +3 -0
- package/debug/circlemarker.html +444 -0
- package/debug/create_tags.html +474 -0
- package/debug/distance.html +220 -0
- package/debug/index.html +92 -0
- package/debug/integration.html +1084 -0
- package/debug/leaflet.html +54 -0
- package/debug/markers.html +115 -0
- package/debug/multi_monitor_sync.html +377 -0
- package/debug/outdoor.html +1026 -0
- package/debug/rect_tags.html +147 -0
- package/debug/rotate.html +236 -0
- package/debug/sample.html +324 -0
- package/debug/sequence.html +75 -0
- package/debug/tags.html +218 -0
- package/package.json +34 -10
- package/rollup.config.js +39 -0
- package/server.js +35 -0
- package/spec/api/APIv3.spec.ts +86 -0
- package/spec/component/Component.spec.ts +68 -0
- package/spec/component/StatsComponent.spec.ts +33 -0
- package/spec/component/direction/DirectionComponent.spec.ts +163 -0
- package/spec/component/direction/DirectionDOMRenderer.spec.ts +233 -0
- package/spec/component/keyboard/KeyZoomHandler.spec.ts +236 -0
- package/spec/component/marker/Marker.spec.ts +104 -0
- package/spec/component/marker/MarkerComponent.spec.ts +88 -0
- package/spec/component/marker/MarkerScene.spec.ts +223 -0
- package/spec/component/marker/MarkerSet.spec.ts +453 -0
- package/spec/component/mouse/DoubleClickZoomHandler.spec.ts +211 -0
- package/spec/component/popup/Popup.spec.ts +479 -0
- package/spec/component/popup/PopupComponent.spec.ts +414 -0
- package/spec/component/tag/CreateHandlerBase.spec.ts +83 -0
- package/spec/component/tag/CreatePointHandler.spec.ts +190 -0
- package/spec/component/tag/OutlineRenderTag.spec.ts +91 -0
- package/spec/component/tag/PointGeometry.spec.ts +131 -0
- package/spec/component/tag/PolygonGeometry.spec.ts +497 -0
- package/spec/component/tag/RectGeometry.spec.ts +1157 -0
- package/spec/component/tag/TagComponent.spec.ts +513 -0
- package/spec/component/tag/TagScene.spec.ts +346 -0
- package/spec/component/tag/TagSet.spec.ts +241 -0
- package/spec/component/utils/HandlerBase.spec.ts +203 -0
- package/spec/geo/Camera.spec.ts +250 -0
- package/spec/geo/GeoCoords.spec.ts +364 -0
- package/spec/geo/Spatial.spec.ts +711 -0
- package/spec/geo/Transform.spec.ts +850 -0
- package/spec/geo/ViewportCoords.spec.ts +534 -0
- package/spec/graph/FilterCreator.spec.ts +892 -0
- package/spec/graph/Graph.spec.ts +2078 -0
- package/spec/graph/GraphCalculator.spec.ts +263 -0
- package/spec/graph/GraphService.spec.ts +663 -0
- package/spec/graph/Node.spec.ts +373 -0
- package/spec/graph/NodeCache.spec.ts +206 -0
- package/spec/graph/Sequence.spec.ts +37 -0
- package/spec/graph/edge/EdgeCalculator.Pano.spec.ts +963 -0
- package/spec/graph/edge/EdgeCalculator.Sequence.spec.ts +108 -0
- package/spec/graph/edge/EdgeCalculator.Similar.spec.ts +272 -0
- package/spec/graph/edge/EdgeCalculator.Step.spec.ts +383 -0
- package/spec/graph/edge/EdgeCalculator.Turn.spec.ts +278 -0
- package/spec/graph/edge/EdgeCalculator.spec.ts +747 -0
- package/spec/helper/ContainerMockCreator.spec.ts +33 -0
- package/spec/helper/DOMRendererMockCreator.spec.ts +22 -0
- package/spec/helper/EdgeCalculatorHelper.spec.ts +96 -0
- package/spec/helper/EventHelper.spec.ts +92 -0
- package/spec/helper/GLRendererMockCreator.spec.ts +23 -0
- package/spec/helper/GeoHelper.spec.ts +16 -0
- package/spec/helper/ImageLoadingServiceMockCreator.spec.ts +24 -0
- package/spec/helper/KeyboardServiceMockCreator.spec.ts +21 -0
- package/spec/helper/LoadingServiceMockCreator.spec.ts +21 -0
- package/spec/helper/MockCreator.spec.ts +18 -0
- package/spec/helper/MockCreatorBase.spec.ts +17 -0
- package/spec/helper/MouseServiceMockCreator.spec.ts +38 -0
- package/spec/helper/NavigatorMockCreator.spec.ts +28 -0
- package/spec/helper/NodeHelper.spec.ts +77 -0
- package/spec/helper/NodeMockCreator.spec.ts +19 -0
- package/spec/helper/RenderServiceMockCreator.spec.ts +25 -0
- package/spec/helper/SpriteServiceMockCreator.spec.ts +22 -0
- package/spec/helper/StateServiceMockCreator.spec.ts +33 -0
- package/spec/helper/TouchServiceMockCreator.spec.ts +29 -0
- package/spec/helper/TransformHelper.spec.ts +17 -0
- package/spec/render/DOMRenderer.spec.ts +112 -0
- package/spec/render/GLRenderer.spec.ts +453 -0
- package/spec/render/RenderCamera.spec.ts +535 -0
- package/spec/render/RenderService.spec.ts +531 -0
- package/spec/state/StateBase.spec.ts +369 -0
- package/spec/state/StateService.spec.ts +9 -0
- package/spec/state/TraversingState.spec.ts +262 -0
- package/spec/state/WaitingState.spec.ts +319 -0
- package/spec/tiles/TextureProvider.spec.ts +653 -0
- package/spec/utils/EventEmitter.spec.ts +71 -0
- package/spec/utils/Support.spec.ts +54 -0
- package/spec/viewer/CacheService.spec.ts +160 -0
- package/spec/viewer/ComponentController.spec.ts +310 -0
- package/spec/viewer/LoadingService.spec.ts +19 -0
- package/spec/viewer/MouseService.spec.ts +1344 -0
- package/spec/viewer/Navigator.spec.ts +970 -0
- package/spec/viewer/Observer.spec.ts +96 -0
- package/spec/viewer/SpriteService.spec.ts +224 -0
- package/src/API.ts +3 -0
- package/src/Component.ts +77 -0
- package/src/Edge.ts +6 -0
- package/src/Error.ts +3 -0
- package/src/FilterRender.ts +27 -0
- package/src/Geo.ts +7 -0
- package/src/Graph.ts +19 -0
- package/src/MapxusVisual.ts +66 -0
- package/src/Render.ts +7 -0
- package/src/State.ts +8 -0
- package/src/Support.ts +35 -0
- package/src/Tiles.ts +5 -0
- package/src/Utils.ts +6 -0
- package/src/Viewer.ts +16 -0
- package/src/api/API.ts +396 -0
- package/src/api/Auth.ts +76 -0
- package/src/api/AuthStore.ts +11 -0
- package/src/api/GraphQLCreator.ts +100 -0
- package/src/api/interfaces/IAuth.ts +7 -0
- package/src/api/interfaces/IBuildingBase.ts +7 -0
- package/src/api/interfaces/IBuildingInfo.ts +19 -0
- package/src/api/interfaces/ICoreNode.ts +28 -0
- package/src/api/interfaces/IFillNode.ts +96 -0
- package/src/api/interfaces/IFloorInfo.ts +10 -0
- package/src/api/interfaces/IFullNode.ts +10 -0
- package/src/api/interfaces/IGPano.ts +38 -0
- package/src/api/interfaces/IImageTagInfo.ts +14 -0
- package/src/api/interfaces/IKey.ts +13 -0
- package/src/api/interfaces/ILatLon.ts +19 -0
- package/src/api/interfaces/IOutdoor.ts +14 -0
- package/src/api/interfaces/IPathNode.ts +37 -0
- package/src/api/interfaces/IProject.ts +8 -0
- package/src/api/interfaces/IQueryBuilding.ts +37 -0
- package/src/api/interfaces/IResponse.ts +7 -0
- package/src/api/interfaces/ISequence.ts +16 -0
- package/src/api/interfaces/IUser.ts +13 -0
- package/src/api/interfaces/interfaces.ts +17 -0
- package/src/component/AttributionComponent.ts +48 -0
- package/src/component/BackgroundComponent.ts +39 -0
- package/src/component/BearingComponent.ts +282 -0
- package/src/component/CacheComponent.ts +295 -0
- package/src/component/Component.ts +130 -0
- package/src/component/ComponentService.ts +150 -0
- package/src/component/CoverComponent.ts +132 -0
- package/src/component/DebugComponent.ts +157 -0
- package/src/component/ImageComponent.ts +96 -0
- package/src/component/LoadingComponent.ts +85 -0
- package/src/component/NavigationComponent.ts +233 -0
- package/src/component/RouteComponent.ts +354 -0
- package/src/component/StatsComponent.ts +100 -0
- package/src/component/direction/DirectionComponent.ts +254 -0
- package/src/component/direction/DirectionDOMCalculator.ts +243 -0
- package/src/component/direction/DirectionDOMRenderer.ts +631 -0
- package/src/component/imageplane/ImagePlaneComponent.ts +497 -0
- package/src/component/imageplane/ImagePlaneFactory.ts +314 -0
- package/src/component/imageplane/ImagePlaneGLRenderer.ts +247 -0
- package/src/component/imageplane/ImagePlaneScene.ts +87 -0
- package/src/component/imageplane/ImagePlaneShaders.ts +16 -0
- package/src/component/imageplane/SliderComponent.ts +697 -0
- package/src/component/imageplane/interfaces/IBBoxShaderMaterial.ts +10 -0
- package/src/component/imageplane/interfaces/IShaderMaterial.ts +9 -0
- package/src/component/imageplane/interfaces/interfaces.ts +2 -0
- package/src/component/imageplane/shaders/equirectangular.fragment.glsl.ts +26 -0
- package/src/component/imageplane/shaders/equirectangular.vertex.glsl.ts +15 -0
- package/src/component/imageplane/shaders/perspective.fragment.glsl.ts +27 -0
- package/src/component/imageplane/shaders/perspective.vertex.glsl.ts +15 -0
- package/src/component/interfaces/ICacheConfiguration.ts +72 -0
- package/src/component/interfaces/IComponentConfiguration.ts +5 -0
- package/src/component/interfaces/ICoverConfiguration.ts +15 -0
- package/src/component/interfaces/IDirectionConfiguration.ts +63 -0
- package/src/component/interfaces/IImagePlaneConfiguration.ts +17 -0
- package/src/component/interfaces/IKeyboardConfiguration.ts +44 -0
- package/src/component/interfaces/IMarkerConfiguration.ts +31 -0
- package/src/component/interfaces/IMouseConfiguration.ts +52 -0
- package/src/component/interfaces/INavigationConfiguration.ts +35 -0
- package/src/component/interfaces/IRouteConfiguration.ts +20 -0
- package/src/component/interfaces/ISequenceConfiguration.ts +72 -0
- package/src/component/interfaces/IShader.ts +6 -0
- package/src/component/interfaces/ISliderConfiguration.ts +61 -0
- package/src/component/interfaces/ITagConfiguration.ts +40 -0
- package/src/component/interfaces/interfaces.ts +17 -0
- package/src/component/keyboard/KeySequenceNavigationHandler.ts +86 -0
- package/src/component/keyboard/KeySpatialNavigationHandler.ts +216 -0
- package/src/component/keyboard/KeyZoomHandler.ts +106 -0
- package/src/component/keyboard/KeyboardComponent.ts +125 -0
- package/src/component/marker/Marker.ts +5 -0
- package/src/component/marker/MarkerComponent.ts +856 -0
- package/src/component/marker/MarkerScene.ts +145 -0
- package/src/component/marker/MarkerSet.ts +142 -0
- package/src/component/marker/interfaces/IArrowMarkerOptions.ts +41 -0
- package/src/component/marker/interfaces/ICircleMarkerOptions.ts +30 -0
- package/src/component/marker/interfaces/IDotMarkerOptions.ts +18 -0
- package/src/component/marker/interfaces/IMarkerEvent.ts +28 -0
- package/src/component/marker/interfaces/ISimpleMarkerOptions.ts +54 -0
- package/src/component/marker/interfaces/interfaces.ts +5 -0
- package/src/component/marker/marker/ArrowMarker.ts +84 -0
- package/src/component/marker/marker/CircleMarker.ts +82 -0
- package/src/component/marker/marker/DotMarker.ts +68 -0
- package/src/component/marker/marker/ImageMarker.ts +45 -0
- package/src/component/marker/marker/Marker.ts +99 -0
- package/src/component/marker/marker/SimpleMarker.ts +187 -0
- package/src/component/mouse/BounceHandler.ts +148 -0
- package/src/component/mouse/DoubleClickZoomHandler.ts +106 -0
- package/src/component/mouse/DragPanHandler.ts +489 -0
- package/src/component/mouse/HandlerTypes.ts +13 -0
- package/src/component/mouse/MouseComponent.ts +170 -0
- package/src/component/mouse/ScrollZoomHandler.ts +137 -0
- package/src/component/mouse/TouchZoomHandler.ts +136 -0
- package/src/component/path/PathComponent.ts +75 -0
- package/src/component/path/PathEvent.ts +245 -0
- package/src/component/path/PathMarker.ts +42 -0
- package/src/component/path/PathRender.ts +163 -0
- package/src/component/popup/Popup.ts +2 -0
- package/src/component/popup/PopupComponent.ts +244 -0
- package/src/component/popup/interfaces/IPopupOffset.ts +37 -0
- package/src/component/popup/interfaces/IPopupOptions.ts +81 -0
- package/src/component/popup/popup/Popup.ts +594 -0
- package/src/component/popup/popup/PopupAlignment.ts +3 -0
- package/src/component/sequence/SequenceComponent.ts +500 -0
- package/src/component/sequence/SequenceDOMInteraction.ts +23 -0
- package/src/component/sequence/SequenceDOMRenderer.ts +179 -0
- package/src/component/tag/Tag.ts +9 -0
- package/src/component/tag/TagComponent.ts +787 -0
- package/src/component/tag/TagCreator.ts +138 -0
- package/src/component/tag/TagDOMRenderer.ts +35 -0
- package/src/component/tag/TagMode.ts +37 -0
- package/src/component/tag/TagOperation.ts +7 -0
- package/src/component/tag/TagScene.ts +216 -0
- package/src/component/tag/TagSet.ts +186 -0
- package/src/component/tag/error/GeometryTagError.ts +11 -0
- package/src/component/tag/geometry/Geometry.ts +62 -0
- package/src/component/tag/geometry/PointGeometry.ts +89 -0
- package/src/component/tag/geometry/PolygonGeometry.ts +349 -0
- package/src/component/tag/geometry/RectGeometry.ts +759 -0
- package/src/component/tag/geometry/VertexGeometry.ts +185 -0
- package/src/component/tag/handlers/CreateHandlerBase.ts +81 -0
- package/src/component/tag/handlers/CreatePointHandler.ts +35 -0
- package/src/component/tag/handlers/CreatePolygonHandler.ts +33 -0
- package/src/component/tag/handlers/CreateRectDragHandler.ts +199 -0
- package/src/component/tag/handlers/CreateRectHandler.ts +57 -0
- package/src/component/tag/handlers/CreateVertexHandler.ts +165 -0
- package/src/component/tag/handlers/EditVertexHandler.ts +275 -0
- package/src/component/tag/handlers/TagHandlerBase.ts +57 -0
- package/src/component/tag/interfaces/IInteraction.ts +14 -0
- package/src/component/tag/interfaces/IOutlineCreateTagOptions.ts +15 -0
- package/src/component/tag/interfaces/IOutlineTagOptions.ts +89 -0
- package/src/component/tag/interfaces/ISpotTagOptions.ts +37 -0
- package/src/component/tag/interfaces/interfaces.ts +4 -0
- package/src/component/tag/tag/OutlineCreateTag.ts +330 -0
- package/src/component/tag/tag/OutlineRenderTag.ts +569 -0
- package/src/component/tag/tag/OutlineTag.ts +380 -0
- package/src/component/tag/tag/RenderTag.ts +50 -0
- package/src/component/tag/tag/SpotRenderTag.ts +160 -0
- package/src/component/tag/tag/SpotTag.ts +170 -0
- package/src/component/tag/tag/Tag.ts +103 -0
- package/src/component/utils/HandlerBase.ts +71 -0
- package/src/error/ArgumentBeeviewError.ts +11 -0
- package/src/error/BeeviewError.ts +9 -0
- package/src/error/GraphBeeviewError.ts +11 -0
- package/src/geo/Camera.ts +149 -0
- package/src/geo/GeoCoords.ts +280 -0
- package/src/geo/GeoRBush.ts +25 -0
- package/src/geo/Spatial.ts +259 -0
- package/src/geo/Transform.ts +543 -0
- package/src/geo/ViewportCoords.ts +518 -0
- package/src/geo/interfaces/ILatLonAlt.ts +7 -0
- package/src/geo/interfaces/interfaces.ts +1 -0
- package/src/graph/FilterCreator.ts +106 -0
- package/src/graph/FilterExpression.ts +16 -0
- package/src/graph/Graph.ts +1516 -0
- package/src/graph/GraphCalculator.ts +197 -0
- package/src/graph/GraphService.ts +516 -0
- package/src/graph/ImageLoadingService.ts +44 -0
- package/src/graph/MeshReader.ts +19 -0
- package/src/graph/Node.ts +622 -0
- package/src/graph/NodeCache.ts +548 -0
- package/src/graph/Sequence.ts +117 -0
- package/src/graph/edge/EdgeCalculator.ts +919 -0
- package/src/graph/edge/EdgeCalculatorCoefficients.ts +43 -0
- package/src/graph/edge/EdgeCalculatorDirections.ts +80 -0
- package/src/graph/edge/EdgeCalculatorSettings.ts +61 -0
- package/src/graph/edge/EdgeDirection.ts +63 -0
- package/src/graph/edge/interfaces/IEdge.ts +26 -0
- package/src/graph/edge/interfaces/IEdgeData.ts +22 -0
- package/src/graph/edge/interfaces/IPano.ts +8 -0
- package/src/graph/edge/interfaces/IPotentialEdge.ts +106 -0
- package/src/graph/edge/interfaces/IStep.ts +7 -0
- package/src/graph/edge/interfaces/ITurn.ts +7 -0
- package/src/graph/edge/interfaces/interfaces.ts +6 -0
- package/src/graph/interfaces/IEdgeStatus.ts +25 -0
- package/src/graph/interfaces/IGraphConfiguration.ts +26 -0
- package/src/graph/interfaces/ILoadStatus.ts +18 -0
- package/src/graph/interfaces/ILoadStatusObject.ts +8 -0
- package/src/graph/interfaces/IMesh.ts +20 -0
- package/src/graph/interfaces/interfaces.ts +5 -0
- package/src/render/DOMRenderer.ts +288 -0
- package/src/render/GLRenderStage.ts +6 -0
- package/src/render/GLRenderer.ts +436 -0
- package/src/render/RenderCamera.ts +212 -0
- package/src/render/RenderMode.ts +34 -0
- package/src/render/RenderService.ts +264 -0
- package/src/render/interfaces/IGLRender.ts +10 -0
- package/src/render/interfaces/IGLRenderFunction.ts +10 -0
- package/src/render/interfaces/IGLRenderHash.ts +8 -0
- package/src/render/interfaces/ISize.ts +6 -0
- package/src/render/interfaces/IVNodeHash.ts +8 -0
- package/src/render/interfaces/interfaces.ts +5 -0
- package/src/state/FrameGenerator.ts +36 -0
- package/src/state/State.ts +6 -0
- package/src/state/StateContext.ts +180 -0
- package/src/state/StateService.ts +600 -0
- package/src/state/StateTransitionMatrix.ts +58 -0
- package/src/state/interfaces/ICurrentState.ts +21 -0
- package/src/state/interfaces/IFrame.ts +9 -0
- package/src/state/interfaces/IRotation.ts +6 -0
- package/src/state/interfaces/IState.ts +11 -0
- package/src/state/interfaces/IStateContext.ts +31 -0
- package/src/state/interfaces/interfaces.ts +5 -0
- package/src/state/states/StateBase.ts +425 -0
- package/src/state/states/TraversingState.ts +861 -0
- package/src/state/states/WaitingState.ts +109 -0
- package/src/tiles/ImageTileLoader.ts +121 -0
- package/src/tiles/ImageTileStore.ts +70 -0
- package/src/tiles/RegionOfInterestCalculator.ts +158 -0
- package/src/tiles/TextureProvider.ts +609 -0
- package/src/tiles/interfaces/IBoundingBox.ts +28 -0
- package/src/tiles/interfaces/IRegionOfInterest.ts +25 -0
- package/src/tiles/interfaces/interfaces.ts +2 -0
- package/src/utils/DOM.ts +28 -0
- package/src/utils/EventEmitter.ts +61 -0
- package/src/utils/Func.ts +3 -0
- package/src/utils/Settings.ts +39 -0
- package/src/utils/Support.ts +70 -0
- package/src/utils/Urls.ts +43 -0
- package/src/viewer/Alignment.ts +53 -0
- package/src/viewer/CacheService.ts +75 -0
- package/src/viewer/ComponentController.ts +237 -0
- package/src/viewer/Container.ts +100 -0
- package/src/viewer/EventNames.ts +192 -0
- package/src/viewer/ImageSize.ts +28 -0
- package/src/viewer/KeyboardService.ts +15 -0
- package/src/viewer/LoadingService.ts +66 -0
- package/src/viewer/MouseService.ts +541 -0
- package/src/viewer/Navigator.ts +362 -0
- package/src/viewer/Observer.ts +441 -0
- package/src/viewer/Projection.ts +162 -0
- package/src/viewer/SpriteService.ts +281 -0
- package/src/viewer/TouchService.ts +336 -0
- package/src/viewer/Viewer.ts +1132 -0
- package/src/viewer/interfaces/IComponentOptions.ts +176 -0
- package/src/viewer/interfaces/IMouseClaim.ts +6 -0
- package/src/viewer/interfaces/IMouseDeferPixels.ts +6 -0
- package/src/viewer/interfaces/IPinch.ts +81 -0
- package/src/viewer/interfaces/ISpriteAtlas.ts +12 -0
- package/src/viewer/interfaces/IUnprojection.ts +9 -0
- package/src/viewer/interfaces/IViewerMouseEvent.ts +56 -0
- package/src/viewer/interfaces/IViewerOptions.ts +88 -0
- package/src/viewer/interfaces/PointOfView.ts +19 -0
- package/src/viewer/interfaces/interfaces.ts +9 -0
- package/styles/AttributionComponent.css +26 -0
- package/styles/BackgroundComponent.css +21 -0
- package/styles/BearingComponent.css +48 -0
- package/styles/CoverComponent.css +169 -0
- package/styles/DebugComponent.css +28 -0
- package/styles/DirectionComponent.css +154 -0
- package/styles/LoadingComponent.css +14 -0
- package/styles/NavigationComponent.css +64 -0
- package/styles/NorthBg.png +0 -0
- package/styles/PopupComponent.css +188 -0
- package/styles/RouteComponent.css +21 -0
- package/styles/SequenceComponent.css +120 -0
- package/styles/SliderComponent.css +82 -0
- package/styles/TagComponent.css +105 -0
- package/styles/cover-logo.png +0 -0
- package/styles/mapillary-js.css +29 -0
- package/styles/pano-indicator.svg +3 -0
- package/styles/pano.svg +20 -0
- package/styles/pointer-wheat.svg +3 -0
- package/styles/pointer-white.svg +3 -0
- package/styles/spinner.svg +1 -0
- package/styles/stepper-left.svg +1 -0
- package/styles/stepper-play.svg +1 -0
- package/styles/stepper-right.svg +1 -0
- package/styles/stepper-stop.svg +1 -0
- package/styles/turn-around.svg +3 -0
- package/styles/turn.svg +3 -0
- package/tsconfig.json +28 -0
- package/tslint.json +81 -0
- package/types/graphql/index.d.ts +28 -0
- package/types/graphql/language/ast/index.d.ts +7 -0
- package/types/images/index.d.ts +7 -0
- package/types/pbf/index.d.ts +16 -0
- package/types/rbush/index.d.ts +28 -0
- package/version/beeview-0.1.0.css +2 -0
- package/version/beeview-0.1.0.js +1 -0
- package/version/beeview-0.1.1.css +2 -0
- package/version/beeview-0.1.1.js +1 -0
- package/version/beeview-0.1.2.css +2 -0
- package/version/beeview-0.1.2.js +1 -0
- package/version/beeview-0.2.0.css +2 -0
- package/version/beeview-0.2.0.js +1 -0
- package/version/beeview-0.2.1.css +2 -0
- package/version/beeview-0.2.1.js +1 -0
- package/version/beeview-0.3.0.css +2 -0
- package/version/beeview-0.3.0.js +1 -0
- package/version/beeview-0.4.0.css +2 -0
- package/version/beeview-0.4.0.js +1 -0
- package/version/beeview-0.4.1.css +2 -0
- package/version/beeview-0.4.1.js +1 -0
- package/version/mapxus-visual-1.0.0.css +2 -0
- package/version/mapxus-visual-1.0.0.js +1 -0
- package/version/mapxus-visual-1.1.0.css +2 -0
- package/version/mapxus-visual-1.1.0.js +1 -0
- package/version/mapxus-visual-1.1.1.css +2 -0
- package/version/mapxus-visual-1.1.1.js +1 -0
- package/version/mapxus-visual-1.1.2.css +2 -0
- package/version/mapxus-visual-1.1.2.js +1 -0
- package/version/mapxus-visual-1.2.0.css +2 -0
- package/version/mapxus-visual-1.2.0.js +1 -0
- package/version/mapxus-visual-1.3.0.css +2 -0
- package/version/mapxus-visual-1.3.0.js +1 -0
- package/LICENSE +0 -11
- package/README.md +0 -28
- package/index.css +0 -2
- package/index.d.ts +0 -163
- package/index.js +0 -1
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import * as vd from "virtual-dom";
|
|
2
|
+
import { Observable, Subscription, Subject, combineLatest, of } from "rxjs";
|
|
3
|
+
import { ComponentService } from "../ComponentService";
|
|
4
|
+
import { Component } from "../Component";
|
|
5
|
+
import { DirectionDOMRenderer } from "./DirectionDOMRenderer";
|
|
6
|
+
import type { IDirectionConfiguration } from "../interfaces/interfaces";
|
|
7
|
+
import type { IEdgeStatus } from "../../graph/interfaces/interfaces";
|
|
8
|
+
import { Node } from "../../graph/Node";
|
|
9
|
+
import { Sequence } from "../../graph/Sequence";
|
|
10
|
+
import type { IVNodeHash } from "../../render/interfaces/interfaces";
|
|
11
|
+
import { RenderCamera } from "../../render/RenderCamera";
|
|
12
|
+
import { Container } from "../../viewer/Container";
|
|
13
|
+
import { Navigator } from "../../viewer/Navigator";
|
|
14
|
+
import {
|
|
15
|
+
share,
|
|
16
|
+
catchError,
|
|
17
|
+
tap,
|
|
18
|
+
withLatestFrom,
|
|
19
|
+
switchMap,
|
|
20
|
+
map,
|
|
21
|
+
filter,
|
|
22
|
+
startWith,
|
|
23
|
+
distinctUntilChanged,
|
|
24
|
+
} from "rxjs/operators";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @class DirectionComponent
|
|
28
|
+
* @classdesc Component showing navigation arrows for steps and turns.
|
|
29
|
+
*/
|
|
30
|
+
export class DirectionComponent extends Component<IDirectionConfiguration> {
|
|
31
|
+
/** @inheritdoc */
|
|
32
|
+
public static componentName: string = "direction";
|
|
33
|
+
|
|
34
|
+
private _renderer: DirectionDOMRenderer;
|
|
35
|
+
|
|
36
|
+
private _hoveredKeySubject$: Subject<string>;
|
|
37
|
+
private _hoveredKey$: Observable<string>;
|
|
38
|
+
|
|
39
|
+
private _configurationSubscription: Subscription;
|
|
40
|
+
private _nodeSubscription: Subscription;
|
|
41
|
+
private _renderCameraSubscription: Subscription;
|
|
42
|
+
private _hoveredKeySubscription: Subscription;
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
name: string,
|
|
46
|
+
container: Container,
|
|
47
|
+
navigator: Navigator,
|
|
48
|
+
directionDOMRenderer?: DirectionDOMRenderer,
|
|
49
|
+
) {
|
|
50
|
+
super(name, container, navigator);
|
|
51
|
+
|
|
52
|
+
this._renderer = !!directionDOMRenderer
|
|
53
|
+
? directionDOMRenderer
|
|
54
|
+
: new DirectionDOMRenderer(
|
|
55
|
+
this.defaultConfiguration,
|
|
56
|
+
container.element,
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
this._hoveredKeySubject$ = new Subject<string>();
|
|
60
|
+
|
|
61
|
+
this._hoveredKey$ = this._hoveredKeySubject$.pipe(share());
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get hovered key observable.
|
|
66
|
+
*
|
|
67
|
+
* @description An observable emitting the key of the node for the direction
|
|
68
|
+
* arrow that is being hovered. When the mouse leaves a direction arrow null
|
|
69
|
+
* is emitted.
|
|
70
|
+
*
|
|
71
|
+
* @returns {Observable<string>}
|
|
72
|
+
*/
|
|
73
|
+
public get hoveredKey$(): Observable<string> {
|
|
74
|
+
return this._hoveredKey$;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Set highlight key.
|
|
79
|
+
*
|
|
80
|
+
* @description The arrow pointing towards the node corresponding to the
|
|
81
|
+
* highlight key will be highlighted.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} highlightKey Key of node to be highlighted if existing
|
|
84
|
+
* among arrows.
|
|
85
|
+
*/
|
|
86
|
+
public setHighlightKey(highlightKey: string): void {
|
|
87
|
+
this.configure({ highlightKey: highlightKey });
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Set min width of container element.
|
|
92
|
+
*
|
|
93
|
+
* @description Set min width of the non transformed container element holding
|
|
94
|
+
* the navigation arrows. If the min width is larger than the max width the
|
|
95
|
+
* min width value will be used.
|
|
96
|
+
*
|
|
97
|
+
* The container element is automatically resized when the resize
|
|
98
|
+
* method on the Viewer class is called.
|
|
99
|
+
*
|
|
100
|
+
* @param {number} minWidth
|
|
101
|
+
*/
|
|
102
|
+
public setMinWidth(minWidth: number): void {
|
|
103
|
+
this.configure({ minWidth: minWidth });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Set max width of container element.
|
|
108
|
+
*
|
|
109
|
+
* @description Set max width of the non transformed container element holding
|
|
110
|
+
* the navigation arrows. If the min width is larger than the max width the
|
|
111
|
+
* min width value will be used.
|
|
112
|
+
*
|
|
113
|
+
* The container element is automatically resized when the resize
|
|
114
|
+
* method on the Viewer class is called.
|
|
115
|
+
*
|
|
116
|
+
* @param {number} minWidth
|
|
117
|
+
*/
|
|
118
|
+
public setMaxWidth(maxWidth: number): void {
|
|
119
|
+
this.configure({ maxWidth: maxWidth });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** @inheritdoc */
|
|
123
|
+
public resize(): void {
|
|
124
|
+
this._renderer.resize(this._container.element);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
protected _activate(): void {
|
|
128
|
+
this._configurationSubscription = this._configuration$.subscribe(
|
|
129
|
+
(configuration: IDirectionConfiguration): void => {
|
|
130
|
+
this._renderer.setConfiguration(configuration);
|
|
131
|
+
},
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
this._nodeSubscription = this._navigator.stateService.currentNode$
|
|
135
|
+
.pipe(
|
|
136
|
+
tap((node: Node): void => {
|
|
137
|
+
this._container.domRenderer.render$.next({
|
|
138
|
+
name: this._name,
|
|
139
|
+
vnode: vd.h("div", {}, []),
|
|
140
|
+
});
|
|
141
|
+
this._renderer.setNode(node);
|
|
142
|
+
}),
|
|
143
|
+
withLatestFrom(this._configuration$),
|
|
144
|
+
switchMap(
|
|
145
|
+
([node, configuration]: [
|
|
146
|
+
Node,
|
|
147
|
+
IDirectionConfiguration,
|
|
148
|
+
]): Observable<[IEdgeStatus, Sequence]> => {
|
|
149
|
+
return combineLatest(
|
|
150
|
+
node.spatialEdges$,
|
|
151
|
+
configuration.distinguishSequence
|
|
152
|
+
? this._navigator.graphService
|
|
153
|
+
.cacheSequence$(node.sequenceKey)
|
|
154
|
+
.pipe(
|
|
155
|
+
catchError(
|
|
156
|
+
(
|
|
157
|
+
error: Error,
|
|
158
|
+
caught: Observable<Sequence>,
|
|
159
|
+
): Observable<Sequence> => {
|
|
160
|
+
console.error(
|
|
161
|
+
`Failed to cache sequence (${node.sequenceKey})`,
|
|
162
|
+
error,
|
|
163
|
+
);
|
|
164
|
+
return of<Sequence>(null);
|
|
165
|
+
},
|
|
166
|
+
),
|
|
167
|
+
)
|
|
168
|
+
: of<Sequence>(null),
|
|
169
|
+
);
|
|
170
|
+
},
|
|
171
|
+
),
|
|
172
|
+
)
|
|
173
|
+
.subscribe(
|
|
174
|
+
([edgeStatus, sequence]: [IEdgeStatus, Sequence]): void => {
|
|
175
|
+
this._renderer.setEdges(edgeStatus, sequence);
|
|
176
|
+
},
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
this._renderCameraSubscription =
|
|
180
|
+
this._container.renderService.renderCameraFrame$
|
|
181
|
+
.pipe(
|
|
182
|
+
tap((renderCamera: RenderCamera): void => {
|
|
183
|
+
this._renderer.setRenderCamera(renderCamera);
|
|
184
|
+
}),
|
|
185
|
+
map((renderCamera: RenderCamera): DirectionDOMRenderer => {
|
|
186
|
+
return this._renderer;
|
|
187
|
+
}),
|
|
188
|
+
filter((renderer: DirectionDOMRenderer): boolean => {
|
|
189
|
+
return renderer.needsRender;
|
|
190
|
+
}),
|
|
191
|
+
map((renderer: DirectionDOMRenderer): IVNodeHash => {
|
|
192
|
+
return {
|
|
193
|
+
name: this._name,
|
|
194
|
+
vnode: renderer.render(this._navigator),
|
|
195
|
+
};
|
|
196
|
+
}),
|
|
197
|
+
)
|
|
198
|
+
.subscribe(this._container.domRenderer.render$);
|
|
199
|
+
|
|
200
|
+
this._hoveredKeySubscription = combineLatest(
|
|
201
|
+
[
|
|
202
|
+
this._container.domRenderer.element$,
|
|
203
|
+
this._container.renderService.renderCamera$,
|
|
204
|
+
this._container.mouseService.mouseMove$.pipe(startWith(null)),
|
|
205
|
+
this._container.mouseService.mouseUp$.pipe(startWith(null)),
|
|
206
|
+
],
|
|
207
|
+
(
|
|
208
|
+
e: Element,
|
|
209
|
+
rc: RenderCamera,
|
|
210
|
+
mm: MouseEvent,
|
|
211
|
+
mu: MouseEvent,
|
|
212
|
+
): Element => {
|
|
213
|
+
return e;
|
|
214
|
+
},
|
|
215
|
+
)
|
|
216
|
+
.pipe(
|
|
217
|
+
map((element: Element): string => {
|
|
218
|
+
let elements: HTMLCollectionOf<Element> =
|
|
219
|
+
element.getElementsByClassName("DirectionsPerspective");
|
|
220
|
+
for (let i: number = 0; i < elements.length; i++) {
|
|
221
|
+
let hovered: Element = elements
|
|
222
|
+
.item(i)
|
|
223
|
+
.querySelector(":hover");
|
|
224
|
+
if (
|
|
225
|
+
hovered != null &&
|
|
226
|
+
hovered.hasAttribute("data-key")
|
|
227
|
+
) {
|
|
228
|
+
return hovered.getAttribute("data-key");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return null;
|
|
232
|
+
}),
|
|
233
|
+
distinctUntilChanged(),
|
|
234
|
+
)
|
|
235
|
+
.subscribe(this._hoveredKeySubject$);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
protected _deactivate(): void {
|
|
239
|
+
this._configurationSubscription.unsubscribe();
|
|
240
|
+
this._nodeSubscription.unsubscribe();
|
|
241
|
+
this._renderCameraSubscription.unsubscribe();
|
|
242
|
+
this._hoveredKeySubscription.unsubscribe();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
protected _getDefaultConfiguration(): IDirectionConfiguration {
|
|
246
|
+
return {
|
|
247
|
+
distinguishSequence: false,
|
|
248
|
+
maxWidth: 460,
|
|
249
|
+
minWidth: 260,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export default DirectionComponent;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import {IDirectionConfiguration} from "../../Component";
|
|
2
|
+
import {Spatial} from "../../Geo";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @class DirectionDOMCalculator
|
|
6
|
+
* @classdesc Helper class for calculating DOM CSS properties.
|
|
7
|
+
*/
|
|
8
|
+
export class DirectionDOMCalculator {
|
|
9
|
+
private _spatial: Spatial;
|
|
10
|
+
|
|
11
|
+
private _elementWidth: number;
|
|
12
|
+
private _elementHeight: number;
|
|
13
|
+
|
|
14
|
+
private _minWidth: number;
|
|
15
|
+
private _maxWidth: number;
|
|
16
|
+
|
|
17
|
+
private _minThresholdWidth: number;
|
|
18
|
+
private _maxThresholdWidth: number;
|
|
19
|
+
private _minThresholdHeight: number;
|
|
20
|
+
private _maxThresholdHeight: number;
|
|
21
|
+
|
|
22
|
+
private _containerWidth: number;
|
|
23
|
+
private _containerWidthCss: string;
|
|
24
|
+
private _containerMarginCss: string;
|
|
25
|
+
private _containerLeftCss: string;
|
|
26
|
+
private _containerHeight: number;
|
|
27
|
+
private _containerHeightCss: string;
|
|
28
|
+
private _containerBottomCss: string;
|
|
29
|
+
|
|
30
|
+
private _stepCircleSize: number;
|
|
31
|
+
private _stepCircleSizeCss: string;
|
|
32
|
+
private _stepCircleMarginCss: string;
|
|
33
|
+
|
|
34
|
+
private _turnCircleSize: number;
|
|
35
|
+
private _turnCircleSizeCss: string;
|
|
36
|
+
|
|
37
|
+
private _outerRadius: number;
|
|
38
|
+
private _innerRadius: number;
|
|
39
|
+
|
|
40
|
+
private _shadowOffset: number;
|
|
41
|
+
|
|
42
|
+
constructor(configuration: IDirectionConfiguration, element: HTMLElement) {
|
|
43
|
+
this._spatial = new Spatial();
|
|
44
|
+
|
|
45
|
+
this._minThresholdWidth = 320;
|
|
46
|
+
this._maxThresholdWidth = 1480;
|
|
47
|
+
this._minThresholdHeight = 240;
|
|
48
|
+
this._maxThresholdHeight = 820;
|
|
49
|
+
|
|
50
|
+
this._configure(configuration);
|
|
51
|
+
this._resize(element);
|
|
52
|
+
this._reset();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public get minWidth(): number {
|
|
56
|
+
return this._minWidth;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public get maxWidth(): number {
|
|
60
|
+
return this._maxWidth;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public get containerWidth(): number {
|
|
64
|
+
return this._containerWidth;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public get containerWidthCss(): string {
|
|
68
|
+
return this._containerWidthCss;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public get containerMarginCss(): string {
|
|
72
|
+
return this._containerMarginCss;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public get containerLeftCss(): string {
|
|
76
|
+
return this._containerLeftCss;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public get containerHeight(): number {
|
|
80
|
+
return this._containerHeight;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public get containerHeightCss(): string {
|
|
84
|
+
return this._containerHeightCss;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public get containerBottomCss(): string {
|
|
88
|
+
return this._containerBottomCss;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public get stepCircleSize(): number {
|
|
92
|
+
return this._stepCircleSize;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public get stepCircleSizeCss(): string {
|
|
96
|
+
return this._stepCircleSizeCss;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public get stepCircleMarginCss(): string {
|
|
100
|
+
return this._stepCircleMarginCss;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public get turnCircleSize(): number {
|
|
104
|
+
return this._turnCircleSize;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public get turnCircleSizeCss(): string {
|
|
108
|
+
return this._turnCircleSizeCss;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public get outerRadius(): number {
|
|
112
|
+
return this._outerRadius;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public get innerRadius(): number {
|
|
116
|
+
return this._innerRadius;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
public get shadowOffset(): number {
|
|
120
|
+
return this._shadowOffset;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Configures the min and max width values.
|
|
125
|
+
*
|
|
126
|
+
* @param {IDirectionConfiguration} configuration Configuration
|
|
127
|
+
* with min and max width values.
|
|
128
|
+
*/
|
|
129
|
+
public configure(configuration: IDirectionConfiguration): void {
|
|
130
|
+
this._configure(configuration);
|
|
131
|
+
this._reset();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Resizes all properties according to the width and height
|
|
136
|
+
* of the element.
|
|
137
|
+
*
|
|
138
|
+
* @param {HTMLElement} element The container element from which to extract
|
|
139
|
+
* the width and height.
|
|
140
|
+
*/
|
|
141
|
+
public resize(element: HTMLElement): void {
|
|
142
|
+
this._resize(element);
|
|
143
|
+
this._reset();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Calculates the coordinates on the unit circle for an angle.
|
|
148
|
+
*
|
|
149
|
+
* @param {number} angle Angle in radians.
|
|
150
|
+
* @returns {number[]} The x and y coordinates on the unit circle.
|
|
151
|
+
*/
|
|
152
|
+
public angleToCoordinates(angle: number): number[] {
|
|
153
|
+
return [Math.cos(angle), Math.sin(angle)];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Calculates the coordinates on the unit circle for the
|
|
158
|
+
* relative angle between the first and second angle.
|
|
159
|
+
*
|
|
160
|
+
* @param {number} first Angle in radians.
|
|
161
|
+
* @param {number} second Angle in radians.
|
|
162
|
+
* @returns {number[]} The x and y coordinates on the unit circle
|
|
163
|
+
* for the relative angle between the first and second angle.
|
|
164
|
+
*/
|
|
165
|
+
public relativeAngleToCoordiantes(first: number, second: number): number[] {
|
|
166
|
+
let relativeAngle: number = this._spatial.wrapAngle(first - second);
|
|
167
|
+
|
|
168
|
+
return this.angleToCoordinates(relativeAngle);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
private _configure(configuration: IDirectionConfiguration): void {
|
|
172
|
+
this._minWidth = configuration.minWidth;
|
|
173
|
+
this._maxWidth = this._getMaxWidth(configuration.minWidth, configuration.maxWidth);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
private _resize(element: HTMLElement): void {
|
|
177
|
+
this._elementWidth = element.offsetWidth;
|
|
178
|
+
this._elementHeight = element.offsetHeight;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
private _reset(): void {
|
|
182
|
+
this._containerWidth = this._getContainerWidth(this._elementWidth, this._elementHeight);
|
|
183
|
+
this._containerHeight = this._getContainerHeight(this.containerWidth);
|
|
184
|
+
this._stepCircleSize = this._getStepCircleDiameter(this._containerHeight);
|
|
185
|
+
this._turnCircleSize = this._getTurnCircleDiameter(this.containerHeight);
|
|
186
|
+
this._outerRadius = this._getOuterRadius(this._containerHeight);
|
|
187
|
+
this._innerRadius = this._getInnerRadius(this._containerHeight);
|
|
188
|
+
|
|
189
|
+
this._shadowOffset = 3;
|
|
190
|
+
|
|
191
|
+
this._containerWidthCss = this._numberToCssPixels(this._containerWidth);
|
|
192
|
+
this._containerMarginCss = this._numberToCssPixels(-0.5 * this._containerWidth);
|
|
193
|
+
this._containerLeftCss = this._numberToCssPixels(Math.floor(0.5 * this._elementWidth));
|
|
194
|
+
this._containerHeightCss = this._numberToCssPixels(this._containerHeight);
|
|
195
|
+
this._containerBottomCss = this._numberToCssPixels(Math.floor(-0.08 * this._containerHeight));
|
|
196
|
+
this._stepCircleSizeCss = this._numberToCssPixels(this._stepCircleSize);
|
|
197
|
+
this._stepCircleMarginCss = this._numberToCssPixels(-0.5 * this._stepCircleSize);
|
|
198
|
+
this._turnCircleSizeCss = this._numberToCssPixels(this._turnCircleSize);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
private _getContainerWidth(elementWidth: number, elementHeight: number): number {
|
|
202
|
+
let relativeWidth: number =
|
|
203
|
+
(elementWidth - this._minThresholdWidth) / (this._maxThresholdWidth - this._minThresholdWidth);
|
|
204
|
+
let relativeHeight: number =
|
|
205
|
+
(elementHeight - this._minThresholdHeight) / (this._maxThresholdHeight - this._minThresholdHeight);
|
|
206
|
+
|
|
207
|
+
let coeff: number = Math.max(0, Math.min(1, Math.min(relativeWidth, relativeHeight)));
|
|
208
|
+
|
|
209
|
+
coeff = 0.04 * Math.round(25 * coeff);
|
|
210
|
+
|
|
211
|
+
return this._minWidth + coeff * (this._maxWidth - this._minWidth);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
private _getContainerHeight(containerWidth: number): number {
|
|
215
|
+
return 0.77 * containerWidth;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private _getStepCircleDiameter(containerHeight: number): number {
|
|
219
|
+
return 0.34 * containerHeight;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private _getTurnCircleDiameter(containerHeight: number): number {
|
|
223
|
+
return 0.3 * containerHeight;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
private _getOuterRadius(containerHeight: number): number {
|
|
227
|
+
return 0.31 * containerHeight;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
private _getInnerRadius(containerHeight: number): number {
|
|
231
|
+
return 0.125 * containerHeight;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
private _numberToCssPixels(value: number): string {
|
|
235
|
+
return value + "px";
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
private _getMaxWidth(value: number, minWidth: number): number {
|
|
239
|
+
return value > minWidth ? value : minWidth;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export default DirectionDOMCalculator;
|