@realsee/dnalogel 2.0.0-alpha.29 → 2.0.0-alpha.30
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 +8 -1
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.js +922 -0
- package/dist/ItemLabelPlugin/typings.d.ts +59 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +5 -2
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +17 -8
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +49 -14
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/dist/PanoMeasurePlugin/index.d.ts +8 -5
- package/dist/PanoMeasurePlugin/index.js +1893 -3431
- package/dist/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +10 -1
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/index.js +3 -3
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +4939 -5627
- package/dist/index.js +5607 -6291
- package/dist/index.umd.js +5610 -6295
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +5 -5
- package/docs/classes/PanoFloorplanRadarPluginController.html +2 -2
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.html +3 -3
- package/docs/interfaces/CameraMovementPluginExportType.html +3 -3
- package/docs/interfaces/FloorplanBounding.html +5 -5
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +8 -8
- package/docs/interfaces/FloorplanExtraObject.html +4 -4
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +7 -7
- package/docs/interfaces/FloorplanRoomLabelItem.html +4 -4
- package/docs/interfaces/FloorplanServerBounding.html +5 -5
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerEntrance.html +8 -8
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +8 -8
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +4 -4
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/LineJson.html +1 -1
- 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 +3 -3
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +10 -10
- package/docs/modules.html +20 -20
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +558 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +228 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +120 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +59 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +12 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +5 -2
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +9 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +4 -4
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +14 -3
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +17 -8
- package/libs/PanoMeasurePlugin/Controller/index.js +57 -18
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -14
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +3 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +48 -11
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +49 -14
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +185 -60
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +24 -7
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +10 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +265 -0
- package/libs/PanoMeasurePlugin/index.d.ts +8 -5
- package/libs/PanoMeasurePlugin/index.js +2 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +10 -1
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +7 -7
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +19 -14
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +5 -6
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +3 -3
- package/libs/index.d.ts +1 -0
- package/libs/index.js +2 -1
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +1 -0
- package/libs/shared-utils/math/Interval.d.ts +13 -0
- package/libs/shared-utils/math/Interval.js +40 -0
- package/libs/shared-utils/math/Rectangle.d.ts +27 -0
- package/libs/shared-utils/math/Rectangle.js +50 -0
- package/libs/shared-utils/math/index.d.ts +2 -0
- package/libs/shared-utils/math/index.js +2 -0
- package/package.json +3 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const svg = "<svg class=\"fpm__delete-icon\" width=\"
|
|
1
|
+
declare const svg = "\n<svg class=\"fpm__delete-icon\" width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <linearGradient x1=\"22.185491%\" y1=\"100%\" x2=\"66.8316686%\" y2=\"6.67239121%\" id=\"linearGradient-1\">\n <stop stop-color=\"#FFFCFC\" stop-opacity=\"0.6\" offset=\"0%\"></stop>\n <stop stop-color=\"#FFFFFF\" offset=\"100%\"></stop>\n </linearGradient>\n </defs> \n <path fill=\"url(#linearGradient-1)\" fill-rule=\"nonzero\" transform=\"translate(2.16 2.16)\" d=\"M11.2979686,2.71818182 C11.611378,2.71818182 11.8654465,2.97561809 11.8654465,3.29318182 C11.8654465,3.58428191 11.6519584,3.82485822 11.374972,3.86293275 L11.2979686,3.86818182 L10.464,3.868 L9.7236795,10.6246222 C9.64153248,11.3737453 9.04854423,11.9512142 8.32013277,12.0165596 L8.18206028,12.0227273 L3.68338622,12.0227273 C2.89302127,12.0227273 2.22904821,11.4205655 2.141767,10.6246222 L2.141767,10.6246222 L1.4,3.868 L0.567477876,3.86818182 C0.254068499,3.86818182 0,3.61074555 0,3.29318182 C0,3.00208173 0.213488114,2.76150541 0.49047449,2.72343089 L0.567477876,2.71818182 L11.2979686,2.71818182 Z M9.322,3.868 L2.542,3.868 L3.26978106,10.4976259 C3.28762252,10.6603274 3.39528004,10.7928487 3.53932022,10.8467307 L3.61412483,10.866894 L3.68338622,10.8727273 L8.18206028,10.8727273 C8.39410941,10.8727273 8.57224853,10.7111717 8.59566544,10.4976259 L8.59566544,10.4976259 L9.322,3.868 Z M8.16824216,0 C8.48165153,0 8.73572003,0.257436269 8.73572003,0.575 C8.73572003,0.866100087 8.52223192,1.1066764 8.24524554,1.14475093 L8.16824216,1.15 L3.69720434,1.15 C3.38379497,1.15 3.12972647,0.892563731 3.12972647,0.575 C3.12972647,0.283899913 3.34321458,0.0433235966 3.62020096,0.00524907226 L3.69720434,0 L8.16824216,0 Z\"></path> \n</svg>\n";
|
|
2
2
|
export default svg;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
const svg =
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fill-rule="nonzero"
|
|
13
|
-
/>
|
|
14
|
-
</svg>`;
|
|
1
|
+
const svg = `
|
|
2
|
+
<svg class="fpm__delete-icon" width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient x1="22.185491%" y1="100%" x2="66.8316686%" y2="6.67239121%" id="linearGradient-1">
|
|
5
|
+
<stop stop-color="#FFFCFC" stop-opacity="0.6" offset="0%"></stop>
|
|
6
|
+
<stop stop-color="#FFFFFF" offset="100%"></stop>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<path fill="url(#linearGradient-1)" fill-rule="nonzero" transform="translate(2.16 2.16)" d="M11.2979686,2.71818182 C11.611378,2.71818182 11.8654465,2.97561809 11.8654465,3.29318182 C11.8654465,3.58428191 11.6519584,3.82485822 11.374972,3.86293275 L11.2979686,3.86818182 L10.464,3.868 L9.7236795,10.6246222 C9.64153248,11.3737453 9.04854423,11.9512142 8.32013277,12.0165596 L8.18206028,12.0227273 L3.68338622,12.0227273 C2.89302127,12.0227273 2.22904821,11.4205655 2.141767,10.6246222 L2.141767,10.6246222 L1.4,3.868 L0.567477876,3.86818182 C0.254068499,3.86818182 0,3.61074555 0,3.29318182 C0,3.00208173 0.213488114,2.76150541 0.49047449,2.72343089 L0.567477876,2.71818182 L11.2979686,2.71818182 Z M9.322,3.868 L2.542,3.868 L3.26978106,10.4976259 C3.28762252,10.6603274 3.39528004,10.7928487 3.53932022,10.8467307 L3.61412483,10.866894 L3.68338622,10.8727273 L8.18206028,10.8727273 C8.39410941,10.8727273 8.57224853,10.7111717 8.59566544,10.4976259 L8.59566544,10.4976259 L9.322,3.868 Z M8.16824216,0 C8.48165153,0 8.73572003,0.257436269 8.73572003,0.575 C8.73572003,0.866100087 8.52223192,1.1066764 8.24524554,1.14475093 L8.16824216,1.15 L3.69720434,1.15 C3.38379497,1.15 3.12972647,0.892563731 3.12972647,0.575 C3.12972647,0.283899913 3.34321458,0.0433235966 3.62020096,0.00524907226 L3.69720434,0 L8.16824216,0 Z"></path>
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
15
12
|
export default svg;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const image = "data:image/
|
|
1
|
+
declare const image = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIxMC43MDYlIiB5MT0iNDIuNzQ0JSIgeDI9Ijg5LjA2NCUiIHkyPSI1Ny4yMDglIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9Ii4zMDgiIG9mZnNldD0iNDkuNTY5JSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iLS4yNSIgeT0iLS4yNSIgd2lkdGg9IjU3LjUiIGhlaWdodD0iMjMuNSIgcng9IjExLjI1IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDEpIiBmaWxsPSIjMkMyQzJDIiBzdHJva2U9InVybCgjcHJlZml4X19hKSIgc3Ryb2tlLXdpZHRoPSIuNSIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsLW9wYWNpdHk9Ii4zMDMiLz48L3N2Zz4=";
|
|
2
2
|
export default image;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const image = `data:image/
|
|
1
|
+
const image = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIxMC43MDYlIiB5MT0iNDIuNzQ0JSIgeDI9Ijg5LjA2NCUiIHkyPSI1Ny4yMDglIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9Ii4zMDgiIG9mZnNldD0iNDkuNTY5JSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iLS4yNSIgeT0iLS4yNSIgd2lkdGg9IjU3LjUiIGhlaWdodD0iMjMuNSIgcng9IjExLjI1IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDEpIiBmaWxsPSIjMkMyQzJDIiBzdHJva2U9InVybCgjcHJlZml4X19hKSIgc3Ryb2tlLXdpZHRoPSIuNSIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsLW9wYWNpdHk9Ii4zMDMiLz48L3N2Zz4=`;
|
|
2
2
|
export default image;
|
|
@@ -6,10 +6,13 @@ export default class DeleteDom {
|
|
|
6
6
|
private lines;
|
|
7
7
|
private points;
|
|
8
8
|
private onClick;
|
|
9
|
+
private cancelDelete;
|
|
9
10
|
private content;
|
|
10
11
|
private container;
|
|
12
|
+
private masking;
|
|
11
13
|
constructor(five: Five, opts?: {
|
|
12
14
|
onClick?: (e: MouseEvent) => void;
|
|
15
|
+
cancelDelete?: (e: MouseEvent) => void;
|
|
13
16
|
});
|
|
14
17
|
dispose(): void;
|
|
15
18
|
appendTo(element: Element): this;
|
|
@@ -33,6 +33,12 @@ export default class DeleteDom {
|
|
|
33
33
|
writable: true,
|
|
34
34
|
value: void 0
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(this, "cancelDelete", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(this, "content", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
configurable: true,
|
|
@@ -45,6 +51,12 @@ export default class DeleteDom {
|
|
|
45
51
|
writable: true,
|
|
46
52
|
value: document.createElement('div')
|
|
47
53
|
});
|
|
54
|
+
Object.defineProperty(this, "masking", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: document.createElement('div')
|
|
59
|
+
});
|
|
48
60
|
Object.defineProperty(this, "onMouseEnter", {
|
|
49
61
|
enumerable: true,
|
|
50
62
|
configurable: true,
|
|
@@ -63,26 +75,29 @@ export default class DeleteDom {
|
|
|
63
75
|
});
|
|
64
76
|
this.five = five;
|
|
65
77
|
this.onClick = (opts === null || opts === void 0 ? void 0 : opts.onClick) || (() => void 0);
|
|
78
|
+
this.cancelDelete = (opts === null || opts === void 0 ? void 0 : opts.cancelDelete) || (() => void 0);
|
|
66
79
|
// container
|
|
67
80
|
this.container.classList.add('fpm__delete');
|
|
68
81
|
this.container.style.opacity = '0';
|
|
69
82
|
this.container.style.position = 'absolute';
|
|
70
83
|
this.container.style.left = '0';
|
|
71
|
-
this.container.style.top = '
|
|
84
|
+
this.container.style.top = '10px';
|
|
72
85
|
this.container.style.transform = `translate3d(0, 0, 10px)`;
|
|
73
86
|
this.container.style.pointerEvents = `none`;
|
|
87
|
+
this.container.style.transition = 'top 200ms ease, opacity 200ms ease';
|
|
88
|
+
this.container.style.zIndex = '99';
|
|
74
89
|
// content
|
|
75
90
|
this.content.classList.add('fpm__delete-content');
|
|
76
|
-
this.content.style.width = '
|
|
77
|
-
this.content.style.height = '
|
|
91
|
+
this.content.style.width = '62px';
|
|
92
|
+
this.content.style.height = '26px';
|
|
78
93
|
this.content.style.display = 'flex';
|
|
79
94
|
this.content.style.alignItems = 'center';
|
|
80
95
|
this.content.style.justifyContent = 'center';
|
|
81
96
|
this.content.style.transform = 'translate(-50%, -50%)';
|
|
82
97
|
this.content.style.color = '#fff';
|
|
83
|
-
this.content.style.fontSize = '
|
|
84
|
-
this.content.style.lineHeight = '
|
|
85
|
-
this.content.style.borderRadius = '
|
|
98
|
+
this.content.style.fontSize = '12px';
|
|
99
|
+
this.content.style.lineHeight = '17px';
|
|
100
|
+
this.content.style.borderRadius = '11px';
|
|
86
101
|
this.content.style.backgroundSize = '100% 100%';
|
|
87
102
|
this.content.style.cursor = 'pointer';
|
|
88
103
|
this.content.style.userSelect = 'none';
|
|
@@ -94,22 +109,30 @@ export default class DeleteDom {
|
|
|
94
109
|
this.container.append(this.content);
|
|
95
110
|
const deleteSvgDom = this.content.querySelector('.fpm__delete-icon');
|
|
96
111
|
if (deleteSvgDom) {
|
|
97
|
-
deleteSvgDom.style.width = '
|
|
98
|
-
deleteSvgDom.style.height = '
|
|
99
|
-
deleteSvgDom.style.marginRight = '
|
|
112
|
+
deleteSvgDom.style.width = '16px';
|
|
113
|
+
deleteSvgDom.style.height = '17px';
|
|
114
|
+
deleteSvgDom.style.marginRight = '1px';
|
|
100
115
|
}
|
|
101
116
|
this.content.addEventListener('click', this.onClick);
|
|
102
117
|
this.content.addEventListener('mouseenter', this.onMouseEnter);
|
|
103
118
|
this.content.addEventListener('mouseleave', this.onMouseLeave);
|
|
119
|
+
// masking
|
|
120
|
+
this.masking.setAttribute('style', 'position: absolute;top: 0;left: 0;bottom: 0;right: 0;pointer-events: none;');
|
|
121
|
+
this.masking.addEventListener('click', this.cancelDelete);
|
|
122
|
+
this.masking.addEventListener('touchstart', this.cancelDelete);
|
|
104
123
|
}
|
|
105
124
|
dispose() {
|
|
106
125
|
this.content.removeEventListener('click', this.onClick);
|
|
107
126
|
this.content.removeEventListener('mouseenter', this.onMouseEnter);
|
|
108
127
|
this.content.removeEventListener('mouseleave', this.onMouseLeave);
|
|
109
128
|
this.container.remove();
|
|
129
|
+
this.masking.removeEventListener('click', this.cancelDelete);
|
|
130
|
+
this.masking.removeEventListener('touchstart', this.cancelDelete);
|
|
131
|
+
this.masking.remove();
|
|
110
132
|
}
|
|
111
133
|
appendTo(element) {
|
|
112
134
|
element.append(this.container);
|
|
135
|
+
element.append(this.masking);
|
|
113
136
|
return this;
|
|
114
137
|
}
|
|
115
138
|
setLines(lines) {
|
|
@@ -133,20 +156,34 @@ export default class DeleteDom {
|
|
|
133
156
|
return this;
|
|
134
157
|
const centerScreenX = ((centerX + 1) / 2) * wrapper.clientWidth;
|
|
135
158
|
const maxScreenY = (-(maxY - 1) / 2) * wrapper.clientHeight;
|
|
136
|
-
|
|
137
|
-
|
|
159
|
+
let x = centerScreenX;
|
|
160
|
+
let y = maxScreenY - 34;
|
|
161
|
+
// 只有一条线时且斜率大时删除按钮位于右侧
|
|
162
|
+
if (this.lines.length === 1 && points.length === 2) {
|
|
163
|
+
const k = (yArray[1] - yArray[0]) / (xArray[1] - xArray[0]);
|
|
164
|
+
const centerY = (yArray[1] + yArray[0]) / 2;
|
|
165
|
+
const centerScreenY = (-(centerY - 1) / 2) * wrapper.clientHeight;
|
|
166
|
+
if (Math.abs(k) > 0.4) {
|
|
167
|
+
x = centerScreenX + 57;
|
|
168
|
+
y = centerScreenY;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
138
171
|
this.container.style.transform = `translate3d(${x}px, ${y}px, 10px)`;
|
|
139
172
|
return this.show();
|
|
140
173
|
}
|
|
141
174
|
hide() {
|
|
142
175
|
this.visible = false;
|
|
176
|
+
this.masking.style.pointerEvents = 'none';
|
|
143
177
|
this.container.style.opacity = '0';
|
|
178
|
+
this.container.style.top = '10px';
|
|
144
179
|
this.container.style.pointerEvents = 'none';
|
|
145
180
|
return this;
|
|
146
181
|
}
|
|
147
182
|
show() {
|
|
148
183
|
this.visible = true;
|
|
184
|
+
this.masking.style.pointerEvents = 'auto';
|
|
149
185
|
this.container.style.opacity = '1';
|
|
186
|
+
this.container.style.top = '0';
|
|
150
187
|
this.container.style.pointerEvents = 'auto';
|
|
151
188
|
return this;
|
|
152
189
|
}
|
|
@@ -1,24 +1,59 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import Hammer from 'hammerjs';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import { Subscribe, SubscribeEventMap } from '@realsee/five';
|
|
5
|
+
interface MagnifierEvent extends SubscribeEventMap {
|
|
6
|
+
wantsPanGesture: (data: {
|
|
7
|
+
deltaX: number;
|
|
8
|
+
deltaY: number;
|
|
9
|
+
srcEvent: typeof Hammer['Input'];
|
|
10
|
+
}) => boolean;
|
|
11
|
+
}
|
|
12
|
+
/** 放大镜配置参数 */
|
|
13
|
+
export interface MagnifierParameter {
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
scale?: number;
|
|
17
|
+
/** 允许拖动放大镜 */
|
|
18
|
+
dragEnabled?: boolean;
|
|
19
|
+
/** renderWithPoint 时,是否应该自动更新放大镜的位置 */
|
|
20
|
+
autoFixPCPosition?: boolean;
|
|
21
|
+
/** 放大镜初始位置应该设置在容器的哪个位置 */
|
|
22
|
+
initialPosition?: {
|
|
23
|
+
left: string;
|
|
24
|
+
top: string;
|
|
25
|
+
};
|
|
7
26
|
}
|
|
8
27
|
export default class Magnifier {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
hooks: Subscribe<MagnifierEvent>;
|
|
32
|
+
contentDom: HTMLCanvasElement;
|
|
9
33
|
private five;
|
|
10
34
|
private scale;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private originWidth;
|
|
15
|
-
private originHeight;
|
|
16
|
-
private context;
|
|
35
|
+
private wrapper?;
|
|
36
|
+
private config;
|
|
37
|
+
private offset;
|
|
17
38
|
private canvas;
|
|
18
|
-
private
|
|
19
|
-
|
|
39
|
+
private context;
|
|
40
|
+
private renderCenter;
|
|
41
|
+
private lastPanEvent?;
|
|
42
|
+
private hammer?;
|
|
43
|
+
constructor(five: Five, options: MagnifierParameter);
|
|
20
44
|
dispose(): void;
|
|
45
|
+
/** 移除放大镜 DOM */
|
|
46
|
+
remove(): void;
|
|
47
|
+
/** 清除放大镜渲染内容 */
|
|
21
48
|
clear(): void;
|
|
49
|
+
/** 把放大镜放到某一个容器中 */
|
|
22
50
|
appendTo(element: Element): void;
|
|
23
|
-
|
|
51
|
+
/** 放大传入点位周围的内容 */
|
|
52
|
+
renderWithPoint(point: THREE.Vector3): void;
|
|
53
|
+
private autoFixPCPosition;
|
|
54
|
+
private render;
|
|
55
|
+
private initStyle;
|
|
56
|
+
private onPan;
|
|
57
|
+
private onPanEnd;
|
|
24
58
|
}
|
|
59
|
+
export {};
|