@vertexvis/viewer 0.13.2-canary.9 → 0.14.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/dist/cjs/{_commonjsHelpers-537d719a.js → _commonjsHelpers-dcc4cf71.js} +21 -0
- package/dist/cjs/{app-globals-3671e828.js → app-globals-2035678d.js} +1 -1
- package/dist/cjs/{browser.esm-075810bf.js → browser.esm-0bcdc581.js} +1 -1
- package/dist/cjs/{bundle.esm-618a5fe9.js → bundle.esm-22b6f2d6.js} +35 -1
- package/dist/cjs/{config-fb124bac.js → config-c63caa4f.js} +3 -2
- package/dist/cjs/{cursors-d71f6a74.js → cursors-f5d3c9a6.js} +13 -1
- package/dist/cjs/{dom-57ef84e9.js → dom-8d90bfaf.js} +1 -1
- package/dist/cjs/dom-d1bbd67c.js +10 -0
- package/dist/cjs/elementRectObserver-9b28f182.js +25 -0
- package/dist/cjs/entities-9eb7e608.js +41 -0
- package/dist/cjs/{entities-90f1347a.js → entities-e71231d8.js} +4 -4
- package/dist/cjs/{grpc-web-client.umd-60a79aae.js → grpc-web-client.umd-2af20c1b.js} +1 -1
- package/dist/cjs/{index-e100709a.js → index-4138aa2c.js} +1 -0
- package/dist/cjs/{index-3bc6bac0.js → index-b9d13137.js} +1 -1
- package/dist/cjs/index.cjs.js +25 -22
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{mapper-80ee2957.js → mapper-08bbab48.js} +4 -4
- package/dist/cjs/{markup-7f7de5f2.js → markup-f7e61d16.js} +2 -2
- package/dist/cjs/{measurement-f1ae9248.js → measurement-3367e9b7.js} +2 -2
- package/dist/cjs/{model-55abd9ab.js → model-5ca87867.js} +1 -1
- package/dist/cjs/model-a9cfd037.js +246 -0
- package/dist/cjs/{overlays-68e8eff2.js → overlays-b0ba69fd.js} +2 -2
- package/dist/cjs/{png-decoder-076131d8.js → png-decoder-ef097f37.js} +2 -2
- package/dist/cjs/{results-e9496869.js → results-178e89a3.js} +1 -1
- package/dist/cjs/{scene-92728420.js → scene-b6b78909.js} +49 -12
- package/dist/cjs/{stencil-a664cd10.js → stencil-ef19638e.js} +5 -1
- package/dist/cjs/{streamAttributes-81eb52f2.js → streamAttributes-c343bdc8.js} +1993 -78
- package/dist/cjs/utils-78928e4e.js +162 -0
- package/dist/cjs/{utils-6397efca.js → utils-b157b0af.js} +1 -1
- package/dist/cjs/{utils-463cd52e.js → utils-c74b8bf0.js} +1 -1
- package/dist/cjs/vertex-scene-tree-search_3.cjs.entry.js +16 -6
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +16 -14
- package/dist/cjs/vertex-scene-tree-table-column.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-header.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree-table-resize-divider.cjs.entry.js +3 -3
- package/dist/cjs/vertex-scene-tree-toolbar-group.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +154 -27
- package/dist/cjs/vertex-viewer-button_3.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/{vertex-viewer-dom-element_3.cjs.entry.js → vertex-viewer-dom-element_2.cjs.entry.js} +20 -178
- package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js +191 -0
- package/dist/cjs/vertex-viewer-icon.cjs.entry.js +6 -3
- package/dist/cjs/vertex-viewer-layer.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +49 -196
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +8 -7
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +16 -15
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +10 -9
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +18 -35
- package/dist/cjs/vertex-viewer-measurement-tool.cjs.entry.js +8 -7
- package/dist/cjs/vertex-viewer-measurements.cjs.entry.js +12 -11
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +167 -0
- package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js +276 -0
- package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js +322 -0
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +13272 -0
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +8 -7
- package/dist/cjs/vertex-viewer.cjs.entry.js +119 -52
- package/dist/cjs/viewer.cjs.js +4 -4
- package/dist/cjs/{viewport-54b1389d.js → viewport-5ca619f7.js} +14 -4
- package/dist/collection/__mocks__/regl-shape.js +6 -0
- package/dist/collection/__mocks__/regl.js +3 -0
- package/dist/collection/collection-manifest.json +5 -0
- package/dist/collection/components/scene-tree/lib/controller.js +17 -5
- package/dist/collection/components/scene-tree/lib/errors.js +7 -1
- package/dist/collection/components/scene-tree/lib/viewer-ops.js +12 -1
- package/dist/collection/components/scene-tree/scene-tree.js +112 -22
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.css +0 -7
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js +34 -12
- package/dist/collection/components/scene-tree-table-layout/scene-tree-table-layout.js +14 -2
- package/dist/collection/components/viewer/viewer.js +79 -14
- package/dist/collection/components/viewer-dom-element/viewer-dom-element.js +32 -4
- package/dist/collection/components/viewer-dom-group/utils.js +3 -2
- package/dist/collection/components/viewer-dom-group/viewer-dom-group.js +30 -2
- package/dist/collection/components/viewer-icon/viewer-icon.js +5 -2
- package/dist/collection/components/viewer-markup/utils.js +3 -2
- package/dist/collection/components/viewer-measurement-details/viewer-measurement-details-results.js +2 -2
- package/dist/collection/components/viewer-pin-group/pin-renderer.js +12 -0
- package/dist/collection/components/viewer-pin-group/utils.js +24 -0
- package/dist/collection/components/viewer-pin-group/viewer-pin-group.css +83 -0
- package/dist/collection/components/viewer-pin-group/viewer-pin-group.js +276 -0
- package/dist/collection/components/viewer-pin-label/utils.js +4 -0
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.css +154 -0
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.js +410 -0
- package/dist/collection/components/viewer-pin-label-line/viewer-pin-label-line.css +36 -0
- package/dist/collection/components/viewer-pin-label-line/viewer-pin-label-line.js +61 -0
- package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.css +9 -0
- package/dist/collection/components/viewer-pin-tool/viewer-pin-tool.js +277 -0
- package/dist/collection/components/viewer-transform-widget/__mocks__/widget.js +21 -0
- package/dist/collection/components/viewer-transform-widget/util.js +78 -0
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.css +48 -0
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.js +442 -0
- package/dist/collection/components/viewer-transform-widget/widget.js +259 -0
- package/dist/collection/lib/cursors.js +11 -1
- package/dist/collection/lib/interactions/baseInteractionHandler.js +9 -2
- package/dist/collection/lib/interactions/flyToPositionKeyInteraction.js +4 -3
- package/dist/collection/lib/interactions/interactionApi.js +21 -1
- package/dist/collection/lib/interactions/interactionApiOrthographic.js +18 -1
- package/dist/collection/lib/interactions/mouseInteractionHandler.js +4 -4
- package/dist/collection/lib/interactions/mouseInteractions.js +24 -1
- package/dist/collection/lib/interactions/multiTouchInteractionHandler.js +1 -2
- package/dist/collection/lib/interactions/pointerInteractionHandler.js +3 -3
- package/dist/collection/lib/mappers/streamAttributes.js +4 -2
- package/dist/collection/lib/pins/controller.js +100 -0
- package/dist/collection/lib/pins/interactions.js +183 -0
- package/dist/collection/lib/pins/model.js +136 -0
- package/dist/collection/lib/rendering/canvas.js +6 -28
- package/dist/collection/lib/scenes/camera.js +34 -2
- package/dist/collection/lib/scenes/colorMaterial.js +8 -8
- package/dist/collection/lib/scenes/mapper.js +2 -1
- package/dist/collection/lib/scenes/queries.js +6 -4
- package/dist/collection/lib/transforms/axis-lines.js +31 -0
- package/dist/collection/lib/transforms/axis-rotation.js +34 -0
- package/dist/collection/lib/transforms/axis-translation.js +30 -0
- package/dist/collection/lib/transforms/controller.js +117 -0
- package/dist/collection/lib/transforms/drawable.js +47 -0
- package/dist/collection/lib/transforms/hits.js +51 -0
- package/dist/collection/lib/transforms/line.js +58 -0
- package/dist/collection/lib/transforms/mesh.js +35 -0
- package/dist/collection/lib/transforms/shape.js +2 -0
- package/dist/collection/lib/transforms/util.js +4 -0
- package/dist/collection/lib/types/depthBuffer.js +2 -2
- package/dist/collection/lib/types/frameCamera.js +4 -6
- package/dist/collection/lib/types/viewport.js +14 -4
- package/dist/custom-elements/index.d.ts +30 -0
- package/dist/custom-elements/index.js +16835 -335
- package/dist/esm/{_commonjsHelpers-9943807e.js → _commonjsHelpers-11ca3be1.js} +20 -1
- package/dist/esm/{app-globals-3a04a531.js → app-globals-40df99a0.js} +1 -1
- package/dist/esm/{browser.esm-e72d80ad.js → browser.esm-1ddb69c9.js} +1 -1
- package/dist/esm/{bundle.esm-8ceccb91.js → bundle.esm-ce2c7ad3.js} +36 -2
- package/dist/esm/{config-fb7cd8ff.js → config-7075833a.js} +3 -2
- package/dist/esm/{cursors-fc2deed7.js → cursors-98b7d89d.js} +12 -2
- package/dist/esm/{dom-2cd18856.js → dom-5b164305.js} +1 -1
- package/dist/esm/dom-be140992.js +8 -0
- package/dist/esm/elementRectObserver-39cf7b95.js +23 -0
- package/dist/esm/{entities-78557270.js → entities-46be90d5.js} +4 -4
- package/dist/esm/entities-ce81dd7f.js +41 -0
- package/dist/esm/{grpc-web-client.umd-5982b7b0.js → grpc-web-client.umd-5409853c.js} +1 -1
- package/dist/esm/{index-10c1495a.js → index-a9fb8318.js} +1 -1
- package/dist/esm/{index-455380d0.js → index-e841d91b.js} +1 -1
- package/dist/esm/index.js +15 -14
- package/dist/esm/index.mjs +15 -14
- package/dist/esm/loader.js +4 -4
- package/dist/esm/loader.mjs +4 -4
- package/dist/esm/{mapper-da36de17.js → mapper-bde6c607.js} +4 -4
- package/dist/esm/{markup-c313d99c.js → markup-8904f2fe.js} +2 -2
- package/dist/esm/{measurement-544b69d5.js → measurement-3f9b0ae0.js} +2 -2
- package/dist/esm/{model-2a34b443.js → model-e54b081f.js} +1 -1
- package/dist/esm/model-f679c493.js +241 -0
- package/dist/esm/{overlays-354e275c.js → overlays-ea2d45ec.js} +2 -2
- package/dist/esm/{png-decoder-07de80d1.js → png-decoder-d4b65417.js} +2 -2
- package/dist/esm/{results-4d0c3568.js → results-3b4df2cf.js} +1 -1
- package/dist/esm/{scene-2bfcce74.js → scene-22ebacfd.js} +49 -12
- package/dist/esm/{stencil-9bf7fb9e.js → stencil-8b20e5a8.js} +5 -2
- package/dist/esm/{streamAttributes-d0b384b3.js → streamAttributes-72a92676.js} +1982 -67
- package/dist/esm/{utils-3ea0acdd.js → utils-0b980078.js} +1 -1
- package/dist/esm/utils-c714e2f7.js +153 -0
- package/dist/esm/{utils-e0941c61.js → utils-f11bd6f7.js} +1 -1
- package/dist/esm/vertex-scene-tree-search_3.entry.js +16 -6
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +16 -14
- package/dist/esm/vertex-scene-tree-table-column.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-table-header.entry.js +1 -1
- package/dist/esm/vertex-scene-tree-table-resize-divider.entry.js +3 -3
- package/dist/esm/vertex-scene-tree-toolbar-group.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +154 -27
- package/dist/esm/vertex-viewer-button_3.entry.js +3 -3
- package/dist/esm/vertex-viewer-default-toolbar.entry.js +1 -1
- package/dist/esm/{vertex-viewer-dom-element_3.entry.js → vertex-viewer-dom-element_2.entry.js} +21 -178
- package/dist/esm/vertex-viewer-dom-group.entry.js +187 -0
- package/dist/esm/vertex-viewer-icon.entry.js +6 -3
- package/dist/esm/vertex-viewer-layer.entry.js +1 -1
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +8 -155
- package/dist/esm/vertex-viewer-markup-tool.entry.js +5 -5
- package/dist/esm/vertex-viewer-markup.entry.js +5 -5
- package/dist/esm/vertex-viewer-measurement-details.entry.js +8 -7
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +16 -15
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +10 -9
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +15 -32
- package/dist/esm/vertex-viewer-measurement-tool.entry.js +8 -7
- package/dist/esm/vertex-viewer-measurements.entry.js +12 -11
- package/dist/esm/vertex-viewer-pin-group.entry.js +163 -0
- package/dist/esm/vertex-viewer-pin-label_2.entry.js +271 -0
- package/dist/esm/vertex-viewer-pin-tool.entry.js +318 -0
- package/dist/esm/vertex-viewer-transform-widget.entry.js +13268 -0
- package/dist/esm/vertex-viewer-view-cube.entry.js +8 -7
- package/dist/esm/vertex-viewer.entry.js +118 -51
- package/dist/esm/viewer.js +4 -4
- package/dist/esm/{viewport-5cc7b128.js → viewport-e39e2eba.js} +14 -4
- package/dist/types/__mocks__/regl-shape.d.ts +5 -0
- package/dist/types/__mocks__/regl.d.ts +5 -0
- package/dist/types/components/scene-tree/lib/controller.d.ts +13 -1
- package/dist/types/components/scene-tree/lib/errors.d.ts +3 -1
- package/dist/types/components/scene-tree/lib/viewer-ops.d.ts +1 -0
- package/dist/types/components/scene-tree/scene-tree.d.ts +16 -4
- package/dist/types/components/scene-tree-table-cell/scene-tree-table-cell.d.ts +6 -2
- package/dist/types/components/scene-tree-table-layout/scene-tree-table-layout.d.ts +2 -0
- package/dist/types/components/viewer/viewer.d.ts +13 -1
- package/dist/types/components/viewer-dom-element/viewer-dom-element.d.ts +10 -2
- package/dist/types/components/viewer-dom-group/viewer-dom-group.d.ts +9 -1
- package/dist/types/components/viewer-icon/viewer-icon.d.ts +1 -1
- package/dist/types/components/viewer-pin-group/pin-renderer.d.ts +8 -0
- package/dist/types/components/viewer-pin-group/utils.d.ts +2 -0
- package/dist/types/components/viewer-pin-group/viewer-pin-group.d.ts +49 -0
- package/dist/types/components/viewer-pin-label/utils.d.ts +1 -0
- package/dist/types/components/viewer-pin-label/viewer-pin-label.d.ts +77 -0
- package/dist/types/components/viewer-pin-label-line/viewer-pin-label-line.d.ts +7 -0
- package/dist/types/components/viewer-pin-tool/viewer-pin-tool.d.ts +68 -0
- package/dist/types/components/viewer-transform-widget/__mocks__/widget.d.ts +11 -0
- package/dist/types/components/viewer-transform-widget/util.d.ts +5 -0
- package/dist/types/components/viewer-transform-widget/viewer-transform-widget.d.ts +81 -0
- package/dist/types/components/viewer-transform-widget/widget.d.ts +74 -0
- package/dist/types/components.d.ts +303 -12
- package/dist/types/interfaces.d.ts +1 -0
- package/dist/types/lib/cursors.d.ts +10 -0
- package/dist/types/lib/interactions/baseInteractionHandler.d.ts +4 -3
- package/dist/types/lib/interactions/interactionApi.d.ts +10 -1
- package/dist/types/lib/interactions/interactionApiOrthographic.d.ts +7 -0
- package/dist/types/lib/interactions/mouseInteractionHandler.d.ts +2 -2
- package/dist/types/lib/interactions/mouseInteractions.d.ts +6 -0
- package/dist/types/lib/pins/controller.d.ts +70 -0
- package/dist/types/lib/pins/interactions.d.ts +30 -0
- package/dist/types/lib/pins/model.d.ts +104 -0
- package/dist/types/lib/rendering/canvas.d.ts +1 -2
- package/dist/types/lib/scenes/camera.d.ts +10 -0
- package/dist/types/lib/scenes/colorMaterial.d.ts +1 -0
- package/dist/types/lib/scenes/queries.d.ts +4 -2
- package/dist/types/lib/transforms/axis-lines.d.ts +6 -0
- package/dist/types/lib/transforms/axis-rotation.d.ts +6 -0
- package/dist/types/lib/transforms/axis-translation.d.ts +6 -0
- package/dist/types/lib/transforms/controller.d.ts +17 -0
- package/dist/types/lib/transforms/drawable.d.ts +26 -0
- package/dist/types/lib/transforms/hits.d.ts +10 -0
- package/dist/types/lib/transforms/line.d.ts +31 -0
- package/dist/types/lib/transforms/mesh.d.ts +23 -0
- package/dist/types/lib/transforms/shape.d.ts +3 -0
- package/dist/types/lib/transforms/util.d.ts +2 -0
- package/dist/types/lib/types/frameCamera.d.ts +1 -0
- package/dist/types/lib/types/viewport.d.ts +8 -0
- package/dist/types/regl-shape.d.ts +26 -0
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/p-058632f4.js +4 -0
- package/dist/viewer/p-07aeee89.js +10 -0
- package/dist/viewer/{p-e75bba97.js → p-083f427e.js} +1 -1
- package/dist/viewer/{p-a455ae02.entry.js → p-08eda2b2.entry.js} +1 -1
- package/dist/viewer/{p-bcb66f97.js → p-096e60bd.js} +1 -1
- package/dist/viewer/p-0bc4b3f7.js +4 -0
- package/dist/viewer/p-148c5f1a.js +4 -0
- package/dist/viewer/p-1db9bd1a.entry.js +4 -0
- package/dist/viewer/{p-70ca1ea7.entry.js → p-1f251549.entry.js} +1 -1
- package/dist/viewer/p-29986489.js +4 -0
- package/dist/viewer/{p-cafa57a6.js → p-2e581b2a.js} +1 -1
- package/dist/viewer/{p-d2bcf788.entry.js → p-33daeb09.entry.js} +1 -1
- package/dist/viewer/p-39803f8f.js +4 -0
- package/dist/viewer/p-465a92d9.entry.js +4 -0
- package/dist/viewer/p-4a65ddb3.entry.js +4 -0
- package/dist/viewer/{p-099fe6ca.entry.js → p-4aaf02b4.entry.js} +1 -1
- package/dist/viewer/{p-31658489.entry.js → p-4c3a3738.entry.js} +1 -1
- package/dist/viewer/{p-e38458da.js → p-4d37d97c.js} +1 -1
- package/dist/viewer/p-4fdf8553.entry.js +4 -0
- package/dist/viewer/p-5679f46b.entry.js +4 -0
- package/dist/viewer/p-5809b400.js +4 -0
- package/dist/viewer/{p-fa9a0bed.js → p-58dacdce.js} +1 -1
- package/dist/viewer/p-61a042f0.entry.js +4 -0
- package/dist/viewer/{p-b8774c9c.js → p-6c377932.js} +1 -1
- package/dist/viewer/p-6d379d4a.js +4 -0
- package/dist/viewer/p-6d70b198.entry.js +4 -0
- package/dist/viewer/p-6e7e094a.entry.js +4 -0
- package/dist/viewer/{p-661f0612.js → p-70e5e8a8.js} +1 -1
- package/dist/viewer/p-74102b29.entry.js +32 -0
- package/dist/viewer/p-7a5a9a93.entry.js +4 -0
- package/dist/viewer/p-7c755e0e.entry.js +4 -0
- package/dist/viewer/{p-3a20a038.js → p-92fe4417.js} +1 -1
- package/dist/viewer/{p-7e0328aa.js → p-98e6a50e.js} +1 -1
- package/dist/viewer/{p-388a43f7.js → p-990f98c2.js} +1 -1
- package/dist/viewer/{p-487e054a.js → p-99352cf0.js} +1 -1
- package/dist/viewer/{p-1ca95f9a.entry.js → p-99799a71.entry.js} +1 -1
- package/dist/viewer/p-9acd1b44.js +4 -0
- package/dist/viewer/{p-69058178.js → p-9bcde9c8.js} +1 -1
- package/dist/viewer/{p-5b342e97.js → p-a2ef15e5.js} +1 -1
- package/dist/viewer/{p-61b1097b.entry.js → p-a32cc378.entry.js} +1 -1
- package/dist/viewer/p-a380f0c2.js +4 -0
- package/dist/viewer/{p-41028d3b.entry.js → p-af37b63e.entry.js} +1 -1
- package/dist/viewer/p-b6b727a6.entry.js +4 -0
- package/dist/viewer/p-c2e3312b.js +4 -0
- package/dist/viewer/{p-4717c98e.entry.js → p-c9f91798.entry.js} +1 -1
- package/dist/viewer/p-ca518dcb.entry.js +4 -0
- package/dist/viewer/p-d828fd18.entry.js +4 -0
- package/dist/viewer/p-d996b1d2.entry.js +4 -0
- package/dist/viewer/{p-3f0f83ad.js → p-db01460a.js} +1 -1
- package/dist/viewer/p-db716103.entry.js +4 -0
- package/dist/viewer/p-df8fbe56.js +4 -0
- package/dist/viewer/p-dfe5a97d.js +4 -0
- package/dist/viewer/p-e42cb163.js +4 -0
- package/dist/viewer/p-eb8e5db5.js +4 -0
- package/dist/viewer/{p-46459921.entry.js → p-ebb801c3.entry.js} +1 -1
- package/dist/viewer/p-ebd85d58.entry.js +4 -0
- package/dist/viewer/p-eefae62a.entry.js +4 -0
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +12 -10
- package/readme.md +4 -4
- package/dist/viewer/p-0a189e62.entry.js +0 -4
- package/dist/viewer/p-112455b1.js +0 -4
- package/dist/viewer/p-3561d910.js +0 -4
- package/dist/viewer/p-49d36e94.entry.js +0 -4
- package/dist/viewer/p-73a5eacc.entry.js +0 -4
- package/dist/viewer/p-77be081a.js +0 -4
- package/dist/viewer/p-809d09d9.js +0 -4
- package/dist/viewer/p-858bd2c7.entry.js +0 -4
- package/dist/viewer/p-89b66838.entry.js +0 -32
- package/dist/viewer/p-90bb0a1f.entry.js +0 -4
- package/dist/viewer/p-a93a63a9.js +0 -4
- package/dist/viewer/p-b043b076.entry.js +0 -4
- package/dist/viewer/p-b0ac6b3c.entry.js +0 -4
- package/dist/viewer/p-bcde5521.entry.js +0 -4
- package/dist/viewer/p-d1584404.js +0 -4
- package/dist/viewer/p-d32b54cb.js +0 -4
- package/dist/viewer/p-d3a20af4.entry.js +0 -4
- package/dist/viewer/p-d9f99f4d.entry.js +0 -4
- package/dist/viewer/p-ebd55df7.entry.js +0 -4
- package/dist/viewer/p-f0411993.entry.js +0 -4
- package/dist/viewer/p-f482325b.js +0 -10
- package/dist/viewer/p-fad9693e.js +0 -4
- package/dist/viewer/p-ffdeb08c.js +0 -4
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**!
|
|
2
|
+
* Copyright (c) 2022 Vertex Software LLC. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
+
|
|
8
|
+
const index = require('./index-4138aa2c.js');
|
|
9
|
+
const bundle_esm = require('./bundle.esm-22b6f2d6.js');
|
|
10
|
+
const browser_esm = require('./browser.esm-0bcdc581.js');
|
|
11
|
+
|
|
12
|
+
const viewerDomGroupCss = ":host{display:block;transform-style:preserve-3d}";
|
|
13
|
+
|
|
14
|
+
let ViewerDomGroup = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
index.registerInstance(this, hostRef);
|
|
17
|
+
this.propertyChange = index.createEvent(this, "propertyChange", 7);
|
|
18
|
+
/**
|
|
19
|
+
* The local 3D position of where this element is located.
|
|
20
|
+
*/
|
|
21
|
+
this.position = bundle_esm.vector3.origin();
|
|
22
|
+
/**
|
|
23
|
+
* The local 3D position of where this element is located, as a JSON string.
|
|
24
|
+
* JSON representation can either be in the format of `[x, y, z]` or `{"x": 0,
|
|
25
|
+
* "y": 0, "z": 0}`.
|
|
26
|
+
*/
|
|
27
|
+
this.positionJson = '';
|
|
28
|
+
/**
|
|
29
|
+
* The local rotation of this element.
|
|
30
|
+
*/
|
|
31
|
+
this.quaternion = bundle_esm.quaternion.create();
|
|
32
|
+
/**
|
|
33
|
+
* The local rotation of this element, as a JSON string. JSON
|
|
34
|
+
* representation can either be `[x, y, z, w]` or `{"x": 0, "y": 0, "z":
|
|
35
|
+
* 0, "w": 1}`.
|
|
36
|
+
*/
|
|
37
|
+
this.quaternionJson = '';
|
|
38
|
+
/**
|
|
39
|
+
* The local scale of this element.
|
|
40
|
+
*/
|
|
41
|
+
this.scale = bundle_esm.vector3.create(1, 1, 1);
|
|
42
|
+
/**
|
|
43
|
+
* The local scale of this element, as a JSON string. JSON string
|
|
44
|
+
* representation can either be in the format of `[x, y, z]` or `{"x": 0, "y":
|
|
45
|
+
* 0, "z": 0}`.
|
|
46
|
+
*/
|
|
47
|
+
this.scaleJson = '';
|
|
48
|
+
/**
|
|
49
|
+
* The local matrix of this element.
|
|
50
|
+
*/
|
|
51
|
+
this.matrix = bundle_esm.matrix4.makeIdentity();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @ignore
|
|
55
|
+
*/
|
|
56
|
+
handlePositionChange() {
|
|
57
|
+
this.syncMatrix();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @ignore
|
|
61
|
+
*/
|
|
62
|
+
handlePositionJsonChanged() {
|
|
63
|
+
this.syncPosition();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @ignore
|
|
67
|
+
*/
|
|
68
|
+
handleRotationChanged() {
|
|
69
|
+
this.syncQuaternionWithRotation();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @ignore
|
|
73
|
+
*/
|
|
74
|
+
handleRotationJsonChanged() {
|
|
75
|
+
this.syncRotation();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @ignore
|
|
79
|
+
*/
|
|
80
|
+
handleQuaternionChange() {
|
|
81
|
+
this.syncMatrix();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @ignore
|
|
85
|
+
*/
|
|
86
|
+
handleQuaternionJsonChanged() {
|
|
87
|
+
this.syncQuaternion();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @ignore
|
|
91
|
+
*/
|
|
92
|
+
handleScaleChange() {
|
|
93
|
+
this.syncMatrix();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @ignore
|
|
97
|
+
*/
|
|
98
|
+
handleScaleJsonChanged() {
|
|
99
|
+
this.syncScale();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @ignore
|
|
103
|
+
*/
|
|
104
|
+
handleMatrixChanged(newMatrix, oldMatrix) {
|
|
105
|
+
if (!browser_esm.objects.isEqual(newMatrix, oldMatrix)) {
|
|
106
|
+
this.propertyChange.emit();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @ignore
|
|
111
|
+
*/
|
|
112
|
+
componentWillLoad() {
|
|
113
|
+
this.syncProperties();
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @ignore
|
|
117
|
+
*/
|
|
118
|
+
componentShouldUpdate() {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
syncProperties() {
|
|
122
|
+
this.syncPosition();
|
|
123
|
+
this.syncRotation();
|
|
124
|
+
this.syncQuaternion();
|
|
125
|
+
this.syncScale();
|
|
126
|
+
this.syncMatrix();
|
|
127
|
+
}
|
|
128
|
+
syncPosition() {
|
|
129
|
+
this.position =
|
|
130
|
+
this.positionJson.length > 0
|
|
131
|
+
? this.parseJson('positionJson', this.positionJson, bundle_esm.vector3.fromJson)
|
|
132
|
+
: this.position;
|
|
133
|
+
}
|
|
134
|
+
syncRotation() {
|
|
135
|
+
this.rotation =
|
|
136
|
+
this.rotationJson != null && this.rotationJson.length > 0
|
|
137
|
+
? this.parseJson('rotationJson', this.rotationJson, bundle_esm.euler.fromJson)
|
|
138
|
+
: this.rotation;
|
|
139
|
+
this.syncQuaternionWithRotation();
|
|
140
|
+
}
|
|
141
|
+
syncQuaternionWithRotation() {
|
|
142
|
+
this.quaternion =
|
|
143
|
+
this.rotation != null
|
|
144
|
+
? bundle_esm.quaternion.fromEuler(this.rotation)
|
|
145
|
+
: this.quaternion;
|
|
146
|
+
}
|
|
147
|
+
syncQuaternion() {
|
|
148
|
+
this.quaternion =
|
|
149
|
+
this.quaternionJson.length > 0
|
|
150
|
+
? this.parseJson('quaternionJson', this.quaternionJson, bundle_esm.quaternion.fromJson)
|
|
151
|
+
: this.quaternion;
|
|
152
|
+
}
|
|
153
|
+
syncScale() {
|
|
154
|
+
this.scale =
|
|
155
|
+
this.scaleJson.length > 0
|
|
156
|
+
? this.parseJson('scaleJson', this.scaleJson, bundle_esm.vector3.fromJson)
|
|
157
|
+
: this.scale;
|
|
158
|
+
}
|
|
159
|
+
syncMatrix() {
|
|
160
|
+
this.matrix = bundle_esm.matrix4.makeTRS(this.position, this.quaternion, this.scale);
|
|
161
|
+
}
|
|
162
|
+
parseJson(propName, value, parse) {
|
|
163
|
+
try {
|
|
164
|
+
return parse(value);
|
|
165
|
+
}
|
|
166
|
+
catch (e) {
|
|
167
|
+
console.warn(`Could not parse \`${propName}\`. Invalid JSON.`);
|
|
168
|
+
throw e;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @ignore
|
|
173
|
+
*/
|
|
174
|
+
render() {
|
|
175
|
+
return (index.h(index.Host, null, index.h("slot", null)));
|
|
176
|
+
}
|
|
177
|
+
static get watchers() { return {
|
|
178
|
+
"position": ["handlePositionChange"],
|
|
179
|
+
"positionJson": ["handlePositionJsonChanged"],
|
|
180
|
+
"rotation": ["handleRotationChanged"],
|
|
181
|
+
"rotationJson": ["handleRotationJsonChanged"],
|
|
182
|
+
"quaternion": ["handleQuaternionChange"],
|
|
183
|
+
"quaternionJson": ["handleQuaternionJsonChanged"],
|
|
184
|
+
"scale": ["handleScaleChange"],
|
|
185
|
+
"scaleJson": ["handleScaleJsonChanged"],
|
|
186
|
+
"matrix": ["handleMatrixChanged"]
|
|
187
|
+
}; }
|
|
188
|
+
};
|
|
189
|
+
ViewerDomGroup.style = viewerDomGroupCss;
|
|
190
|
+
|
|
191
|
+
exports.vertex_viewer_dom_group = ViewerDomGroup;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const index$1 = require('./index-
|
|
10
|
-
require('./_commonjsHelpers-
|
|
8
|
+
const index = require('./index-4138aa2c.js');
|
|
9
|
+
const index$1 = require('./index-b9d13137.js');
|
|
10
|
+
require('./_commonjsHelpers-dcc4cf71.js');
|
|
11
11
|
|
|
12
12
|
const viewerIconCss = ":host{display:inline-block;width:1em;height:1em;fill:currentColor}:host(.size-sm){font-size:16px}:host(.size-md){font-size:24px}:host(.size-lg){font-size:32px}svg{display:block;width:100%;height:100%}";
|
|
13
13
|
|
|
@@ -52,6 +52,9 @@ let ViewerIcon = class {
|
|
|
52
52
|
else if (this.name === 'close-circle') {
|
|
53
53
|
return this.renderSvgIcon(index.h("path", { d: "M8 1a7 7 0 107 7 7 7 0 00-7-7zm2.85 9.15a.49.49 0 01-.7.7L8 8.71l-2.15 2.14a.49.49 0 01-.7-.7L7.29 8 5.15 5.85a.49.49 0 01.7-.7L8 7.29l2.15-2.14a.49.49 0 01.7.7L8.71 8z" }));
|
|
54
54
|
}
|
|
55
|
+
else if (this.name === 'pin-fill') {
|
|
56
|
+
return this.renderSvgIcon(index.h("path", { d: "M8,.55A5.9,5.9,0,0,0,2.1,6.44a9.14,9.14,0,0,0,2.66,6.24,11.44,11.44,0,0,0,1.93,1.65,7.43,7.43,0,0,0,.73.44l.28.12a.78.78,0,0,0,.6,0,6.65,6.65,0,0,0,1.34-.79,11.79,11.79,0,0,0,2.76-2.88,8.59,8.59,0,0,0,1.5-4.78A5.9,5.9,0,0,0,8,.55ZM8,8.44a2,2,0,1,1,2-2A2,2,0,0,1,8,8.44Z" }));
|
|
57
|
+
}
|
|
55
58
|
else {
|
|
56
59
|
return index.h("svg", null);
|
|
57
60
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-4138aa2c.js');
|
|
9
9
|
|
|
10
10
|
const viewerLayerCss = ":host{pointer-events:none;overflow:hidden}:host(:not([stretch-off])){position:absolute;left:0;right:0;top:0;bottom:0}";
|
|
11
11
|
|
|
@@ -5,161 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
9
|
-
const bundle_esm = require('./bundle.esm-
|
|
10
|
-
const dom = require('./dom-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
require('./
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return element.getBoundingClientRect();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function getBoundingBox2dAnchorPosition(rect, position) {
|
|
20
|
-
switch (position) {
|
|
21
|
-
case 'top-left':
|
|
22
|
-
return bundle_esm.point.create(rect.x, rect.y);
|
|
23
|
-
case 'top':
|
|
24
|
-
return bundle_esm.point.create(rect.x + rect.width / 2, rect.y);
|
|
25
|
-
case 'top-right':
|
|
26
|
-
return bundle_esm.point.create(rect.x + rect.width, rect.y);
|
|
27
|
-
case 'right':
|
|
28
|
-
return bundle_esm.point.create(rect.x + rect.width, rect.y + rect.height / 2);
|
|
29
|
-
case 'bottom-right':
|
|
30
|
-
return bundle_esm.point.create(rect.x + rect.width, rect.y + rect.height);
|
|
31
|
-
case 'bottom':
|
|
32
|
-
return bundle_esm.point.create(rect.x + rect.width / 2, rect.y + rect.height);
|
|
33
|
-
case 'bottom-left':
|
|
34
|
-
return bundle_esm.point.create(rect.x, rect.y + rect.height);
|
|
35
|
-
case 'left':
|
|
36
|
-
return bundle_esm.point.create(rect.x, rect.y + rect.height / 2);
|
|
37
|
-
case 'center':
|
|
38
|
-
return bundle_esm.rectangle.center(rect);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Returns the scale factor to convert screen coordinates to canvas coordinates.
|
|
43
|
-
*
|
|
44
|
-
* Scale factor is determined by taking the shortest side of the given
|
|
45
|
-
* dimension. This behavior ensures that relative units are consistent in
|
|
46
|
-
* non-square aspect ratios.
|
|
47
|
-
*
|
|
48
|
-
* @see toRelativeScaleFactor
|
|
49
|
-
*/
|
|
50
|
-
function toScreenScaleFactor(dimensions) {
|
|
51
|
-
return Math.min(dimensions.width, dimensions.height);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Returns the scale factor to convert canvas coordinates to screen coordinates.
|
|
55
|
-
*
|
|
56
|
-
* Scale factor is determined by taking the shortest side of the given
|
|
57
|
-
* dimension. This behavior ensures that relative units are consistent in
|
|
58
|
-
* non-square aspect ratios.
|
|
59
|
-
*
|
|
60
|
-
* @see toScreenScaleFactor
|
|
61
|
-
*/
|
|
62
|
-
function toRelativeScaleFactor(dimensions) {
|
|
63
|
-
return 1 / toScreenScaleFactor(dimensions);
|
|
64
|
-
}
|
|
65
|
-
function translatePointToScreen(pt, canvasDimensions) {
|
|
66
|
-
const scaleFactor = toScreenScaleFactor(canvasDimensions);
|
|
67
|
-
return bundle_esm.point.add(bundle_esm.point.scale(pt, scaleFactor, scaleFactor), bundle_esm.dimensions.center(canvasDimensions));
|
|
68
|
-
}
|
|
69
|
-
function translateDimensionsToScreen(dimensions, canvasDimensions) {
|
|
70
|
-
const scaleFactor = toScreenScaleFactor(canvasDimensions);
|
|
71
|
-
return bundle_esm.dimensions.scale(scaleFactor, scaleFactor, dimensions);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Translates a rectangle in relative units, to a rectangle in screen units.
|
|
75
|
-
*
|
|
76
|
-
* Shape coordinates are persisted in relative units, so they can be presented
|
|
77
|
-
* at any size.
|
|
78
|
-
*/
|
|
79
|
-
function translateRectToScreen(rect, canvasDimensions) {
|
|
80
|
-
const position = translatePointToScreen(rect, canvasDimensions);
|
|
81
|
-
const dimensions = translateDimensionsToScreen(rect, canvasDimensions);
|
|
82
|
-
return bundle_esm.rectangle.fromPointAndDimensions(position, dimensions);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Translates a point in screen units, to a point in relative units.
|
|
86
|
-
*/
|
|
87
|
-
function translatePointToRelative(pt, canvasDimensions) {
|
|
88
|
-
const scaleFactor = toRelativeScaleFactor(canvasDimensions);
|
|
89
|
-
return bundle_esm.point.scale(bundle_esm.point.subtract(pt, bundle_esm.dimensions.center(canvasDimensions)), scaleFactor, scaleFactor);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Translates a set of points in relative `original` units to
|
|
93
|
-
* points in relative `bounds` units.
|
|
94
|
-
*/
|
|
95
|
-
function translatePointsToBounds(points, original, bounds) {
|
|
96
|
-
return points.map((pt) => bundle_esm.point.add(bundle_esm.point.scale(bundle_esm.point.subtract(pt, original), bounds.width / (original.width || 1), bounds.height / (original.height || 1)), bounds));
|
|
97
|
-
}
|
|
98
|
-
function createRectangle(initialPoint, currentPoint, maintainAspectRatio) {
|
|
99
|
-
const bounds = bundle_esm.rectangle.fromPoints(initialPoint, currentPoint);
|
|
100
|
-
if (maintainAspectRatio) {
|
|
101
|
-
const fitBoundsSize = Math.max(bounds.width, bounds.height);
|
|
102
|
-
const isPortrait = bounds.height > bounds.width;
|
|
103
|
-
const currentIsLeftOfInitial = currentPoint.x <= initialPoint.x;
|
|
104
|
-
const currentIsAboveInitial = currentPoint.y <= initialPoint.y;
|
|
105
|
-
const fitBoundsX = currentIsLeftOfInitial
|
|
106
|
-
? isPortrait
|
|
107
|
-
? initialPoint.x - fitBoundsSize
|
|
108
|
-
: currentPoint.x
|
|
109
|
-
: initialPoint.x;
|
|
110
|
-
const fitBoundsY = currentIsAboveInitial
|
|
111
|
-
? isPortrait
|
|
112
|
-
? currentPoint.y
|
|
113
|
-
: initialPoint.y - fitBoundsSize
|
|
114
|
-
: initialPoint.y;
|
|
115
|
-
return bundle_esm.rectangle.create(fitBoundsX, fitBoundsY, fitBoundsSize, fitBoundsSize);
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
return bounds;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function transformRectangle(bounds, start, current, anchor, maintainAspectRatio) {
|
|
122
|
-
const delta = bundle_esm.point.subtract(current, start);
|
|
123
|
-
const { x: left, y: top, width: w, height: h } = bounds;
|
|
124
|
-
const right = left + w;
|
|
125
|
-
const bottom = top + h;
|
|
126
|
-
const topLeft = bundle_esm.point.create(left, top);
|
|
127
|
-
const bottomLeft = bundle_esm.point.create(left, bottom);
|
|
128
|
-
const topRight = bundle_esm.point.create(right, top);
|
|
129
|
-
const bottomRight = bundle_esm.point.create(right, bottom);
|
|
130
|
-
switch (anchor) {
|
|
131
|
-
case 'top-left':
|
|
132
|
-
return createRectangle(bottomRight, current, !!maintainAspectRatio);
|
|
133
|
-
case 'top':
|
|
134
|
-
return createRectangle(bottomRight, bundle_esm.point.create(left, current.y), !!maintainAspectRatio);
|
|
135
|
-
case 'top-right':
|
|
136
|
-
return createRectangle(bottomLeft, current, !!maintainAspectRatio);
|
|
137
|
-
case 'right':
|
|
138
|
-
return createRectangle(bottomLeft, bundle_esm.point.create(current.x, top), !!maintainAspectRatio);
|
|
139
|
-
case 'bottom-right':
|
|
140
|
-
return createRectangle(topLeft, current, !!maintainAspectRatio);
|
|
141
|
-
case 'bottom':
|
|
142
|
-
return createRectangle(topLeft, bundle_esm.point.create(right, current.y), !!maintainAspectRatio);
|
|
143
|
-
case 'bottom-left':
|
|
144
|
-
return createRectangle(topRight, current, !!maintainAspectRatio);
|
|
145
|
-
case 'left':
|
|
146
|
-
return createRectangle(bottomRight, bundle_esm.point.create(current.x, top), !!maintainAspectRatio);
|
|
147
|
-
case 'center':
|
|
148
|
-
return bundle_esm.rectangle.create(bounds.x + delta.x, bounds.y + delta.y, bounds.width, bounds.height);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
function isVertexViewerMarkupElement(el) {
|
|
152
|
-
return (utils.isVertexViewerArrowMarkup(el) ||
|
|
153
|
-
utils.isVertexViewerCircleMarkup(el) ||
|
|
154
|
-
utils.isVertexViewerFreeformMarkup(el));
|
|
155
|
-
}
|
|
156
|
-
function isValidPointData(...points) {
|
|
157
|
-
return points.every((pt) => !isNaN(pt.x) && !isNaN(pt.y));
|
|
158
|
-
}
|
|
159
|
-
function isValidStartEvent(event) {
|
|
160
|
-
const el = event.target;
|
|
161
|
-
return isVertexViewerMarkupElement(el) && el.mode !== 'edit';
|
|
162
|
-
}
|
|
8
|
+
const index = require('./index-4138aa2c.js');
|
|
9
|
+
const bundle_esm = require('./bundle.esm-22b6f2d6.js');
|
|
10
|
+
const dom = require('./dom-8d90bfaf.js');
|
|
11
|
+
const dom$1 = require('./dom-d1bbd67c.js');
|
|
12
|
+
const utils = require('./utils-78928e4e.js');
|
|
13
|
+
const utils$1 = require('./utils-b157b0af.js');
|
|
14
|
+
const index$1 = require('./index-b9d13137.js');
|
|
15
|
+
require('./_commonjsHelpers-dcc4cf71.js');
|
|
163
16
|
|
|
164
17
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
165
18
|
const RelativeAnchor = ({ id, rotation, name, point, onPointerDown }, children) => {
|
|
@@ -227,7 +80,7 @@ let ViewerMarkupArrow = class {
|
|
|
227
80
|
};
|
|
228
81
|
this.updatePoints = (event) => {
|
|
229
82
|
if (this.elementBounds != null && this.pointerId === event.pointerId) {
|
|
230
|
-
const position = translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
83
|
+
const position = utils.translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
231
84
|
if (this.editAnchor === 'start') {
|
|
232
85
|
this.start = position;
|
|
233
86
|
}
|
|
@@ -244,7 +97,7 @@ let ViewerMarkupArrow = class {
|
|
|
244
97
|
}
|
|
245
98
|
};
|
|
246
99
|
this.handleWindowPointerDown = (event) => {
|
|
247
|
-
if (isValidStartEvent(event)) {
|
|
100
|
+
if (utils.isValidStartEvent(event)) {
|
|
248
101
|
this.startMarkup(event);
|
|
249
102
|
}
|
|
250
103
|
};
|
|
@@ -258,7 +111,7 @@ let ViewerMarkupArrow = class {
|
|
|
258
111
|
this.pointerId == null) {
|
|
259
112
|
this.pointerId = event.pointerId;
|
|
260
113
|
this.start =
|
|
261
|
-
(_a = this.start) !== null && _a !== void 0 ? _a : translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
114
|
+
(_a = this.start) !== null && _a !== void 0 ? _a : utils.translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
262
115
|
this.editBegin.emit();
|
|
263
116
|
this.addDrawingInteractionListeners();
|
|
264
117
|
}
|
|
@@ -266,10 +119,10 @@ let ViewerMarkupArrow = class {
|
|
|
266
119
|
this.endMarkup = (event) => {
|
|
267
120
|
if (this.pointerId === event.pointerId) {
|
|
268
121
|
const screenStart = this.start != null && this.elementBounds != null
|
|
269
|
-
? translatePointToScreen(this.start, this.elementBounds)
|
|
122
|
+
? utils.translatePointToScreen(this.start, this.elementBounds)
|
|
270
123
|
: undefined;
|
|
271
124
|
const screenEnd = this.end != null && this.elementBounds != null
|
|
272
|
-
? translatePointToScreen(this.end, this.elementBounds)
|
|
125
|
+
? utils.translatePointToScreen(this.end, this.elementBounds)
|
|
273
126
|
: undefined;
|
|
274
127
|
if (this.mode !== '' &&
|
|
275
128
|
screenStart != null &&
|
|
@@ -340,20 +193,20 @@ let ViewerMarkupArrow = class {
|
|
|
340
193
|
}
|
|
341
194
|
}
|
|
342
195
|
updateViewport() {
|
|
343
|
-
const rect = getMarkupBoundingClientRect(this.hostEl);
|
|
196
|
+
const rect = dom$1.getMarkupBoundingClientRect(this.hostEl);
|
|
344
197
|
this.elementBounds = rect;
|
|
345
198
|
}
|
|
346
199
|
updatePointsFromProps() {
|
|
347
|
-
this.start = this.start || utils.parsePoint(this.startJson);
|
|
348
|
-
this.end = this.end || utils.parsePoint(this.endJson);
|
|
200
|
+
this.start = this.start || utils$1.parsePoint(this.startJson);
|
|
201
|
+
this.end = this.end || utils$1.parsePoint(this.endJson);
|
|
349
202
|
}
|
|
350
203
|
render() {
|
|
351
204
|
if (this.start != null && this.end != null && this.elementBounds != null) {
|
|
352
|
-
const screenStart = translatePointToScreen(this.start, this.elementBounds);
|
|
353
|
-
const screenEnd = translatePointToScreen(this.end, this.elementBounds);
|
|
354
|
-
const arrowheadPoints = utils.createArrowheadPoints(screenStart, screenEnd);
|
|
355
|
-
if (isValidPointData(screenStart, screenEnd)) {
|
|
356
|
-
return (index.h(index.Host, null, index.h("svg", { class: "svg", onTouchStart: this.handleTouchStart }, index.h("defs", null, index.h(SvgShadow, { id: "arrow-shadow" })), index.h("g", { filter: "url(#arrow-shadow)" }, index.h("polygon", { id: "arrow-head", class: "head", points: utils.arrowheadPointsToPolygonPoints(arrowheadPoints) }), index.h("line", { id: "arrow-line", class: "line", x1: screenStart.x, y1: screenStart.y, x2: arrowheadPoints.base.x, y2: arrowheadPoints.base.y }), this.mode === 'edit' && (index.h("line", { id: "bounding-box-1d-line", class: "bounds-line", x1: screenStart.x, y1: screenStart.y, x2: screenEnd.x, y2: screenEnd.y })))), this.mode === 'edit' && (index.h(BoundingBox1d, { start: screenStart, end: screenEnd, onStartAnchorPointerDown: this.editStartPoint, onCenterAnchorPointerDown: this.editCenterPoint, onEndAnchorPointerDown: this.editEndPoint })), this.mode === 'create' && (index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart }))));
|
|
205
|
+
const screenStart = utils.translatePointToScreen(this.start, this.elementBounds);
|
|
206
|
+
const screenEnd = utils.translatePointToScreen(this.end, this.elementBounds);
|
|
207
|
+
const arrowheadPoints = utils$1.createArrowheadPoints(screenStart, screenEnd);
|
|
208
|
+
if (utils.isValidPointData(screenStart, screenEnd)) {
|
|
209
|
+
return (index.h(index.Host, null, index.h("svg", { class: "svg", onTouchStart: this.handleTouchStart }, index.h("defs", null, index.h(SvgShadow, { id: "arrow-shadow" })), index.h("g", { filter: "url(#arrow-shadow)" }, index.h("polygon", { id: "arrow-head", class: "head", points: utils$1.arrowheadPointsToPolygonPoints(arrowheadPoints) }), index.h("line", { id: "arrow-line", class: "line", x1: screenStart.x, y1: screenStart.y, x2: arrowheadPoints.base.x, y2: arrowheadPoints.base.y }), this.mode === 'edit' && (index.h("line", { id: "bounding-box-1d-line", class: "bounds-line", x1: screenStart.x, y1: screenStart.y, x2: screenEnd.x, y2: screenEnd.y })))), this.mode === 'edit' && (index.h(BoundingBox1d, { start: screenStart, end: screenEnd, onStartAnchorPointerDown: this.editStartPoint, onCenterAnchorPointerDown: this.editCenterPoint, onEndAnchorPointerDown: this.editEndPoint })), this.mode === 'create' && (index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart }))));
|
|
357
210
|
}
|
|
358
211
|
else {
|
|
359
212
|
return index.h(index.Host, null);
|
|
@@ -404,21 +257,21 @@ const BoundingBox2d = ({ bounds, onTopLeftAnchorPointerDown, onLeftAnchorPointer
|
|
|
404
257
|
width: `${padded.width}px`,
|
|
405
258
|
height: `${padded.height}px`,
|
|
406
259
|
} }),
|
|
407
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-top-left-anchor", name: "top-left-anchor", point: getBoundingBox2dAnchorPosition(padded, 'top-left'), onPointerDown: onTopLeftAnchorPointerDown },
|
|
260
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-top-left-anchor", name: "top-left-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'top-left'), onPointerDown: onTopLeftAnchorPointerDown },
|
|
408
261
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
409
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-left-anchor", name: "left-anchor", point: getBoundingBox2dAnchorPosition(padded, 'left'), onPointerDown: onLeftAnchorPointerDown },
|
|
262
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-left-anchor", name: "left-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'left'), onPointerDown: onLeftAnchorPointerDown },
|
|
410
263
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
411
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-top-right-anchor", name: "top-right-anchor", point: getBoundingBox2dAnchorPosition(padded, 'top-right'), onPointerDown: onTopRightAnchorPointerDown },
|
|
264
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-top-right-anchor", name: "top-right-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'top-right'), onPointerDown: onTopRightAnchorPointerDown },
|
|
412
265
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
413
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-right-anchor", name: "right-anchor", point: getBoundingBox2dAnchorPosition(padded, 'right'), onPointerDown: onRightAnchorPointerDown },
|
|
266
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-right-anchor", name: "right-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'right'), onPointerDown: onRightAnchorPointerDown },
|
|
414
267
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
415
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-bottom-left-anchor", name: "bottom-left-anchor", point: getBoundingBox2dAnchorPosition(padded, 'bottom-left'), onPointerDown: onBottomLeftAnchorPointerDown },
|
|
268
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-bottom-left-anchor", name: "bottom-left-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'bottom-left'), onPointerDown: onBottomLeftAnchorPointerDown },
|
|
416
269
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
417
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-bottom-anchor", name: "bottom-anchor", point: getBoundingBox2dAnchorPosition(padded, 'bottom'), onPointerDown: onBottomAnchorPointerDown },
|
|
270
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-bottom-anchor", name: "bottom-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'bottom'), onPointerDown: onBottomAnchorPointerDown },
|
|
418
271
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
419
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-bottom-right-anchor", name: "bottom-right-anchor", point: getBoundingBox2dAnchorPosition(padded, 'bottom-right'), onPointerDown: onBottomRightAnchorPointerDown },
|
|
272
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-bottom-right-anchor", name: "bottom-right-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'bottom-right'), onPointerDown: onBottomRightAnchorPointerDown },
|
|
420
273
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
421
|
-
index.h(RelativeAnchor, { id: "bounding-box-2d-top-anchor", name: "top-anchor", point: getBoundingBox2dAnchorPosition(padded, 'top'), onPointerDown: onTopAnchorPointerDown },
|
|
274
|
+
index.h(RelativeAnchor, { id: "bounding-box-2d-top-anchor", name: "top-anchor", point: utils.getBoundingBox2dAnchorPosition(padded, 'top'), onPointerDown: onTopAnchorPointerDown },
|
|
422
275
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-edge-anchor') })),
|
|
423
276
|
index.h(RelativeAnchor, { id: "bounding-box-2d-center-anchor", name: "center-anchor", point: center, onPointerDown: onCenterAnchorPointerDown },
|
|
424
277
|
index.h("div", { class: index$1.classnames('bounds-default-anchor', 'bounds-center-anchor') }))));
|
|
@@ -452,12 +305,12 @@ let ViewerMarkupCircle = class {
|
|
|
452
305
|
this.startPosition != null &&
|
|
453
306
|
this.elementBounds != null &&
|
|
454
307
|
this.pointerId === event.pointerId) {
|
|
455
|
-
const position = translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
456
|
-
this.bounds = transformRectangle((_a = this.resizeBounds) !== null && _a !== void 0 ? _a : this.bounds, this.startPosition, position, this.editAnchor, event.shiftKey);
|
|
308
|
+
const position = utils.translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
309
|
+
this.bounds = utils.transformRectangle((_a = this.resizeBounds) !== null && _a !== void 0 ? _a : this.bounds, this.startPosition, position, this.editAnchor, event.shiftKey);
|
|
457
310
|
}
|
|
458
311
|
};
|
|
459
312
|
this.handleWindowPointerDown = (event) => {
|
|
460
|
-
if (isValidStartEvent(event)) {
|
|
313
|
+
if (utils.isValidStartEvent(event)) {
|
|
461
314
|
this.startMarkup(event);
|
|
462
315
|
}
|
|
463
316
|
};
|
|
@@ -469,7 +322,7 @@ let ViewerMarkupCircle = class {
|
|
|
469
322
|
if (this.mode !== '' &&
|
|
470
323
|
this.elementBounds != null &&
|
|
471
324
|
this.pointerId == null) {
|
|
472
|
-
const position = translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
325
|
+
const position = utils.translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
473
326
|
this.pointerId = event.pointerId;
|
|
474
327
|
this.startPosition = position;
|
|
475
328
|
this.bounds =
|
|
@@ -548,16 +401,16 @@ let ViewerMarkupCircle = class {
|
|
|
548
401
|
}
|
|
549
402
|
}
|
|
550
403
|
updateViewport() {
|
|
551
|
-
const rect = getMarkupBoundingClientRect(this.hostEl);
|
|
404
|
+
const rect = dom$1.getMarkupBoundingClientRect(this.hostEl);
|
|
552
405
|
this.elementBounds = rect;
|
|
553
406
|
}
|
|
554
407
|
updateBoundsFromProps() {
|
|
555
408
|
var _a;
|
|
556
|
-
this.bounds = (_a = this.bounds) !== null && _a !== void 0 ? _a : utils.parseBounds(this.boundsJson);
|
|
409
|
+
this.bounds = (_a = this.bounds) !== null && _a !== void 0 ? _a : utils$1.parseBounds(this.boundsJson);
|
|
557
410
|
}
|
|
558
411
|
render() {
|
|
559
412
|
if (this.bounds != null && this.elementBounds != null) {
|
|
560
|
-
const relativeBounds = translateRectToScreen(this.bounds, this.elementBounds);
|
|
413
|
+
const relativeBounds = utils.translateRectToScreen(this.bounds, this.elementBounds);
|
|
561
414
|
const center = bundle_esm.rectangle.center(relativeBounds);
|
|
562
415
|
return (index.h(index.Host, null, index.h("svg", { class: "svg", onTouchStart: this.handleTouchStart }, index.h("defs", null, index.h(SvgShadow, { id: "circle-shadow" })), index.h("g", { filter: "url(#circle-shadow)" }, index.h("ellipse", { class: "ellipse", cx: center.x, cy: center.y, rx: relativeBounds.width / 2, ry: relativeBounds.height / 2, stroke: '#000ff0', "stroke-width": 4, fill: 'none' }))), this.mode === 'edit' && (index.h(BoundingBox2d, { bounds: relativeBounds, onTopLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top-left'), onTopRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top-right'), onTopAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top'), onBottomLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom-left'), onBottomRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom-right'), onBottomAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom'), onLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'left'), onRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'right'), onCenterAnchorPointerDown: (e) => this.updateEditAnchor(e, 'center') })), this.mode === 'create' && (index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart }))));
|
|
563
416
|
}
|
|
@@ -613,7 +466,7 @@ let ViewerMarkupFreeform = class {
|
|
|
613
466
|
this.editAnchor = 'bottom-right';
|
|
614
467
|
this.screenPoints = [];
|
|
615
468
|
this.handleWindowPointerDown = (event) => {
|
|
616
|
-
if (isValidStartEvent(event)) {
|
|
469
|
+
if (utils.isValidStartEvent(event)) {
|
|
617
470
|
this.startMarkup(event);
|
|
618
471
|
}
|
|
619
472
|
};
|
|
@@ -625,7 +478,7 @@ let ViewerMarkupFreeform = class {
|
|
|
625
478
|
this.resizeBounds = this.bounds;
|
|
626
479
|
this.resizePoints = this.points;
|
|
627
480
|
this.editAnchor = anchor;
|
|
628
|
-
this.resizeStartPosition = translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
481
|
+
this.resizeStartPosition = utils.translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
629
482
|
this.addEditingInteractionListeners();
|
|
630
483
|
}
|
|
631
484
|
};
|
|
@@ -635,9 +488,9 @@ let ViewerMarkupFreeform = class {
|
|
|
635
488
|
this.elementBounds != null &&
|
|
636
489
|
this.resizeBounds != null &&
|
|
637
490
|
this.resizePoints != null) {
|
|
638
|
-
const position = translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
639
|
-
const updatedBounds = transformRectangle(this.resizeBounds, this.resizeStartPosition, position, this.editAnchor, event.shiftKey);
|
|
640
|
-
this.points = translatePointsToBounds(this.resizePoints, this.resizeBounds, updatedBounds);
|
|
491
|
+
const position = utils.translatePointToRelative(dom.getMouseClientPosition(event, this.elementBounds), this.elementBounds);
|
|
492
|
+
const updatedBounds = utils.transformRectangle(this.resizeBounds, this.resizeStartPosition, position, this.editAnchor, event.shiftKey);
|
|
493
|
+
this.points = utils.translatePointsToBounds(this.resizePoints, this.resizeBounds, updatedBounds);
|
|
641
494
|
this.screenPoints = (_a = this.convertPointsToScreen()) !== null && _a !== void 0 ? _a : this.screenPoints;
|
|
642
495
|
this.bounds = updatedBounds;
|
|
643
496
|
}
|
|
@@ -647,7 +500,7 @@ let ViewerMarkupFreeform = class {
|
|
|
647
500
|
this.points != null &&
|
|
648
501
|
this.elementBounds != null) {
|
|
649
502
|
const screenPosition = dom.getMouseClientPosition(event, this.elementBounds);
|
|
650
|
-
const position = translatePointToRelative(screenPosition, this.elementBounds);
|
|
503
|
+
const position = utils.translatePointToRelative(screenPosition, this.elementBounds);
|
|
651
504
|
this.updateMinAndMax(position);
|
|
652
505
|
this.points = [...this.points, position];
|
|
653
506
|
this.screenPoints = [...this.screenPoints, screenPosition];
|
|
@@ -660,7 +513,7 @@ let ViewerMarkupFreeform = class {
|
|
|
660
513
|
this.elementBounds != null) {
|
|
661
514
|
this.pointerId = event.pointerId;
|
|
662
515
|
const screenPosition = dom.getMouseClientPosition(event, this.elementBounds);
|
|
663
|
-
const position = translatePointToRelative(screenPosition, this.elementBounds);
|
|
516
|
+
const position = utils.translatePointToRelative(screenPosition, this.elementBounds);
|
|
664
517
|
this.updateMinAndMax(position);
|
|
665
518
|
this.points = (_a = this.points) !== null && _a !== void 0 ? _a : [position];
|
|
666
519
|
this.screenPoints = (_b = this.screenPoints) !== null && _b !== void 0 ? _b : [screenPosition];
|
|
@@ -675,7 +528,7 @@ let ViewerMarkupFreeform = class {
|
|
|
675
528
|
this.points.length > 2 &&
|
|
676
529
|
this.elementBounds != null) {
|
|
677
530
|
const screenPosition = dom.getMouseClientPosition(event, this.elementBounds);
|
|
678
|
-
const position = translatePointToRelative(screenPosition, this.elementBounds);
|
|
531
|
+
const position = utils.translatePointToRelative(screenPosition, this.elementBounds);
|
|
679
532
|
this.updateMinAndMax(position);
|
|
680
533
|
this.points = [...this.points, position];
|
|
681
534
|
this.screenPoints = [...this.screenPoints, screenPosition];
|
|
@@ -750,19 +603,19 @@ let ViewerMarkupFreeform = class {
|
|
|
750
603
|
}
|
|
751
604
|
updateViewport() {
|
|
752
605
|
var _a;
|
|
753
|
-
const rect = getMarkupBoundingClientRect(this.hostEl);
|
|
606
|
+
const rect = dom$1.getMarkupBoundingClientRect(this.hostEl);
|
|
754
607
|
this.elementBounds = rect;
|
|
755
608
|
this.screenPoints = (_a = this.convertPointsToScreen()) !== null && _a !== void 0 ? _a : this.screenPoints;
|
|
756
609
|
}
|
|
757
610
|
updatePointsFromProps() {
|
|
758
611
|
var _a, _b, _c;
|
|
759
|
-
this.points = (_a = this.points) !== null && _a !== void 0 ? _a : utils.parsePoints(this.pointsJson);
|
|
612
|
+
this.points = (_a = this.points) !== null && _a !== void 0 ? _a : utils$1.parsePoints(this.pointsJson);
|
|
760
613
|
this.screenPoints = (_b = this.convertPointsToScreen()) !== null && _b !== void 0 ? _b : [];
|
|
761
|
-
this.bounds = (_c = this.bounds) !== null && _c !== void 0 ? _c : utils.parseBounds(this.boundsJson);
|
|
614
|
+
this.bounds = (_c = this.bounds) !== null && _c !== void 0 ? _c : utils$1.parseBounds(this.boundsJson);
|
|
762
615
|
}
|
|
763
616
|
render() {
|
|
764
617
|
if (this.screenPoints.length > 0 && this.elementBounds != null) {
|
|
765
|
-
return (index.h(index.Host, null, index.h("svg", { class: "svg", onTouchStart: this.handleTouchStart }, index.h("defs", null, index.h(SvgShadow, { id: "freeform-markup-shadow" })), index.h("g", { filter: "url(#freeform-markup-shadow)" }, index.h("path", { class: "path", d: this.screenPoints.reduce((d, pt) => `${d}L${pt.x},${pt.y}`, `M${this.screenPoints[0].x},${this.screenPoints[0].y}`), fill: "none" }))), this.mode === 'edit' && this.bounds != null && (index.h(BoundingBox2d, { bounds: translateRectToScreen(this.bounds, this.elementBounds), onTopLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top-left'), onTopRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top-right'), onTopAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top'), onBottomLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom-left'), onBottomRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom-right'), onBottomAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom'), onLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'left'), onRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'right'), onCenterAnchorPointerDown: (e) => this.updateEditAnchor(e, 'center') })), this.mode === 'create' && (index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart }))));
|
|
618
|
+
return (index.h(index.Host, null, index.h("svg", { class: "svg", onTouchStart: this.handleTouchStart }, index.h("defs", null, index.h(SvgShadow, { id: "freeform-markup-shadow" })), index.h("g", { filter: "url(#freeform-markup-shadow)" }, index.h("path", { class: "path", d: this.screenPoints.reduce((d, pt) => `${d}L${pt.x},${pt.y}`, `M${this.screenPoints[0].x},${this.screenPoints[0].y}`), fill: "none" }))), this.mode === 'edit' && this.bounds != null && (index.h(BoundingBox2d, { bounds: utils.translateRectToScreen(this.bounds, this.elementBounds), onTopLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top-left'), onTopRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top-right'), onTopAnchorPointerDown: (e) => this.updateEditAnchor(e, 'top'), onBottomLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom-left'), onBottomRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom-right'), onBottomAnchorPointerDown: (e) => this.updateEditAnchor(e, 'bottom'), onLeftAnchorPointerDown: (e) => this.updateEditAnchor(e, 'left'), onRightAnchorPointerDown: (e) => this.updateEditAnchor(e, 'right'), onCenterAnchorPointerDown: (e) => this.updateEditAnchor(e, 'center') })), this.mode === 'create' && (index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart }))));
|
|
766
619
|
}
|
|
767
620
|
else {
|
|
768
621
|
return (index.h(index.Host, null, index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart })));
|
|
@@ -815,7 +668,7 @@ let ViewerMarkupFreeform = class {
|
|
|
815
668
|
var _a;
|
|
816
669
|
const elementBounds = this.elementBounds;
|
|
817
670
|
if (elementBounds != null) {
|
|
818
|
-
return (_a = this.points) === null || _a === void 0 ? void 0 : _a.map((pt) => translatePointToScreen(pt, elementBounds));
|
|
671
|
+
return (_a = this.points) === null || _a === void 0 ? void 0 : _a.map((pt) => utils.translatePointToScreen(pt, elementBounds));
|
|
819
672
|
}
|
|
820
673
|
}
|
|
821
674
|
get hostEl() { return index.getElement(this); }
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-4138aa2c.js');
|
|
9
9
|
const templates = require('./templates-e57b3741.js');
|
|
10
|
-
const markup = require('./markup-
|
|
11
|
-
const utils = require('./utils-
|
|
12
|
-
require('./bundle.esm-
|
|
13
|
-
require('./browser.esm-
|
|
10
|
+
const markup = require('./markup-f7e61d16.js');
|
|
11
|
+
const utils = require('./utils-b157b0af.js');
|
|
12
|
+
require('./bundle.esm-22b6f2d6.js');
|
|
13
|
+
require('./browser.esm-0bcdc581.js');
|
|
14
14
|
|
|
15
15
|
const viewerMarkupToolCss = ":host{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none}:host([elevated=\"\"]){z-index:100}";
|
|
16
16
|
|