@realsee/dnalogel 2.0.0-alpha.6 → 2.0.0-alpha.9
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/CHANGELOG.md +14 -0
- package/README.md +44 -5
- package/dist/CSS3DRenderPlugin/index.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.js +233 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.js +142 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +461 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelViewPlugin/index.d.ts +17 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +51 -0
- package/dist/PanoCompassPlugin/index.js +523 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +88 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/dist/PanoMeasurePlugin/index.d.ts +7 -0
- package/dist/PanoMeasurePlugin/index.js +4789 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.js +610 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +104 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +3827 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1673 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +61 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3466 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.es.js +11887 -0
- package/dist/index.js +11925 -0
- package/dist/index.umd.js +11920 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +15 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +2 -0
- package/dist/shared-utils/five/useFivePlugin.d.ts +1 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/useDebounce.d.ts +8 -0
- package/dist/shared-utils/useThrottle.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +4 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/assets/highlight.css +49 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/index.html +37 -4
- package/docs/interfaces/LineJson.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -1
- package/docs/modules.html +11 -11
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +2 -2
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +253 -0
- package/libs/ModelViewPlugin/index.js +6 -6
- package/libs/PanoCompassPlugin/index.d.ts +3 -3
- package/libs/PanoCompassPlugin/index.js +56 -44
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +69 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +216 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +44 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +223 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +176 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/libs/PanoMeasurePlugin/Model/index.js +114 -0
- package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/libs/PanoMeasurePlugin/Model/line.js +64 -0
- package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/point.js +28 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +48 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +108 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +33 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +75 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +103 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +102 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +35 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +69 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +78 -0
- package/libs/PanoMeasurePlugin/index.d.ts +7 -0
- package/libs/PanoMeasurePlugin/index.js +5 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/data.js +1 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +114 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/line.js +32 -0
- package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/math.js +44 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +21 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
- package/libs/floorplan/Components/BaseImage.js +217 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +70 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +289 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +328 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +106 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +375 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +248 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/index.d.ts +2 -0
- package/libs/index.js +1 -0
- package/package.json +19 -11
- package/dist/dnalogel.cjs.js +0 -2
- package/dist/dnalogel.es.js +0 -37923
- package/dist/dnalogel.umd.js +0 -2
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
add_render_callback,
|
|
5
|
+
add_resize_listener,
|
|
6
|
+
append,
|
|
7
|
+
append_styles,
|
|
8
|
+
assign,
|
|
9
|
+
attr,
|
|
10
|
+
binding_callbacks,
|
|
11
|
+
check_outros,
|
|
12
|
+
create_component,
|
|
13
|
+
destroy_component,
|
|
14
|
+
detach,
|
|
15
|
+
element,
|
|
16
|
+
empty,
|
|
17
|
+
get_spread_update,
|
|
18
|
+
group_outros,
|
|
19
|
+
init,
|
|
20
|
+
insert,
|
|
21
|
+
listen,
|
|
22
|
+
mount_component,
|
|
23
|
+
outro_and_destroy_block,
|
|
24
|
+
safe_not_equal,
|
|
25
|
+
svg_element,
|
|
26
|
+
transition_in,
|
|
27
|
+
transition_out,
|
|
28
|
+
update_keyed_each
|
|
29
|
+
} from "svelte/internal";
|
|
30
|
+
|
|
31
|
+
import Room from './Room';
|
|
32
|
+
import { Vector2 } from 'three';
|
|
33
|
+
|
|
34
|
+
function add_css(target) {
|
|
35
|
+
append_styles(target, "svelte-1aais5l", ".floorplan-plugin__room-highlight.svelte-1aais5l{position:absolute;width:100%;height:100%;pointer-events:all}svg.svelte-1aais5l{width:100%;height:100%;overflow:visible}");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function get_each_context(ctx, list, i) {
|
|
39
|
+
const child_ctx = ctx.slice();
|
|
40
|
+
child_ctx[12] = list[i];
|
|
41
|
+
return child_ctx;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// (41:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
|
|
45
|
+
function create_each_block(key_1, ctx) {
|
|
46
|
+
let first;
|
|
47
|
+
let room;
|
|
48
|
+
let current;
|
|
49
|
+
|
|
50
|
+
const room_spread_levels = [
|
|
51
|
+
{
|
|
52
|
+
room: /*room*/ ctx[12],
|
|
53
|
+
floorplanData: /*floorplanData*/ ctx[2],
|
|
54
|
+
pxmm: /*pxmm*/ ctx[0]
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
let room_props = {};
|
|
59
|
+
|
|
60
|
+
for (let i = 0; i < room_spread_levels.length; i += 1) {
|
|
61
|
+
room_props = assign(room_props, room_spread_levels[i]);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
room = new Room({ props: room_props });
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
key: key_1,
|
|
68
|
+
first: null,
|
|
69
|
+
c() {
|
|
70
|
+
first = empty();
|
|
71
|
+
create_component(room.$$.fragment);
|
|
72
|
+
this.first = first;
|
|
73
|
+
},
|
|
74
|
+
m(target, anchor) {
|
|
75
|
+
insert(target, first, anchor);
|
|
76
|
+
mount_component(room, target, anchor);
|
|
77
|
+
current = true;
|
|
78
|
+
},
|
|
79
|
+
p(new_ctx, dirty) {
|
|
80
|
+
ctx = new_ctx;
|
|
81
|
+
|
|
82
|
+
const room_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 7)
|
|
83
|
+
? get_spread_update(room_spread_levels, [
|
|
84
|
+
{
|
|
85
|
+
room: /*room*/ ctx[12],
|
|
86
|
+
floorplanData: /*floorplanData*/ ctx[2],
|
|
87
|
+
pxmm: /*pxmm*/ ctx[0]
|
|
88
|
+
}
|
|
89
|
+
])
|
|
90
|
+
: {};
|
|
91
|
+
|
|
92
|
+
room.$set(room_changes);
|
|
93
|
+
},
|
|
94
|
+
i(local) {
|
|
95
|
+
if (current) return;
|
|
96
|
+
transition_in(room.$$.fragment, local);
|
|
97
|
+
current = true;
|
|
98
|
+
},
|
|
99
|
+
o(local) {
|
|
100
|
+
transition_out(room.$$.fragment, local);
|
|
101
|
+
current = false;
|
|
102
|
+
},
|
|
103
|
+
d(detaching) {
|
|
104
|
+
if (detaching) detach(first);
|
|
105
|
+
destroy_component(room, detaching);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function create_fragment(ctx) {
|
|
111
|
+
let div;
|
|
112
|
+
let svg;
|
|
113
|
+
let each_blocks = [];
|
|
114
|
+
let each_1_lookup = new Map();
|
|
115
|
+
let div_resize_listener;
|
|
116
|
+
let current;
|
|
117
|
+
let mounted;
|
|
118
|
+
let dispose;
|
|
119
|
+
let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
|
|
120
|
+
const get_key = ctx => /*room*/ ctx[12].id;
|
|
121
|
+
|
|
122
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
123
|
+
let child_ctx = get_each_context(ctx, each_value, i);
|
|
124
|
+
let key = get_key(child_ctx);
|
|
125
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
c() {
|
|
130
|
+
div = element("div");
|
|
131
|
+
svg = svg_element("svg");
|
|
132
|
+
|
|
133
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
134
|
+
each_blocks[i].c();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
attr(svg, "class", "svelte-1aais5l");
|
|
138
|
+
attr(div, "class", "floorplan-plugin__room-highlight svelte-1aais5l");
|
|
139
|
+
add_render_callback(() => /*div_elementresize_handler*/ ctx[10].call(div));
|
|
140
|
+
},
|
|
141
|
+
m(target, anchor) {
|
|
142
|
+
insert(target, div, anchor);
|
|
143
|
+
append(div, svg);
|
|
144
|
+
|
|
145
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
146
|
+
each_blocks[i].m(svg, null);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/*div_binding*/ ctx[9](div);
|
|
150
|
+
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
|
|
151
|
+
current = true;
|
|
152
|
+
|
|
153
|
+
if (!mounted) {
|
|
154
|
+
dispose = listen(div, "click", /*handleClick*/ ctx[6]);
|
|
155
|
+
mounted = true;
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
p(ctx, [dirty]) {
|
|
159
|
+
if (dirty & /*floorplanData, floorIndex, pxmm*/ 7) {
|
|
160
|
+
each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
|
|
161
|
+
group_outros();
|
|
162
|
+
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, outro_and_destroy_block, create_each_block, null, get_each_context);
|
|
163
|
+
check_outros();
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
i(local) {
|
|
167
|
+
if (current) return;
|
|
168
|
+
|
|
169
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
170
|
+
transition_in(each_blocks[i]);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
current = true;
|
|
174
|
+
},
|
|
175
|
+
o(local) {
|
|
176
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
177
|
+
transition_out(each_blocks[i]);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
current = false;
|
|
181
|
+
},
|
|
182
|
+
d(detaching) {
|
|
183
|
+
if (detaching) detach(div);
|
|
184
|
+
|
|
185
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
186
|
+
each_blocks[i].d();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/*div_binding*/ ctx[9](null);
|
|
190
|
+
div_resize_listener();
|
|
191
|
+
mounted = false;
|
|
192
|
+
dispose();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function instance($$self, $$props, $$invalidate) {
|
|
198
|
+
let { five } = $$props;
|
|
199
|
+
let { pxmm } = $$props;
|
|
200
|
+
let { floorIndex } = $$props;
|
|
201
|
+
let { floorplanData } = $$props;
|
|
202
|
+
let { onRoomHeightClick } = $$props;
|
|
203
|
+
let clientWidth;
|
|
204
|
+
let clientHeight;
|
|
205
|
+
let highlightContainerDom;
|
|
206
|
+
const { observers: floorplan_observers } = floorplanData;
|
|
207
|
+
|
|
208
|
+
const handleClick = function (e) {
|
|
209
|
+
if (onRoomHeightClick?.(e) === false) return;
|
|
210
|
+
|
|
211
|
+
// 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
|
|
212
|
+
const boundingClientRect = highlightContainerDom.getBoundingClientRect();
|
|
213
|
+
|
|
214
|
+
const mouseClientVector = new Vector2(e.clientX, e.clientY);
|
|
215
|
+
const domTopLeftVector = new Vector2(boundingClientRect.left, boundingClientRect.top);
|
|
216
|
+
const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
|
|
217
|
+
|
|
218
|
+
// px 转换为 百分比
|
|
219
|
+
const mouseOffsetRelativeVector = new Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
|
|
220
|
+
|
|
221
|
+
const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
|
|
222
|
+
const position1 = new Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
|
|
223
|
+
const position2 = new Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
|
|
224
|
+
return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
|
|
225
|
+
})[0];
|
|
226
|
+
|
|
227
|
+
five.moveToPano(closestPoint.index);
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
function div_binding($$value) {
|
|
231
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
232
|
+
highlightContainerDom = $$value;
|
|
233
|
+
$$invalidate(5, highlightContainerDom);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function div_elementresize_handler() {
|
|
238
|
+
clientWidth = this.clientWidth;
|
|
239
|
+
clientHeight = this.clientHeight;
|
|
240
|
+
$$invalidate(3, clientWidth);
|
|
241
|
+
$$invalidate(4, clientHeight);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
$$self.$$set = $$props => {
|
|
245
|
+
if ('five' in $$props) $$invalidate(7, five = $$props.five);
|
|
246
|
+
if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
|
|
247
|
+
if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
|
|
248
|
+
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
249
|
+
if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
return [
|
|
253
|
+
pxmm,
|
|
254
|
+
floorIndex,
|
|
255
|
+
floorplanData,
|
|
256
|
+
clientWidth,
|
|
257
|
+
clientHeight,
|
|
258
|
+
highlightContainerDom,
|
|
259
|
+
handleClick,
|
|
260
|
+
five,
|
|
261
|
+
onRoomHeightClick,
|
|
262
|
+
div_binding,
|
|
263
|
+
div_elementresize_handler
|
|
264
|
+
];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
class Component extends SvelteComponent {
|
|
268
|
+
constructor(options) {
|
|
269
|
+
super();
|
|
270
|
+
|
|
271
|
+
init(
|
|
272
|
+
this,
|
|
273
|
+
options,
|
|
274
|
+
instance,
|
|
275
|
+
create_fragment,
|
|
276
|
+
safe_not_equal,
|
|
277
|
+
{
|
|
278
|
+
five: 7,
|
|
279
|
+
pxmm: 0,
|
|
280
|
+
floorIndex: 1,
|
|
281
|
+
floorplanData: 2,
|
|
282
|
+
onRoomHeightClick: 8
|
|
283
|
+
},
|
|
284
|
+
add_css
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export default Component;
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
append_styles,
|
|
5
|
+
attr,
|
|
6
|
+
check_outros,
|
|
7
|
+
create_component,
|
|
8
|
+
destroy_component,
|
|
9
|
+
destroy_each,
|
|
10
|
+
detach,
|
|
11
|
+
element,
|
|
12
|
+
group_outros,
|
|
13
|
+
init,
|
|
14
|
+
insert,
|
|
15
|
+
mount_component,
|
|
16
|
+
safe_not_equal,
|
|
17
|
+
svg_element,
|
|
18
|
+
transition_in,
|
|
19
|
+
transition_out
|
|
20
|
+
} from "svelte/internal";
|
|
21
|
+
|
|
22
|
+
import formatFloorplanPoint from '../../utils/formatPosition';
|
|
23
|
+
import RoomMaterial_0 from './RoomMaterial_0';
|
|
24
|
+
import RoomMaterial_1 from './RoomMaterial_1';
|
|
25
|
+
import RoomMaterial_2 from './RoomMaterial_2';
|
|
26
|
+
|
|
27
|
+
function add_css(target) {
|
|
28
|
+
append_styles(target, "svelte-1b0icjc", "svg.svelte-1b0icjc{position:absolute;width:100%;height:100%;overflow:visible}");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function get_each_context(ctx, list, i) {
|
|
32
|
+
const child_ctx = ctx.slice();
|
|
33
|
+
child_ctx[4] = list[i];
|
|
34
|
+
return child_ctx;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// (21:6) {:else}
|
|
38
|
+
function create_else_block(ctx) {
|
|
39
|
+
let roommaterial_1;
|
|
40
|
+
let current;
|
|
41
|
+
roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[4].path } });
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
c() {
|
|
45
|
+
create_component(roommaterial_1.$$.fragment);
|
|
46
|
+
},
|
|
47
|
+
m(target, anchor) {
|
|
48
|
+
mount_component(roommaterial_1, target, anchor);
|
|
49
|
+
current = true;
|
|
50
|
+
},
|
|
51
|
+
p(ctx, dirty) {
|
|
52
|
+
const roommaterial_1_changes = {};
|
|
53
|
+
if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[4].path;
|
|
54
|
+
roommaterial_1.$set(roommaterial_1_changes);
|
|
55
|
+
},
|
|
56
|
+
i(local) {
|
|
57
|
+
if (current) return;
|
|
58
|
+
transition_in(roommaterial_1.$$.fragment, local);
|
|
59
|
+
current = true;
|
|
60
|
+
},
|
|
61
|
+
o(local) {
|
|
62
|
+
transition_out(roommaterial_1.$$.fragment, local);
|
|
63
|
+
current = false;
|
|
64
|
+
},
|
|
65
|
+
d(detaching) {
|
|
66
|
+
destroy_component(roommaterial_1, detaching);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// (19:37)
|
|
72
|
+
function create_if_block_1(ctx) {
|
|
73
|
+
let roommaterial_2;
|
|
74
|
+
let current;
|
|
75
|
+
roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[4].path } });
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
c() {
|
|
79
|
+
create_component(roommaterial_2.$$.fragment);
|
|
80
|
+
},
|
|
81
|
+
m(target, anchor) {
|
|
82
|
+
mount_component(roommaterial_2, target, anchor);
|
|
83
|
+
current = true;
|
|
84
|
+
},
|
|
85
|
+
p(ctx, dirty) {
|
|
86
|
+
const roommaterial_2_changes = {};
|
|
87
|
+
if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[4].path;
|
|
88
|
+
roommaterial_2.$set(roommaterial_2_changes);
|
|
89
|
+
},
|
|
90
|
+
i(local) {
|
|
91
|
+
if (current) return;
|
|
92
|
+
transition_in(roommaterial_2.$$.fragment, local);
|
|
93
|
+
current = true;
|
|
94
|
+
},
|
|
95
|
+
o(local) {
|
|
96
|
+
transition_out(roommaterial_2.$$.fragment, local);
|
|
97
|
+
current = false;
|
|
98
|
+
},
|
|
99
|
+
d(detaching) {
|
|
100
|
+
destroy_component(roommaterial_2, detaching);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// (17:6) {#if room.floorType === 1}
|
|
106
|
+
function create_if_block(ctx) {
|
|
107
|
+
let roommaterial_0;
|
|
108
|
+
let current;
|
|
109
|
+
roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[4].path } });
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
c() {
|
|
113
|
+
create_component(roommaterial_0.$$.fragment);
|
|
114
|
+
},
|
|
115
|
+
m(target, anchor) {
|
|
116
|
+
mount_component(roommaterial_0, target, anchor);
|
|
117
|
+
current = true;
|
|
118
|
+
},
|
|
119
|
+
p(ctx, dirty) {
|
|
120
|
+
const roommaterial_0_changes = {};
|
|
121
|
+
if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[4].path;
|
|
122
|
+
roommaterial_0.$set(roommaterial_0_changes);
|
|
123
|
+
},
|
|
124
|
+
i(local) {
|
|
125
|
+
if (current) return;
|
|
126
|
+
transition_in(roommaterial_0.$$.fragment, local);
|
|
127
|
+
current = true;
|
|
128
|
+
},
|
|
129
|
+
o(local) {
|
|
130
|
+
transition_out(roommaterial_0.$$.fragment, local);
|
|
131
|
+
current = false;
|
|
132
|
+
},
|
|
133
|
+
d(detaching) {
|
|
134
|
+
destroy_component(roommaterial_0, detaching);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// (15:2) {#each rooms as room}
|
|
140
|
+
function create_each_block(ctx) {
|
|
141
|
+
let svg;
|
|
142
|
+
let current_block_type_index;
|
|
143
|
+
let if_block;
|
|
144
|
+
let current;
|
|
145
|
+
const if_block_creators = [create_if_block, create_if_block_1, create_else_block];
|
|
146
|
+
const if_blocks = [];
|
|
147
|
+
|
|
148
|
+
function select_block_type(ctx, dirty) {
|
|
149
|
+
if (/*room*/ ctx[4].floorType === 1) return 0;
|
|
150
|
+
if (/*room*/ ctx[4].floorType === 0) return 1;
|
|
151
|
+
return 2;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
current_block_type_index = select_block_type(ctx, -1);
|
|
155
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
c() {
|
|
159
|
+
svg = svg_element("svg");
|
|
160
|
+
if_block.c();
|
|
161
|
+
attr(svg, "class", "svelte-1b0icjc");
|
|
162
|
+
},
|
|
163
|
+
m(target, anchor) {
|
|
164
|
+
insert(target, svg, anchor);
|
|
165
|
+
if_blocks[current_block_type_index].m(svg, null);
|
|
166
|
+
current = true;
|
|
167
|
+
},
|
|
168
|
+
p(ctx, dirty) {
|
|
169
|
+
let previous_block_index = current_block_type_index;
|
|
170
|
+
current_block_type_index = select_block_type(ctx, dirty);
|
|
171
|
+
|
|
172
|
+
if (current_block_type_index === previous_block_index) {
|
|
173
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
174
|
+
} else {
|
|
175
|
+
group_outros();
|
|
176
|
+
|
|
177
|
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
|
178
|
+
if_blocks[previous_block_index] = null;
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
check_outros();
|
|
182
|
+
if_block = if_blocks[current_block_type_index];
|
|
183
|
+
|
|
184
|
+
if (!if_block) {
|
|
185
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
186
|
+
if_block.c();
|
|
187
|
+
} else {
|
|
188
|
+
if_block.p(ctx, dirty);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
transition_in(if_block, 1);
|
|
192
|
+
if_block.m(svg, null);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
i(local) {
|
|
196
|
+
if (current) return;
|
|
197
|
+
transition_in(if_block);
|
|
198
|
+
current = true;
|
|
199
|
+
},
|
|
200
|
+
o(local) {
|
|
201
|
+
transition_out(if_block);
|
|
202
|
+
current = false;
|
|
203
|
+
},
|
|
204
|
+
d(detaching) {
|
|
205
|
+
if (detaching) detach(svg);
|
|
206
|
+
if_blocks[current_block_type_index].d();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function create_fragment(ctx) {
|
|
212
|
+
let div;
|
|
213
|
+
let current;
|
|
214
|
+
let each_value = /*rooms*/ ctx[0];
|
|
215
|
+
let each_blocks = [];
|
|
216
|
+
|
|
217
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
218
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
222
|
+
each_blocks[i] = null;
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
c() {
|
|
227
|
+
div = element("div");
|
|
228
|
+
|
|
229
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
230
|
+
each_blocks[i].c();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
attr(div, "class", "floorplan-plugin__room-material");
|
|
234
|
+
},
|
|
235
|
+
m(target, anchor) {
|
|
236
|
+
insert(target, div, anchor);
|
|
237
|
+
|
|
238
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
239
|
+
each_blocks[i].m(div, null);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
current = true;
|
|
243
|
+
},
|
|
244
|
+
p(ctx, [dirty]) {
|
|
245
|
+
if (dirty & /*rooms*/ 1) {
|
|
246
|
+
each_value = /*rooms*/ ctx[0];
|
|
247
|
+
let i;
|
|
248
|
+
|
|
249
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
250
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
251
|
+
|
|
252
|
+
if (each_blocks[i]) {
|
|
253
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
254
|
+
transition_in(each_blocks[i], 1);
|
|
255
|
+
} else {
|
|
256
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
257
|
+
each_blocks[i].c();
|
|
258
|
+
transition_in(each_blocks[i], 1);
|
|
259
|
+
each_blocks[i].m(div, null);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
group_outros();
|
|
264
|
+
|
|
265
|
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
|
266
|
+
out(i);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
check_outros();
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
i(local) {
|
|
273
|
+
if (current) return;
|
|
274
|
+
|
|
275
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
276
|
+
transition_in(each_blocks[i]);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
current = true;
|
|
280
|
+
},
|
|
281
|
+
o(local) {
|
|
282
|
+
each_blocks = each_blocks.filter(Boolean);
|
|
283
|
+
|
|
284
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
285
|
+
transition_out(each_blocks[i]);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
current = false;
|
|
289
|
+
},
|
|
290
|
+
d(detaching) {
|
|
291
|
+
if (detaching) detach(div);
|
|
292
|
+
destroy_each(each_blocks, detaching);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function instance($$self, $$props, $$invalidate) {
|
|
298
|
+
let rooms;
|
|
299
|
+
let { floorIndex } = $$props;
|
|
300
|
+
let { pxmm } = $$props;
|
|
301
|
+
let { floorplanData } = $$props;
|
|
302
|
+
|
|
303
|
+
$$self.$$set = $$props => {
|
|
304
|
+
if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
|
|
305
|
+
if ('pxmm' in $$props) $$invalidate(2, pxmm = $$props.pxmm);
|
|
306
|
+
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
$$self.$$.update = () => {
|
|
310
|
+
if ($$self.$$.dirty & /*floorplanData, floorIndex, pxmm*/ 14) {
|
|
311
|
+
$: $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => ({
|
|
312
|
+
...room,
|
|
313
|
+
path: room.path.map(p => formatFloorplanPoint(p, pxmm, floorplanData.bounding))
|
|
314
|
+
})));
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
return [rooms, floorIndex, pxmm, floorplanData];
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
class Component extends SvelteComponent {
|
|
322
|
+
constructor(options) {
|
|
323
|
+
super();
|
|
324
|
+
init(this, options, instance, create_fragment, safe_not_equal, { floorIndex: 1, pxmm: 2, floorplanData: 3 }, add_css);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export default Component;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
attr,
|
|
5
|
+
detach,
|
|
6
|
+
init,
|
|
7
|
+
insert,
|
|
8
|
+
noop,
|
|
9
|
+
safe_not_equal,
|
|
10
|
+
svg_element
|
|
11
|
+
} from "svelte/internal";
|
|
12
|
+
|
|
13
|
+
import { pathD } from '../../utils/formatPosition';
|
|
14
|
+
|
|
15
|
+
function create_fragment(ctx) {
|
|
16
|
+
let path_1;
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
c() {
|
|
20
|
+
path_1 = svg_element("path");
|
|
21
|
+
attr(path_1, "d", /*d*/ ctx[0]);
|
|
22
|
+
attr(path_1, "fill", "#2F313A");
|
|
23
|
+
},
|
|
24
|
+
m(target, anchor) {
|
|
25
|
+
insert(target, path_1, anchor);
|
|
26
|
+
},
|
|
27
|
+
p(ctx, [dirty]) {
|
|
28
|
+
if (dirty & /*d*/ 1) {
|
|
29
|
+
attr(path_1, "d", /*d*/ ctx[0]);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
i: noop,
|
|
33
|
+
o: noop,
|
|
34
|
+
d(detaching) {
|
|
35
|
+
if (detaching) detach(path_1);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function instance($$self, $$props, $$invalidate) {
|
|
41
|
+
let d;
|
|
42
|
+
let { path } = $$props;
|
|
43
|
+
|
|
44
|
+
$$self.$$set = $$props => {
|
|
45
|
+
if ('path' in $$props) $$invalidate(1, path = $$props.path);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
$$self.$$.update = () => {
|
|
49
|
+
if ($$self.$$.dirty & /*path*/ 2) {
|
|
50
|
+
$: $$invalidate(0, d = pathD(path, { needZ: true }));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return [d, path];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class Component extends SvelteComponent {
|
|
58
|
+
constructor(options) {
|
|
59
|
+
super();
|
|
60
|
+
init(this, options, instance, create_fragment, safe_not_equal, { path: 1 });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default Component;
|