@vertexvis/viewer 1.0.1-canary.2 → 1.0.1-canary.3
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/vertex-viewer-markup-arrow_3.cjs.entry.js +13 -3
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/viewer-markup-arrow/viewer-markup-arrow.js +5 -1
- package/dist/collection/components/viewer-markup-arrow/viewer-markup-arrow.js.map +1 -1
- package/dist/collection/components/viewer-markup-circle/viewer-markup-circle.js +4 -1
- package/dist/collection/components/viewer-markup-circle/viewer-markup-circle.js.map +1 -1
- package/dist/collection/components/viewer-markup-freeform/viewer-markup-freeform.js +4 -1
- package/dist/collection/components/viewer-markup-freeform/viewer-markup-freeform.js.map +1 -1
- package/dist/components/{p-BW8e5utk.js → p-BU5gLoBT.js} +2 -2
- package/dist/components/p-BU5gLoBT.js.map +1 -0
- package/dist/components/{p-BbgfcBho.js → p-DIFTO0vC.js} +2 -2
- package/dist/components/{p-BbgfcBho.js.map → p-DIFTO0vC.js.map} +1 -1
- package/dist/components/{p-CcApxaF2.js → p-uxwIgvLb.js} +2 -2
- package/dist/components/p-uxwIgvLb.js.map +1 -0
- package/dist/components/vertex-viewer-markup-arrow.js +1 -1
- package/dist/components/vertex-viewer-markup-circle.js +1 -1
- package/dist/components/vertex-viewer-markup-freeform.js +1 -1
- package/dist/components/vertex-viewer-markup-tool.js +1 -1
- package/dist/components/vertex-viewer-markup.js +1 -1
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +13 -3
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js.map +1 -1
- package/dist/viewer/p-67d41486.entry.js +5 -0
- package/dist/viewer/p-67d41486.entry.js.map +1 -0
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +7 -7
- package/dist/components/p-BW8e5utk.js.map +0 -1
- package/dist/components/p-CcApxaF2.js.map +0 -1
- package/dist/viewer/p-36c384a2.entry.js +0 -5
- package/dist/viewer/p-36c384a2.entry.js.map +0 -1
|
@@ -471,7 +471,11 @@ const ViewerMarkupArrow = class {
|
|
|
471
471
|
}
|
|
472
472
|
render() {
|
|
473
473
|
var _a, _b, _c, _d;
|
|
474
|
-
if (this.start != null &&
|
|
474
|
+
if (this.start != null &&
|
|
475
|
+
this.end != null &&
|
|
476
|
+
this.elementBounds != null &&
|
|
477
|
+
this.elementBounds.width > 0 &&
|
|
478
|
+
this.elementBounds.height > 0) {
|
|
475
479
|
const elementBounds = this.elementBounds;
|
|
476
480
|
const offsetX = ((_b = (_a = this.offset) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0) / dom.getWindowDevicePixelRatio();
|
|
477
481
|
const offsetY = ((_d = (_c = this.offset) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0) / dom.getWindowDevicePixelRatio();
|
|
@@ -719,7 +723,10 @@ const ViewerMarkupCircle = class {
|
|
|
719
723
|
}
|
|
720
724
|
render() {
|
|
721
725
|
var _a, _b, _c, _d;
|
|
722
|
-
if (this.bounds != null &&
|
|
726
|
+
if (this.bounds != null &&
|
|
727
|
+
this.elementBounds != null &&
|
|
728
|
+
this.elementBounds.width > 0 &&
|
|
729
|
+
this.elementBounds.height > 0) {
|
|
723
730
|
const relativeBounds = translateRectToScreen(this.bounds, this.elementBounds, this.originatingViewport, this.centeringBehavior, this.scale);
|
|
724
731
|
const center = bundle.rectangle.center(relativeBounds);
|
|
725
732
|
const offsetX = ((_b = (_a = this.offset) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0) / dom.getWindowDevicePixelRatio();
|
|
@@ -982,7 +989,10 @@ const ViewerMarkupFreeform = class {
|
|
|
982
989
|
}
|
|
983
990
|
render() {
|
|
984
991
|
var _a, _b, _c, _d;
|
|
985
|
-
if (this.screenPoints.length > 0 &&
|
|
992
|
+
if (this.screenPoints.length > 0 &&
|
|
993
|
+
this.elementBounds != null &&
|
|
994
|
+
this.elementBounds.width > 0 &&
|
|
995
|
+
this.elementBounds.height > 0) {
|
|
986
996
|
const offsetX = ((_b = (_a = this.offset) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0) / dom.getWindowDevicePixelRatio();
|
|
987
997
|
const offsetY = ((_d = (_c = this.offset) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0) / dom.getWindowDevicePixelRatio();
|
|
988
998
|
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", scale: this.scale })), index.h("g", { transform: `translate(${offsetX} ${offsetY})`, 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, this.originatingViewport, this.centeringBehavior, this.scale), offset: { x: offsetX, y: offsetY }, onTopLeftAnchorPointerDown: (e) => this.interactionHandler.editAnchor('top-left', e), onTopRightAnchorPointerDown: (e) => this.interactionHandler.editAnchor('top-right', e), onTopAnchorPointerDown: (e) => this.interactionHandler.editAnchor('top', e), onBottomLeftAnchorPointerDown: (e) => this.interactionHandler.editAnchor('bottom-left', e), onBottomRightAnchorPointerDown: (e) => this.interactionHandler.editAnchor('bottom-right', e), onBottomAnchorPointerDown: (e) => this.interactionHandler.editAnchor('bottom', e), onLeftAnchorPointerDown: (e) => this.interactionHandler.editAnchor('left', e), onRightAnchorPointerDown: (e) => this.interactionHandler.editAnchor('right', e), onCenterAnchorPointerDown: (e) => this.interactionHandler.editAnchor('center', e) })), this.mode === 'create' && (index.h("div", { class: "create-overlay", onTouchStart: this.handleTouchStart }))));
|