@embedpdf/plugin-annotation 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1131 -203
- package/dist/index.js.map +1 -1
- package/dist/lib/annotation-plugin.d.ts +2 -0
- package/dist/lib/geometry/cloudy-border.d.ts +90 -0
- package/dist/lib/geometry/index.d.ts +1 -0
- package/dist/lib/handlers/index.d.ts +4 -0
- package/dist/lib/handlers/insert-text.handler.d.ts +8 -0
- package/dist/lib/handlers/replace-text.handler.d.ts +9 -0
- package/dist/lib/handlers/selection-utils.d.ts +7 -0
- package/dist/lib/handlers/text-markup.handler.d.ts +7 -0
- package/dist/lib/handlers/text.handler.d.ts +3 -0
- package/dist/lib/handlers/types.d.ts +14 -1
- package/dist/lib/helpers.d.ts +2 -1
- package/dist/lib/selectors.d.ts +6 -1
- package/dist/lib/tools/default-tools.d.ts +141 -45
- package/dist/lib/tools/tools-utils.d.ts +2 -0
- package/dist/lib/tools/types.d.ts +34 -1
- package/dist/lib/types.d.ts +1 -0
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +621 -274
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +621 -274
- package/dist/react/index.js.map +1 -1
- package/dist/shared/annotation-bounds.d.ts +14 -0
- package/dist/shared/components/annotation-container.d.ts +4 -2
- package/dist/shared/components/annotations/caret.d.ts +24 -0
- package/dist/shared/components/annotations/circle.d.ts +8 -4
- package/dist/shared/components/annotations/free-text.d.ts +2 -2
- package/dist/shared/components/annotations/ink.d.ts +2 -2
- package/dist/shared/components/annotations/line.d.ts +2 -2
- package/dist/shared/components/annotations/link.d.ts +2 -2
- package/dist/shared/components/annotations/polygon.d.ts +5 -3
- package/dist/shared/components/annotations/polyline.d.ts +8 -4
- package/dist/shared/components/annotations/square.d.ts +8 -4
- package/dist/shared/components/annotations/stamp.d.ts +2 -2
- package/dist/shared/components/annotations/text.d.ts +14 -0
- package/dist/shared/components/text-markup/highlight.d.ts +2 -2
- package/dist/shared/components/text-markup/squiggly.d.ts +2 -2
- package/dist/shared/components/text-markup/strikeout.d.ts +2 -2
- package/dist/shared/components/text-markup/underline.d.ts +2 -2
- package/dist/shared/components/types.d.ts +8 -4
- package/dist/shared-preact/annotation-bounds.d.ts +14 -0
- package/dist/shared-preact/components/annotation-container.d.ts +4 -2
- package/dist/shared-preact/components/annotations/caret.d.ts +24 -0
- package/dist/shared-preact/components/annotations/circle.d.ts +8 -4
- package/dist/shared-preact/components/annotations/free-text.d.ts +2 -2
- package/dist/shared-preact/components/annotations/ink.d.ts +2 -2
- package/dist/shared-preact/components/annotations/line.d.ts +2 -2
- package/dist/shared-preact/components/annotations/link.d.ts +2 -2
- package/dist/shared-preact/components/annotations/polygon.d.ts +5 -3
- package/dist/shared-preact/components/annotations/polyline.d.ts +8 -4
- package/dist/shared-preact/components/annotations/square.d.ts +8 -4
- package/dist/shared-preact/components/annotations/stamp.d.ts +2 -2
- package/dist/shared-preact/components/annotations/text.d.ts +14 -0
- package/dist/shared-preact/components/text-markup/highlight.d.ts +2 -2
- package/dist/shared-preact/components/text-markup/squiggly.d.ts +2 -2
- package/dist/shared-preact/components/text-markup/strikeout.d.ts +2 -2
- package/dist/shared-preact/components/text-markup/underline.d.ts +2 -2
- package/dist/shared-preact/components/types.d.ts +8 -4
- package/dist/shared-react/annotation-bounds.d.ts +14 -0
- package/dist/shared-react/components/annotation-container.d.ts +4 -2
- package/dist/shared-react/components/annotations/caret.d.ts +24 -0
- package/dist/shared-react/components/annotations/circle.d.ts +8 -4
- package/dist/shared-react/components/annotations/free-text.d.ts +2 -2
- package/dist/shared-react/components/annotations/ink.d.ts +2 -2
- package/dist/shared-react/components/annotations/line.d.ts +2 -2
- package/dist/shared-react/components/annotations/link.d.ts +2 -2
- package/dist/shared-react/components/annotations/polygon.d.ts +5 -3
- package/dist/shared-react/components/annotations/polyline.d.ts +8 -4
- package/dist/shared-react/components/annotations/square.d.ts +8 -4
- package/dist/shared-react/components/annotations/stamp.d.ts +2 -2
- package/dist/shared-react/components/annotations/text.d.ts +14 -0
- package/dist/shared-react/components/text-markup/highlight.d.ts +2 -2
- package/dist/shared-react/components/text-markup/squiggly.d.ts +2 -2
- package/dist/shared-react/components/text-markup/strikeout.d.ts +2 -2
- package/dist/shared-react/components/text-markup/underline.d.ts +2 -2
- package/dist/shared-react/components/types.d.ts +8 -4
- package/dist/shared-vue/annotation-bounds.d.ts +14 -0
- package/dist/svelte/components/annotations/Caret.svelte.d.ts +13 -0
- package/dist/svelte/components/annotations/Circle.svelte.d.ts +4 -2
- package/dist/svelte/components/annotations/FreeText.svelte.d.ts +1 -1
- package/dist/svelte/components/annotations/Ink.svelte.d.ts +1 -1
- package/dist/svelte/components/annotations/Line.svelte.d.ts +1 -1
- package/dist/svelte/components/annotations/Link.svelte.d.ts +1 -1
- package/dist/svelte/components/annotations/Polygon.svelte.d.ts +2 -1
- package/dist/svelte/components/annotations/Polyline.svelte.d.ts +4 -2
- package/dist/svelte/components/annotations/Square.svelte.d.ts +4 -2
- package/dist/svelte/components/annotations/Stamp.svelte.d.ts +1 -1
- package/dist/svelte/components/annotations/Text.svelte.d.ts +10 -0
- package/dist/svelte/components/annotations/index.d.ts +1 -0
- package/dist/svelte/components/renderers/CaretRenderer.svelte.d.ts +5 -0
- package/dist/svelte/components/renderers/TextRenderer.svelte.d.ts +5 -0
- package/dist/svelte/components/text-markup/Highlight.svelte.d.ts +1 -1
- package/dist/svelte/components/text-markup/Squiggly.svelte.d.ts +1 -1
- package/dist/svelte/components/text-markup/Strikeout.svelte.d.ts +1 -1
- package/dist/svelte/components/text-markup/Underline.svelte.d.ts +1 -1
- package/dist/svelte/components/types.d.ts +2 -1
- package/dist/svelte/context/types.d.ts +7 -3
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +831 -416
- package/dist/svelte/index.js.map +1 -1
- package/dist/vue/components/annotation-container.vue.d.ts +9 -8
- package/dist/vue/components/annotation-layer.vue.d.ts +1 -1
- package/dist/vue/components/annotations/caret.vue.d.ts +24 -0
- package/dist/vue/components/annotations/circle.vue.d.ts +7 -3
- package/dist/vue/components/annotations/free-text.vue.d.ts +2 -2
- package/dist/vue/components/annotations/index.d.ts +1 -0
- package/dist/vue/components/annotations/ink.vue.d.ts +2 -2
- package/dist/vue/components/annotations/line.vue.d.ts +2 -2
- package/dist/vue/components/annotations/link.vue.d.ts +2 -2
- package/dist/vue/components/annotations/polygon.vue.d.ts +4 -2
- package/dist/vue/components/annotations/polyline.vue.d.ts +8 -3
- package/dist/vue/components/annotations/square.vue.d.ts +7 -3
- package/dist/vue/components/annotations/stamp.vue.d.ts +2 -2
- package/dist/vue/components/annotations/text.vue.d.ts +14 -0
- package/dist/vue/components/annotations.vue.d.ts +9 -10
- package/dist/vue/components/renderers/caret-renderer.vue.d.ts +6 -0
- package/dist/vue/components/renderers/text-renderer.vue.d.ts +6 -0
- package/dist/vue/components/text-markup/highlight.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/squiggly.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/strikeout.vue.d.ts +2 -2
- package/dist/vue/components/text-markup/underline.vue.d.ts +2 -2
- package/dist/vue/context/types.d.ts +7 -3
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +778 -354
- package/dist/vue/index.js.map +1 -1
- package/package.json +10 -10
package/dist/vue/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { createPluginPackage } from "@embedpdf/core";
|
|
2
|
-
import { AnnotationPlugin, initialDocumentState, inferRotationCenterFromRects, patching, resolveInteractionProp, getAnnotationsByPageIndex, getSelectedAnnotationIds, AnnotationPluginPackage as AnnotationPluginPackage$1 } from "@embedpdf/plugin-annotation";
|
|
2
|
+
import { AnnotationPlugin, initialDocumentState, inferRotationCenterFromRects, generateCloudyRectanglePath, generateCloudyEllipsePath, patching, generateCloudyPolygonPath, resolveInteractionProp, getAnnotationsByPageIndex, getSelectedAnnotationIds, AnnotationPluginPackage as AnnotationPluginPackage$1 } from "@embedpdf/plugin-annotation";
|
|
3
3
|
export * from "@embedpdf/plugin-annotation";
|
|
4
|
-
import { defineComponent, ref, watchEffect, openBlock, createElementBlock, normalizeStyle, createCommentVNode, toValue, watch, computed, shallowRef, toRaw, useSlots, createElementVNode, Fragment, unref,
|
|
4
|
+
import { defineComponent, ref, watchEffect, openBlock, createElementBlock, normalizeStyle, createCommentVNode, toValue, watch, computed, shallowRef, toRaw, useSlots, createElementVNode, renderSlot, createBlock, Fragment, unref, normalizeProps, mergeProps, renderList, withCtx, resolveDynamicComponent, Teleport, toDisplayString, markRaw, provide, inject, onUnmounted, onMounted, createVNode, createSlots, guardReactiveProps } from "vue";
|
|
5
|
+
import { getCounterRotation } from "@embedpdf/utils";
|
|
5
6
|
import { useInteractionHandles, useDoublePressProps, CounterRotate, deepToRaw } from "@embedpdf/utils/vue";
|
|
6
7
|
import { useCapability, usePlugin, useDocumentPermissions, useDocumentState } from "@embedpdf/core/vue";
|
|
7
|
-
import { boundingRectOrEmpty, PdfAnnotationBorderStyle, PdfVerticalAlignment, textAlignmentToCss, standardFontCssProperties, ignore, PdfErrorCode, PdfAnnotationSubtype, blendModeToCss
|
|
8
|
+
import { boundingRectOrEmpty, PdfAnnotationBorderStyle, PdfVerticalAlignment, textAlignmentToCss, standardFontCssProperties, ignore, PdfErrorCode, getContrastStrokeColor, PdfBlendMode, PdfAnnotationSubtype, blendModeToCss } from "@embedpdf/models";
|
|
8
9
|
import { usePointerHandlers } from "@embedpdf/plugin-interaction-manager/vue";
|
|
9
10
|
import { useSelectionCapability } from "@embedpdf/plugin-selection/vue";
|
|
10
|
-
const _hoisted_1$
|
|
11
|
-
const _sfc_main$
|
|
11
|
+
const _hoisted_1$d = ["src"];
|
|
12
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
12
13
|
__name: "appearance-image",
|
|
13
14
|
props: {
|
|
14
15
|
appearance: {},
|
|
@@ -51,7 +52,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
51
52
|
userSelect: "none",
|
|
52
53
|
...__props.style
|
|
53
54
|
})
|
|
54
|
-
}, null, 44, _hoisted_1$
|
|
55
|
+
}, null, 44, _hoisted_1$d)) : createCommentVNode("", true);
|
|
55
56
|
};
|
|
56
57
|
}
|
|
57
58
|
});
|
|
@@ -85,13 +86,13 @@ const useAnnotation = (documentId) => {
|
|
|
85
86
|
})
|
|
86
87
|
};
|
|
87
88
|
};
|
|
88
|
-
const _hoisted_1$
|
|
89
|
-
const _hoisted_2$
|
|
90
|
-
const __default__$
|
|
89
|
+
const _hoisted_1$c = ["width", "height", "stroke"];
|
|
90
|
+
const _hoisted_2$a = ["width", "height", "stroke"];
|
|
91
|
+
const __default__$e = {
|
|
91
92
|
inheritAttrs: false
|
|
92
93
|
};
|
|
93
|
-
const _sfc_main$
|
|
94
|
-
...__default__$
|
|
94
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
95
|
+
...__default__$e,
|
|
95
96
|
__name: "annotation-container",
|
|
96
97
|
props: {
|
|
97
98
|
scale: {},
|
|
@@ -120,6 +121,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
120
121
|
resizeUi: {},
|
|
121
122
|
vertexUi: {},
|
|
122
123
|
rotationUi: {},
|
|
124
|
+
blendMode: {},
|
|
123
125
|
style: {}
|
|
124
126
|
},
|
|
125
127
|
setup(__props) {
|
|
@@ -225,6 +227,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
225
227
|
const currentObject = computed(
|
|
226
228
|
() => ({ ...toRaw(props.trackedAnnotation.object), ...toRaw(preview.value) })
|
|
227
229
|
);
|
|
230
|
+
const hasNoZoom = computed(() => (props.trackedAnnotation.object.flags ?? []).includes("noZoom"));
|
|
231
|
+
const hasNoRotate = computed(
|
|
232
|
+
() => (props.trackedAnnotation.object.flags ?? []).includes("noRotate")
|
|
233
|
+
);
|
|
234
|
+
const visualScale = computed(() => hasNoZoom.value ? 1 : props.scale);
|
|
235
|
+
const effectivePageRotation = computed(() => hasNoRotate.value ? 0 : props.rotation);
|
|
228
236
|
const annotationRotation = computed(
|
|
229
237
|
() => liveRotation.value ?? currentObject.value.rotation ?? 0
|
|
230
238
|
);
|
|
@@ -269,8 +277,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
269
277
|
y: currentObject.value.rect.origin.y * props.scale
|
|
270
278
|
},
|
|
271
279
|
size: {
|
|
272
|
-
width: currentObject.value.rect.size.width *
|
|
273
|
-
height: currentObject.value.rect.size.height *
|
|
280
|
+
width: currentObject.value.rect.size.width * visualScale.value,
|
|
281
|
+
height: currentObject.value.rect.size.height * visualScale.value
|
|
274
282
|
}
|
|
275
283
|
}));
|
|
276
284
|
const menuContext = computed(() => ({
|
|
@@ -279,7 +287,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
279
287
|
pageIndex: props.pageIndex
|
|
280
288
|
}));
|
|
281
289
|
const menuPlacement = computed(() => {
|
|
282
|
-
const effectiveAngle = ((annotationRotation.value +
|
|
290
|
+
const effectiveAngle = ((annotationRotation.value + effectivePageRotation.value * 90) % 360 + 360) % 360;
|
|
283
291
|
const handleNearMenuSide = effectiveIsRotatable.value && effectiveAngle > 90 && effectiveAngle < 270;
|
|
284
292
|
return {
|
|
285
293
|
suggestTop: handleNearMenuSide
|
|
@@ -462,32 +470,38 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
462
470
|
];
|
|
463
471
|
onCleanup(() => unsubs.forEach((u) => u()));
|
|
464
472
|
});
|
|
465
|
-
const aabbWidth = computed(() => currentObject.value.rect.size.width *
|
|
466
|
-
const aabbHeight = computed(() => currentObject.value.rect.size.height *
|
|
467
|
-
const innerWidth = computed(() => effectiveUnrotatedRect.value.size.width *
|
|
468
|
-
const innerHeight = computed(() => effectiveUnrotatedRect.value.size.height *
|
|
473
|
+
const aabbWidth = computed(() => currentObject.value.rect.size.width * visualScale.value);
|
|
474
|
+
const aabbHeight = computed(() => currentObject.value.rect.size.height * visualScale.value);
|
|
475
|
+
const innerWidth = computed(() => effectiveUnrotatedRect.value.size.width * visualScale.value);
|
|
476
|
+
const innerHeight = computed(() => effectiveUnrotatedRect.value.size.height * visualScale.value);
|
|
469
477
|
const usesCustomPivot = computed(
|
|
470
478
|
() => Boolean(explicitUnrotatedRect.value) && annotationRotation.value !== 0
|
|
471
479
|
);
|
|
472
480
|
const innerLeft = computed(
|
|
473
|
-
() => usesCustomPivot.value ? (effectiveUnrotatedRect.value.origin.x - currentObject.value.rect.origin.x) *
|
|
481
|
+
() => usesCustomPivot.value ? (effectiveUnrotatedRect.value.origin.x - currentObject.value.rect.origin.x) * visualScale.value : (aabbWidth.value - innerWidth.value) / 2
|
|
474
482
|
);
|
|
475
483
|
const innerTop = computed(
|
|
476
|
-
() => usesCustomPivot.value ? (effectiveUnrotatedRect.value.origin.y - currentObject.value.rect.origin.y) *
|
|
484
|
+
() => usesCustomPivot.value ? (effectiveUnrotatedRect.value.origin.y - currentObject.value.rect.origin.y) * visualScale.value : (aabbHeight.value - innerHeight.value) / 2
|
|
477
485
|
);
|
|
478
486
|
const innerTransformOrigin = computed(() => {
|
|
479
487
|
if (usesCustomPivot.value && rotationPivot.value) {
|
|
480
|
-
return `${(rotationPivot.value.x - effectiveUnrotatedRect.value.origin.x) *
|
|
488
|
+
return `${(rotationPivot.value.x - effectiveUnrotatedRect.value.origin.x) * visualScale.value}px ${(rotationPivot.value.y - effectiveUnrotatedRect.value.origin.y) * visualScale.value}px`;
|
|
481
489
|
}
|
|
482
490
|
return "center center";
|
|
483
491
|
});
|
|
484
492
|
const centerX = computed(
|
|
485
|
-
() => rotationPivot.value ? (rotationPivot.value.x - currentObject.value.rect.origin.x) *
|
|
493
|
+
() => rotationPivot.value ? (rotationPivot.value.x - currentObject.value.rect.origin.x) * visualScale.value : aabbWidth.value / 2
|
|
486
494
|
);
|
|
487
495
|
const centerY = computed(
|
|
488
|
-
() => rotationPivot.value ? (rotationPivot.value.y - currentObject.value.rect.origin.y) *
|
|
496
|
+
() => rotationPivot.value ? (rotationPivot.value.y - currentObject.value.rect.origin.y) * visualScale.value : aabbHeight.value / 2
|
|
489
497
|
);
|
|
490
498
|
const guideLength = computed(() => Math.max(300, Math.max(aabbWidth.value, aabbHeight.value) + 80));
|
|
499
|
+
const counterRot = computed(
|
|
500
|
+
() => hasNoRotate.value ? getCounterRotation(
|
|
501
|
+
{ origin: { x: 0, y: 0 }, size: { width: aabbWidth.value, height: aabbHeight.value } },
|
|
502
|
+
props.rotation
|
|
503
|
+
) : null
|
|
504
|
+
);
|
|
491
505
|
const rotationIconSize = computed(() => Math.round(ROTATION_SIZE.value * 0.6));
|
|
492
506
|
const apActive = computed(
|
|
493
507
|
() => {
|
|
@@ -496,15 +510,31 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
496
510
|
}
|
|
497
511
|
);
|
|
498
512
|
const contentsStyle = { display: "contents" };
|
|
499
|
-
const
|
|
513
|
+
const layerBaseStyle = computed(() => ({
|
|
500
514
|
position: "absolute",
|
|
501
515
|
left: `${currentObject.value.rect.origin.x * props.scale}px`,
|
|
502
516
|
top: `${currentObject.value.rect.origin.y * props.scale}px`,
|
|
503
|
-
width: `${aabbWidth.value}px`,
|
|
504
|
-
height: `${aabbHeight.value}px`,
|
|
517
|
+
width: `${counterRot.value ? counterRot.value.width : aabbWidth.value}px`,
|
|
518
|
+
height: `${counterRot.value ? counterRot.value.height : aabbHeight.value}px`,
|
|
505
519
|
pointerEvents: "none",
|
|
506
520
|
zIndex: props.zIndex,
|
|
507
|
-
...
|
|
521
|
+
...counterRot.value ? { transform: counterRot.value.matrix, transformOrigin: "0 0" } : {}
|
|
522
|
+
}));
|
|
523
|
+
const visualLayerStyle = computed(() => ({
|
|
524
|
+
...layerBaseStyle.value,
|
|
525
|
+
...props.blendMode ? { mixBlendMode: props.blendMode } : {},
|
|
526
|
+
...props.style
|
|
527
|
+
}));
|
|
528
|
+
const outerAABBStyle = computed(() => layerBaseStyle.value);
|
|
529
|
+
const visualInnerStyle = computed(() => ({
|
|
530
|
+
position: "absolute",
|
|
531
|
+
left: `${innerLeft.value}px`,
|
|
532
|
+
top: `${innerTop.value}px`,
|
|
533
|
+
width: `${innerWidth.value}px`,
|
|
534
|
+
height: `${innerHeight.value}px`,
|
|
535
|
+
transform: annotationRotation.value !== 0 ? `rotate(${annotationRotation.value}deg)` : void 0,
|
|
536
|
+
transformOrigin: innerTransformOrigin.value,
|
|
537
|
+
pointerEvents: "none"
|
|
508
538
|
}));
|
|
509
539
|
const innerRotatedStyle = computed(() => ({
|
|
510
540
|
position: "absolute",
|
|
@@ -616,6 +646,23 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
616
646
|
"data-no-interaction": "",
|
|
617
647
|
style: contentsStyle
|
|
618
648
|
}, [
|
|
649
|
+
createElementVNode("div", {
|
|
650
|
+
style: normalizeStyle(visualLayerStyle.value)
|
|
651
|
+
}, [
|
|
652
|
+
createElementVNode("div", {
|
|
653
|
+
style: normalizeStyle(visualInnerStyle.value)
|
|
654
|
+
}, [
|
|
655
|
+
renderSlot(_ctx.$slots, "default", {
|
|
656
|
+
annotation: childObject.value,
|
|
657
|
+
appearanceActive: apActive.value
|
|
658
|
+
}),
|
|
659
|
+
((_a = __props.appearance) == null ? void 0 : _a.normal) ? (openBlock(), createBlock(_sfc_main$D, {
|
|
660
|
+
key: 0,
|
|
661
|
+
appearance: __props.appearance.normal,
|
|
662
|
+
style: normalizeStyle({ display: apActive.value ? "block" : "none" })
|
|
663
|
+
}, null, 8, ["appearance", "style"])) : createCommentVNode("", true)
|
|
664
|
+
], 4)
|
|
665
|
+
], 4),
|
|
619
666
|
createElementVNode("div", {
|
|
620
667
|
style: normalizeStyle(outerAABBStyle.value)
|
|
621
668
|
}, [
|
|
@@ -658,7 +705,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
658
705
|
}, [..._cache[2] || (_cache[2] = [
|
|
659
706
|
createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
|
|
660
707
|
createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
|
|
661
|
-
])], 8, _hoisted_1$
|
|
708
|
+
])], 8, _hoisted_1$c))
|
|
662
709
|
], 16)
|
|
663
710
|
]) : (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, rotationHandleBindings.value, { style: rotationHandleStyle.value }), [
|
|
664
711
|
(openBlock(), createElementBlock("svg", {
|
|
@@ -673,20 +720,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
673
720
|
}, [..._cache[3] || (_cache[3] = [
|
|
674
721
|
createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
|
|
675
722
|
createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
|
|
676
|
-
])], 8, _hoisted_2$
|
|
723
|
+
])], 8, _hoisted_2$a))
|
|
677
724
|
], 16))
|
|
678
725
|
], 32)) : createCommentVNode("", true),
|
|
679
726
|
createElementVNode("div", mergeProps({ ...effectiveIsDraggable.value && __props.isSelected ? unref(dragProps) : {}, ...unref(doubleProps) }, { style: innerRotatedStyle.value }), [
|
|
680
|
-
|
|
681
|
-
annotation: childObject.value,
|
|
682
|
-
appearanceActive: apActive.value
|
|
683
|
-
}),
|
|
684
|
-
((_a = __props.appearance) == null ? void 0 : _a.normal) ? (openBlock(), createBlock(_sfc_main$z, {
|
|
685
|
-
key: 0,
|
|
686
|
-
appearance: __props.appearance.normal,
|
|
687
|
-
style: normalizeStyle({ display: apActive.value ? "block" : "none" })
|
|
688
|
-
}, null, 8, ["appearance", "style"])) : createCommentVNode("", true),
|
|
689
|
-
__props.isSelected && effectiveIsResizable.value && !rotationActive.value ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(resize), ({ key, style, ...handle }) => {
|
|
727
|
+
__props.isSelected && effectiveIsResizable.value && !rotationActive.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(resize), ({ key, style, ...handle }) => {
|
|
690
728
|
return openBlock(), createElementBlock(Fragment, { key }, [
|
|
691
729
|
unref(slots)["resize-handle"] ? renderSlot(_ctx.$slots, "resize-handle", mergeProps({
|
|
692
730
|
key: 0,
|
|
@@ -703,7 +741,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
703
741
|
}), null, 16))
|
|
704
742
|
], 64);
|
|
705
743
|
}), 128)) : createCommentVNode("", true),
|
|
706
|
-
__props.isSelected && unref(permissions).canModifyAnnotations && !__props.isMultiSelected && !rotationActive.value && unref(vertices).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key:
|
|
744
|
+
__props.isSelected && unref(permissions).canModifyAnnotations && !__props.isMultiSelected && !rotationActive.value && unref(vertices).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(vertices), ({ key, style, ...vertex }) => {
|
|
707
745
|
return openBlock(), createElementBlock(Fragment, { key }, [
|
|
708
746
|
unref(slots)["vertex-handle"] ? renderSlot(_ctx.$slots, "vertex-handle", mergeProps({
|
|
709
747
|
key: 0,
|
|
@@ -751,14 +789,65 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
751
789
|
};
|
|
752
790
|
}
|
|
753
791
|
});
|
|
754
|
-
|
|
792
|
+
function mapCounterRotatePoint(x, y, width, height, rotation) {
|
|
793
|
+
switch (rotation) {
|
|
794
|
+
case 1:
|
|
795
|
+
return { x: y, y: height - x };
|
|
796
|
+
case 2:
|
|
797
|
+
return { x: width - x, y: height - y };
|
|
798
|
+
case 3:
|
|
799
|
+
return { x: width - y, y: x };
|
|
800
|
+
default:
|
|
801
|
+
return { x, y };
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
function getAnnotationScreenBounds(annotation, scale, rotation) {
|
|
805
|
+
const flags = annotation.object.flags ?? [];
|
|
806
|
+
const hasNoZoom = flags.includes("noZoom");
|
|
807
|
+
const hasNoRotate = flags.includes("noRotate");
|
|
808
|
+
const left = annotation.object.rect.origin.x * scale;
|
|
809
|
+
const top = annotation.object.rect.origin.y * scale;
|
|
810
|
+
const width = annotation.object.rect.size.width * (hasNoZoom ? 1 : scale);
|
|
811
|
+
const height = annotation.object.rect.size.height * (hasNoZoom ? 1 : scale);
|
|
812
|
+
if (!hasNoRotate || rotation === 0) {
|
|
813
|
+
return {
|
|
814
|
+
left,
|
|
815
|
+
top,
|
|
816
|
+
right: left + width,
|
|
817
|
+
bottom: top + height
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
const corners = [
|
|
821
|
+
mapCounterRotatePoint(0, 0, width, height, rotation),
|
|
822
|
+
mapCounterRotatePoint(width, 0, width, height, rotation),
|
|
823
|
+
mapCounterRotatePoint(0, height, width, height, rotation),
|
|
824
|
+
mapCounterRotatePoint(width, height, width, height, rotation)
|
|
825
|
+
];
|
|
826
|
+
let minX = Infinity;
|
|
827
|
+
let minY = Infinity;
|
|
828
|
+
let maxX = -Infinity;
|
|
829
|
+
let maxY = -Infinity;
|
|
830
|
+
for (const corner of corners) {
|
|
831
|
+
if (corner.x < minX) minX = corner.x;
|
|
832
|
+
if (corner.y < minY) minY = corner.y;
|
|
833
|
+
if (corner.x > maxX) maxX = corner.x;
|
|
834
|
+
if (corner.y > maxY) maxY = corner.y;
|
|
835
|
+
}
|
|
836
|
+
return {
|
|
837
|
+
left: left + minX,
|
|
838
|
+
top: top + minY,
|
|
839
|
+
right: left + maxX,
|
|
840
|
+
bottom: top + maxY
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
const _hoisted_1$b = {
|
|
755
844
|
key: 0,
|
|
756
845
|
"data-group-selection-box": "",
|
|
757
846
|
"data-no-interaction": ""
|
|
758
847
|
};
|
|
759
|
-
const _hoisted_2$
|
|
760
|
-
const _hoisted_3$
|
|
761
|
-
const _sfc_main$
|
|
848
|
+
const _hoisted_2$9 = ["width", "height", "stroke"];
|
|
849
|
+
const _hoisted_3$9 = ["width", "height", "stroke"];
|
|
850
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
762
851
|
__name: "group-selection-box",
|
|
763
852
|
props: {
|
|
764
853
|
documentId: {},
|
|
@@ -897,8 +986,42 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
897
986
|
},
|
|
898
987
|
{ immediate: true }
|
|
899
988
|
);
|
|
900
|
-
const
|
|
901
|
-
|
|
989
|
+
const visualBoundsCorrection = computed(() => {
|
|
990
|
+
let visualLeft = Infinity;
|
|
991
|
+
let visualTop = Infinity;
|
|
992
|
+
let visualRight = -Infinity;
|
|
993
|
+
let visualBottom = -Infinity;
|
|
994
|
+
for (const ta of props.selectedAnnotations) {
|
|
995
|
+
const bounds = getAnnotationScreenBounds(ta, props.scale, props.rotation);
|
|
996
|
+
if (bounds.left < visualLeft) visualLeft = bounds.left;
|
|
997
|
+
if (bounds.top < visualTop) visualTop = bounds.top;
|
|
998
|
+
if (bounds.right > visualRight) visualRight = bounds.right;
|
|
999
|
+
if (bounds.bottom > visualBottom) visualBottom = bounds.bottom;
|
|
1000
|
+
}
|
|
1001
|
+
const gb = groupBox.value;
|
|
1002
|
+
const logicalLeft = gb.origin.x * props.scale;
|
|
1003
|
+
const logicalTop = gb.origin.y * props.scale;
|
|
1004
|
+
const logicalRight = (gb.origin.x + gb.size.width) * props.scale;
|
|
1005
|
+
const logicalBottom = (gb.origin.y + gb.size.height) * props.scale;
|
|
1006
|
+
return {
|
|
1007
|
+
left: visualLeft - logicalLeft,
|
|
1008
|
+
top: visualTop - logicalTop,
|
|
1009
|
+
right: visualRight - logicalRight,
|
|
1010
|
+
bottom: visualBottom - logicalBottom
|
|
1011
|
+
};
|
|
1012
|
+
});
|
|
1013
|
+
const groupBoxLeft = computed(
|
|
1014
|
+
() => previewGroupBox.value.origin.x * props.scale + visualBoundsCorrection.value.left
|
|
1015
|
+
);
|
|
1016
|
+
const groupBoxTop = computed(
|
|
1017
|
+
() => previewGroupBox.value.origin.y * props.scale + visualBoundsCorrection.value.top
|
|
1018
|
+
);
|
|
1019
|
+
const groupBoxWidth = computed(
|
|
1020
|
+
() => previewGroupBox.value.size.width * props.scale + (visualBoundsCorrection.value.right - visualBoundsCorrection.value.left)
|
|
1021
|
+
);
|
|
1022
|
+
const groupBoxHeight = computed(
|
|
1023
|
+
() => previewGroupBox.value.size.height * props.scale + (visualBoundsCorrection.value.bottom - visualBoundsCorrection.value.top)
|
|
1024
|
+
);
|
|
902
1025
|
const groupCenterX = computed(() => groupBoxWidth.value / 2);
|
|
903
1026
|
const groupCenterY = computed(() => groupBoxHeight.value / 2);
|
|
904
1027
|
const groupGuideLength = computed(
|
|
@@ -907,8 +1030,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
907
1030
|
const contentsStyle = { display: "contents" };
|
|
908
1031
|
const outerStyle = computed(() => ({
|
|
909
1032
|
position: "absolute",
|
|
910
|
-
left: `${
|
|
911
|
-
top: `${
|
|
1033
|
+
left: `${groupBoxLeft.value}px`,
|
|
1034
|
+
top: `${groupBoxTop.value}px`,
|
|
912
1035
|
width: `${groupBoxWidth.value}px`,
|
|
913
1036
|
height: `${groupBoxHeight.value}px`,
|
|
914
1037
|
pointerEvents: "none",
|
|
@@ -1017,12 +1140,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1017
1140
|
}));
|
|
1018
1141
|
const menuRect = computed(() => ({
|
|
1019
1142
|
origin: {
|
|
1020
|
-
x:
|
|
1021
|
-
y:
|
|
1143
|
+
x: groupBoxLeft.value,
|
|
1144
|
+
y: groupBoxTop.value
|
|
1022
1145
|
},
|
|
1023
1146
|
size: {
|
|
1024
|
-
width:
|
|
1025
|
-
height:
|
|
1147
|
+
width: groupBoxWidth.value,
|
|
1148
|
+
height: groupBoxHeight.value
|
|
1026
1149
|
}
|
|
1027
1150
|
}));
|
|
1028
1151
|
const menuContext = computed(() => ({
|
|
@@ -1184,7 +1307,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1184
1307
|
currentRotation: computed(() => liveRotation.value ?? 0)
|
|
1185
1308
|
});
|
|
1186
1309
|
return (_ctx, _cache) => {
|
|
1187
|
-
return __props.selectedAnnotations.length >= 2 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1310
|
+
return __props.selectedAnnotations.length >= 2 ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
1188
1311
|
createElementVNode("div", {
|
|
1189
1312
|
style: normalizeStyle(outerStyle.value)
|
|
1190
1313
|
}, [
|
|
@@ -1227,7 +1350,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1227
1350
|
}, [..._cache[2] || (_cache[2] = [
|
|
1228
1351
|
createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
|
|
1229
1352
|
createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
|
|
1230
|
-
])], 8, _hoisted_2$
|
|
1353
|
+
])], 8, _hoisted_2$9))
|
|
1231
1354
|
], 16)
|
|
1232
1355
|
]) : (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, rotationHandleBindings.value, { style: rotationHandleStyle.value }), [
|
|
1233
1356
|
(openBlock(), createElementBlock("svg", {
|
|
@@ -1242,7 +1365,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1242
1365
|
}, [..._cache[3] || (_cache[3] = [
|
|
1243
1366
|
createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
|
|
1244
1367
|
createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
|
|
1245
|
-
])], 8, _hoisted_3$
|
|
1368
|
+
])], 8, _hoisted_3$9))
|
|
1246
1369
|
], 16))
|
|
1247
1370
|
], 32)) : createCommentVNode("", true),
|
|
1248
1371
|
createElementVNode("div", mergeProps(
|
|
@@ -1268,7 +1391,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1268
1391
|
}), 128)) : createCommentVNode("", true)
|
|
1269
1392
|
], 16)
|
|
1270
1393
|
], 4),
|
|
1271
|
-
shouldShowMenu.value ? (openBlock(), createBlock(unref(CounterRotate), {
|
|
1394
|
+
shouldShowMenu.value && !rotationActive.value ? (openBlock(), createBlock(unref(CounterRotate), {
|
|
1272
1395
|
key: 0,
|
|
1273
1396
|
rect: menuRect.value,
|
|
1274
1397
|
rotation: __props.rotation
|
|
@@ -1336,6 +1459,7 @@ function createRenderer(entry) {
|
|
|
1336
1459
|
component: markRaw(entry.component),
|
|
1337
1460
|
vertexConfig: entry.vertexConfig,
|
|
1338
1461
|
zIndex: entry.zIndex,
|
|
1462
|
+
defaultBlendMode: entry.defaultBlendMode,
|
|
1339
1463
|
containerStyle: entry.containerStyle,
|
|
1340
1464
|
interactionDefaults: entry.interactionDefaults,
|
|
1341
1465
|
useAppearanceStream: entry.useAppearanceStream,
|
|
@@ -1345,12 +1469,12 @@ function createRenderer(entry) {
|
|
|
1345
1469
|
hideSelectionMenu: entry.hideSelectionMenu
|
|
1346
1470
|
};
|
|
1347
1471
|
}
|
|
1348
|
-
const _hoisted_1$
|
|
1349
|
-
const _hoisted_2$
|
|
1350
|
-
const _hoisted_3$
|
|
1351
|
-
const __default__$
|
|
1352
|
-
const _sfc_main$
|
|
1353
|
-
...__default__$
|
|
1472
|
+
const _hoisted_1$a = ["width", "height", "viewBox"];
|
|
1473
|
+
const _hoisted_2$8 = ["d", "stroke-width"];
|
|
1474
|
+
const _hoisted_3$8 = ["d", "opacity"];
|
|
1475
|
+
const __default__$d = { inheritAttrs: false };
|
|
1476
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
1477
|
+
...__default__$d,
|
|
1354
1478
|
__name: "ink",
|
|
1355
1479
|
props: {
|
|
1356
1480
|
isSelected: { type: Boolean },
|
|
@@ -1406,15 +1530,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1406
1530
|
"stroke-width": hitStrokeWidth.value,
|
|
1407
1531
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
1408
1532
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1409
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1410
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1411
1533
|
style: normalizeStyle({
|
|
1412
1534
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1413
1535
|
pointerEvents: __props.isSelected ? "none" : "visibleStroke",
|
|
1414
1536
|
strokeLinecap: "round",
|
|
1415
1537
|
strokeLinejoin: "round"
|
|
1416
1538
|
})
|
|
1417
|
-
}, null, 44, _hoisted_2$
|
|
1539
|
+
}, null, 44, _hoisted_2$8);
|
|
1418
1540
|
}), 128)),
|
|
1419
1541
|
!__props.appearanceActive ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(paths.value, (d, i) => {
|
|
1420
1542
|
return openBlock(), createElementBlock("path", {
|
|
@@ -1429,13 +1551,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1429
1551
|
strokeLinecap: "round",
|
|
1430
1552
|
strokeLinejoin: "round"
|
|
1431
1553
|
})
|
|
1432
|
-
}, null, 12, _hoisted_3$
|
|
1554
|
+
}, null, 12, _hoisted_3$8);
|
|
1433
1555
|
}), 128)) : createCommentVNode("", true)
|
|
1434
|
-
], 12, _hoisted_1$
|
|
1556
|
+
], 12, _hoisted_1$a);
|
|
1435
1557
|
};
|
|
1436
1558
|
}
|
|
1437
1559
|
});
|
|
1438
|
-
const _sfc_main$
|
|
1560
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
1439
1561
|
__name: "ink-renderer",
|
|
1440
1562
|
props: {
|
|
1441
1563
|
annotation: {},
|
|
@@ -1450,7 +1572,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1450
1572
|
},
|
|
1451
1573
|
setup(__props) {
|
|
1452
1574
|
return (_ctx, _cache) => {
|
|
1453
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1575
|
+
return openBlock(), createBlock(_sfc_main$A, mergeProps(__props.currentObject, {
|
|
1454
1576
|
isSelected: __props.isSelected,
|
|
1455
1577
|
scale: __props.scale,
|
|
1456
1578
|
onClick: __props.onClick,
|
|
@@ -1459,12 +1581,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1459
1581
|
};
|
|
1460
1582
|
}
|
|
1461
1583
|
});
|
|
1462
|
-
const _hoisted_1$
|
|
1463
|
-
const _hoisted_2$
|
|
1464
|
-
const _hoisted_3$
|
|
1465
|
-
const
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1584
|
+
const _hoisted_1$9 = ["width", "height", "viewBox"];
|
|
1585
|
+
const _hoisted_2$7 = ["d", "stroke-width"];
|
|
1586
|
+
const _hoisted_3$7 = ["x", "y", "width", "height", "stroke-width"];
|
|
1587
|
+
const _hoisted_4$6 = ["d", "fill", "opacity"];
|
|
1588
|
+
const _hoisted_5$5 = ["x", "y", "width", "height", "fill", "opacity"];
|
|
1589
|
+
const __default__$c = { inheritAttrs: false };
|
|
1590
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
1591
|
+
...__default__$c,
|
|
1468
1592
|
__name: "square",
|
|
1469
1593
|
props: {
|
|
1470
1594
|
isSelected: { type: Boolean },
|
|
@@ -1477,11 +1601,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1477
1601
|
rect: {},
|
|
1478
1602
|
scale: {},
|
|
1479
1603
|
onClick: {},
|
|
1480
|
-
appearanceActive: { type: Boolean, default: false }
|
|
1604
|
+
appearanceActive: { type: Boolean, default: false },
|
|
1605
|
+
cloudyBorderIntensity: {},
|
|
1606
|
+
rectangleDifferences: {}
|
|
1481
1607
|
},
|
|
1482
1608
|
setup(__props) {
|
|
1483
1609
|
const MIN_HIT_AREA_SCREEN_PX = 20;
|
|
1484
1610
|
const props = __props;
|
|
1611
|
+
const isCloudy = computed(() => (props.cloudyBorderIntensity ?? 0) > 0);
|
|
1485
1612
|
const geometry = computed(() => {
|
|
1486
1613
|
const outerW = props.rect.size.width;
|
|
1487
1614
|
const outerH = props.rect.size.height;
|
|
@@ -1494,8 +1621,17 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1494
1621
|
y: props.strokeWidth / 2
|
|
1495
1622
|
};
|
|
1496
1623
|
});
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1624
|
+
const cloudyPath = computed(() => {
|
|
1625
|
+
if (!isCloudy.value) return null;
|
|
1626
|
+
return generateCloudyRectanglePath(
|
|
1627
|
+
{ x: 0, y: 0, width: props.rect.size.width, height: props.rect.size.height },
|
|
1628
|
+
props.rectangleDifferences,
|
|
1629
|
+
props.cloudyBorderIntensity,
|
|
1630
|
+
props.strokeWidth
|
|
1631
|
+
);
|
|
1632
|
+
});
|
|
1633
|
+
const svgWidth = computed(() => props.rect.size.width * props.scale);
|
|
1634
|
+
const svgHeight = computed(() => props.rect.size.height * props.scale);
|
|
1499
1635
|
const hitStrokeWidth = computed(
|
|
1500
1636
|
() => Math.max(props.strokeWidth, MIN_HIT_AREA_SCREEN_PX / props.scale)
|
|
1501
1637
|
);
|
|
@@ -1511,48 +1647,72 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
1511
1647
|
}),
|
|
1512
1648
|
width: svgWidth.value,
|
|
1513
1649
|
height: svgHeight.value,
|
|
1514
|
-
viewBox: `0 0 ${
|
|
1650
|
+
viewBox: `0 0 ${__props.rect.size.width} ${__props.rect.size.height}`,
|
|
1515
1651
|
overflow: "visible"
|
|
1516
1652
|
}, [
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
width: geometry.value.width,
|
|
1521
|
-
height: geometry.value.height,
|
|
1653
|
+
isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
|
|
1654
|
+
key: 0,
|
|
1655
|
+
d: cloudyPath.value.path,
|
|
1522
1656
|
fill: "transparent",
|
|
1523
1657
|
stroke: "transparent",
|
|
1524
1658
|
"stroke-width": hitStrokeWidth.value,
|
|
1525
1659
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
1526
1660
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1527
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1528
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1529
1661
|
style: normalizeStyle({
|
|
1530
1662
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1531
1663
|
pointerEvents: __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
|
|
1532
1664
|
})
|
|
1533
|
-
}, null, 44, _hoisted_2$
|
|
1534
|
-
|
|
1535
|
-
key: 0,
|
|
1665
|
+
}, null, 44, _hoisted_2$7)) : (openBlock(), createElementBlock("rect", {
|
|
1666
|
+
key: 1,
|
|
1536
1667
|
x: geometry.value.x,
|
|
1537
1668
|
y: geometry.value.y,
|
|
1538
1669
|
width: geometry.value.width,
|
|
1539
1670
|
height: geometry.value.height,
|
|
1540
|
-
fill:
|
|
1541
|
-
|
|
1671
|
+
fill: "transparent",
|
|
1672
|
+
stroke: "transparent",
|
|
1673
|
+
"stroke-width": hitStrokeWidth.value,
|
|
1674
|
+
onPointerdown: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1675
|
+
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1542
1676
|
style: normalizeStyle({
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
strokeWidth: __props.strokeWidth,
|
|
1546
|
-
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
1547
|
-
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
1548
|
-
}
|
|
1677
|
+
cursor: __props.isSelected ? "move" : "pointer",
|
|
1678
|
+
pointerEvents: __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
|
|
1549
1679
|
})
|
|
1550
|
-
}, null,
|
|
1551
|
-
|
|
1680
|
+
}, null, 44, _hoisted_3$7)),
|
|
1681
|
+
!__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1682
|
+
isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
|
|
1683
|
+
key: 0,
|
|
1684
|
+
d: cloudyPath.value.path,
|
|
1685
|
+
fill: __props.color,
|
|
1686
|
+
opacity: __props.opacity,
|
|
1687
|
+
style: normalizeStyle({
|
|
1688
|
+
pointerEvents: "none",
|
|
1689
|
+
stroke: __props.strokeColor ?? __props.color,
|
|
1690
|
+
strokeWidth: __props.strokeWidth,
|
|
1691
|
+
strokeLinejoin: "round"
|
|
1692
|
+
})
|
|
1693
|
+
}, null, 12, _hoisted_4$6)) : (openBlock(), createElementBlock("rect", {
|
|
1694
|
+
key: 1,
|
|
1695
|
+
x: geometry.value.x,
|
|
1696
|
+
y: geometry.value.y,
|
|
1697
|
+
width: geometry.value.width,
|
|
1698
|
+
height: geometry.value.height,
|
|
1699
|
+
fill: __props.color,
|
|
1700
|
+
opacity: __props.opacity,
|
|
1701
|
+
style: normalizeStyle({
|
|
1702
|
+
pointerEvents: "none",
|
|
1703
|
+
stroke: __props.strokeColor ?? __props.color,
|
|
1704
|
+
strokeWidth: __props.strokeWidth,
|
|
1705
|
+
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
1706
|
+
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
1707
|
+
}
|
|
1708
|
+
})
|
|
1709
|
+
}, null, 12, _hoisted_5$5))
|
|
1710
|
+
], 64)) : createCommentVNode("", true)
|
|
1711
|
+
], 12, _hoisted_1$9);
|
|
1552
1712
|
};
|
|
1553
1713
|
}
|
|
1554
1714
|
});
|
|
1555
|
-
const _sfc_main$
|
|
1715
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
1556
1716
|
__name: "square-renderer",
|
|
1557
1717
|
props: {
|
|
1558
1718
|
annotation: {},
|
|
@@ -1567,7 +1727,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1567
1727
|
},
|
|
1568
1728
|
setup(__props) {
|
|
1569
1729
|
return (_ctx, _cache) => {
|
|
1570
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1730
|
+
return openBlock(), createBlock(_sfc_main$y, mergeProps(__props.currentObject, {
|
|
1571
1731
|
isSelected: __props.isSelected,
|
|
1572
1732
|
scale: __props.scale,
|
|
1573
1733
|
onClick: __props.onClick,
|
|
@@ -1576,12 +1736,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1576
1736
|
};
|
|
1577
1737
|
}
|
|
1578
1738
|
});
|
|
1579
|
-
const _hoisted_1$
|
|
1580
|
-
const _hoisted_2$
|
|
1581
|
-
const _hoisted_3$
|
|
1582
|
-
const
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1739
|
+
const _hoisted_1$8 = ["width", "height", "viewBox"];
|
|
1740
|
+
const _hoisted_2$6 = ["d", "stroke-width"];
|
|
1741
|
+
const _hoisted_3$6 = ["cx", "cy", "rx", "ry", "stroke-width"];
|
|
1742
|
+
const _hoisted_4$5 = ["d", "fill", "opacity"];
|
|
1743
|
+
const _hoisted_5$4 = ["cx", "cy", "rx", "ry", "fill", "opacity"];
|
|
1744
|
+
const __default__$b = { inheritAttrs: false };
|
|
1745
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
1746
|
+
...__default__$b,
|
|
1585
1747
|
__name: "circle",
|
|
1586
1748
|
props: {
|
|
1587
1749
|
isSelected: { type: Boolean },
|
|
@@ -1594,11 +1756,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1594
1756
|
rect: {},
|
|
1595
1757
|
scale: {},
|
|
1596
1758
|
onClick: {},
|
|
1597
|
-
appearanceActive: { type: Boolean, default: false }
|
|
1759
|
+
appearanceActive: { type: Boolean, default: false },
|
|
1760
|
+
cloudyBorderIntensity: {},
|
|
1761
|
+
rectangleDifferences: {}
|
|
1598
1762
|
},
|
|
1599
1763
|
setup(__props) {
|
|
1600
1764
|
const MIN_HIT_AREA_SCREEN_PX = 20;
|
|
1601
1765
|
const props = __props;
|
|
1766
|
+
const isCloudy = computed(() => (props.cloudyBorderIntensity ?? 0) > 0);
|
|
1602
1767
|
const geometry = computed(() => {
|
|
1603
1768
|
const outerW = props.rect.size.width;
|
|
1604
1769
|
const outerH = props.rect.size.height;
|
|
@@ -1613,6 +1778,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1613
1778
|
ry: innerH / 2
|
|
1614
1779
|
};
|
|
1615
1780
|
});
|
|
1781
|
+
const cloudyPath = computed(() => {
|
|
1782
|
+
if (!isCloudy.value) return null;
|
|
1783
|
+
return generateCloudyEllipsePath(
|
|
1784
|
+
{ x: 0, y: 0, width: props.rect.size.width, height: props.rect.size.height },
|
|
1785
|
+
props.rectangleDifferences,
|
|
1786
|
+
props.cloudyBorderIntensity,
|
|
1787
|
+
props.strokeWidth
|
|
1788
|
+
);
|
|
1789
|
+
});
|
|
1616
1790
|
const svgWidth = computed(() => geometry.value.width * props.scale);
|
|
1617
1791
|
const svgHeight = computed(() => geometry.value.height * props.scale);
|
|
1618
1792
|
const hitStrokeWidth = computed(
|
|
@@ -1633,45 +1807,69 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1633
1807
|
viewBox: `0 0 ${geometry.value.width} ${geometry.value.height}`,
|
|
1634
1808
|
overflow: "visible"
|
|
1635
1809
|
}, [
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
rx: geometry.value.rx,
|
|
1640
|
-
ry: geometry.value.ry,
|
|
1810
|
+
isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
|
|
1811
|
+
key: 0,
|
|
1812
|
+
d: cloudyPath.value.path,
|
|
1641
1813
|
fill: "transparent",
|
|
1642
1814
|
stroke: "transparent",
|
|
1643
1815
|
"stroke-width": hitStrokeWidth.value,
|
|
1644
1816
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
1645
1817
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1646
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1647
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1648
1818
|
style: normalizeStyle({
|
|
1649
1819
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1650
1820
|
pointerEvents: __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
|
|
1651
1821
|
})
|
|
1652
|
-
}, null, 44, _hoisted_2$
|
|
1653
|
-
|
|
1654
|
-
key: 0,
|
|
1822
|
+
}, null, 44, _hoisted_2$6)) : (openBlock(), createElementBlock("ellipse", {
|
|
1823
|
+
key: 1,
|
|
1655
1824
|
cx: geometry.value.cx,
|
|
1656
1825
|
cy: geometry.value.cy,
|
|
1657
1826
|
rx: geometry.value.rx,
|
|
1658
1827
|
ry: geometry.value.ry,
|
|
1659
|
-
fill:
|
|
1660
|
-
|
|
1828
|
+
fill: "transparent",
|
|
1829
|
+
stroke: "transparent",
|
|
1830
|
+
"stroke-width": hitStrokeWidth.value,
|
|
1831
|
+
onPointerdown: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1832
|
+
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1661
1833
|
style: normalizeStyle({
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
strokeWidth: __props.strokeWidth,
|
|
1665
|
-
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
1666
|
-
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
1667
|
-
}
|
|
1834
|
+
cursor: __props.isSelected ? "move" : "pointer",
|
|
1835
|
+
pointerEvents: __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
|
|
1668
1836
|
})
|
|
1669
|
-
}, null,
|
|
1670
|
-
|
|
1837
|
+
}, null, 44, _hoisted_3$6)),
|
|
1838
|
+
!__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1839
|
+
isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
|
|
1840
|
+
key: 0,
|
|
1841
|
+
d: cloudyPath.value.path,
|
|
1842
|
+
fill: __props.color,
|
|
1843
|
+
opacity: __props.opacity,
|
|
1844
|
+
style: normalizeStyle({
|
|
1845
|
+
pointerEvents: "none",
|
|
1846
|
+
stroke: __props.strokeColor ?? __props.color,
|
|
1847
|
+
strokeWidth: __props.strokeWidth,
|
|
1848
|
+
strokeLinejoin: "round"
|
|
1849
|
+
})
|
|
1850
|
+
}, null, 12, _hoisted_4$5)) : (openBlock(), createElementBlock("ellipse", {
|
|
1851
|
+
key: 1,
|
|
1852
|
+
cx: geometry.value.cx,
|
|
1853
|
+
cy: geometry.value.cy,
|
|
1854
|
+
rx: geometry.value.rx,
|
|
1855
|
+
ry: geometry.value.ry,
|
|
1856
|
+
fill: __props.color,
|
|
1857
|
+
opacity: __props.opacity,
|
|
1858
|
+
style: normalizeStyle({
|
|
1859
|
+
pointerEvents: "none",
|
|
1860
|
+
stroke: __props.strokeColor ?? __props.color,
|
|
1861
|
+
strokeWidth: __props.strokeWidth,
|
|
1862
|
+
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
1863
|
+
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
1864
|
+
}
|
|
1865
|
+
})
|
|
1866
|
+
}, null, 12, _hoisted_5$4))
|
|
1867
|
+
], 64)) : createCommentVNode("", true)
|
|
1868
|
+
], 12, _hoisted_1$8);
|
|
1671
1869
|
};
|
|
1672
1870
|
}
|
|
1673
1871
|
});
|
|
1674
|
-
const _sfc_main$
|
|
1872
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1675
1873
|
__name: "circle-renderer",
|
|
1676
1874
|
props: {
|
|
1677
1875
|
annotation: {},
|
|
@@ -1686,7 +1884,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1686
1884
|
},
|
|
1687
1885
|
setup(__props) {
|
|
1688
1886
|
return (_ctx, _cache) => {
|
|
1689
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1887
|
+
return openBlock(), createBlock(_sfc_main$w, mergeProps(__props.currentObject, {
|
|
1690
1888
|
isSelected: __props.isSelected,
|
|
1691
1889
|
scale: __props.scale,
|
|
1692
1890
|
onClick: __props.onClick,
|
|
@@ -1695,16 +1893,16 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1695
1893
|
};
|
|
1696
1894
|
}
|
|
1697
1895
|
});
|
|
1698
|
-
const _hoisted_1$
|
|
1699
|
-
const _hoisted_2$
|
|
1700
|
-
const _hoisted_3$
|
|
1701
|
-
const _hoisted_4$
|
|
1702
|
-
const _hoisted_5$
|
|
1703
|
-
const _hoisted_6$
|
|
1896
|
+
const _hoisted_1$7 = ["width", "height", "viewBox"];
|
|
1897
|
+
const _hoisted_2$5 = ["x1", "y1", "x2", "y2", "stroke-width"];
|
|
1898
|
+
const _hoisted_3$5 = ["d", "transform", "stroke-width"];
|
|
1899
|
+
const _hoisted_4$4 = ["d", "transform", "stroke-width"];
|
|
1900
|
+
const _hoisted_5$3 = ["x1", "y1", "x2", "y2", "opacity"];
|
|
1901
|
+
const _hoisted_6$2 = ["d", "transform", "stroke", "fill"];
|
|
1704
1902
|
const _hoisted_7$1 = ["d", "transform", "stroke", "fill"];
|
|
1705
|
-
const __default__$
|
|
1706
|
-
const _sfc_main$
|
|
1707
|
-
...__default__$
|
|
1903
|
+
const __default__$a = { inheritAttrs: false };
|
|
1904
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
1905
|
+
...__default__$a,
|
|
1708
1906
|
__name: "line",
|
|
1709
1907
|
props: {
|
|
1710
1908
|
color: { default: "transparent" },
|
|
@@ -1774,14 +1972,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1774
1972
|
"stroke-width": hitStrokeWidth.value,
|
|
1775
1973
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
1776
1974
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1777
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1778
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1779
1975
|
style: normalizeStyle({
|
|
1780
1976
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1781
1977
|
pointerEvents: __props.isSelected ? "none" : "visibleStroke",
|
|
1782
1978
|
strokeLinecap: "butt"
|
|
1783
1979
|
})
|
|
1784
|
-
}, null, 44, _hoisted_2$
|
|
1980
|
+
}, null, 44, _hoisted_2$5),
|
|
1785
1981
|
endings.value.start ? (openBlock(), createElementBlock("path", {
|
|
1786
1982
|
key: 0,
|
|
1787
1983
|
d: endings.value.start.d,
|
|
@@ -1789,16 +1985,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1789
1985
|
fill: "transparent",
|
|
1790
1986
|
stroke: "transparent",
|
|
1791
1987
|
"stroke-width": hitStrokeWidth.value,
|
|
1792
|
-
onPointerdown: _cache[
|
|
1793
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1794
|
-
onTouchstart: _cache[3] || (_cache[3] = //@ts-ignore
|
|
1988
|
+
onPointerdown: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1795
1989
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1796
1990
|
style: normalizeStyle({
|
|
1797
1991
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1798
1992
|
pointerEvents: __props.isSelected ? "none" : endings.value.start.filled ? "visible" : "visibleStroke",
|
|
1799
1993
|
strokeLinecap: "butt"
|
|
1800
1994
|
})
|
|
1801
|
-
}, null, 44, _hoisted_3$
|
|
1995
|
+
}, null, 44, _hoisted_3$5)) : createCommentVNode("", true),
|
|
1802
1996
|
endings.value.end ? (openBlock(), createElementBlock("path", {
|
|
1803
1997
|
key: 1,
|
|
1804
1998
|
d: endings.value.end.d,
|
|
@@ -1806,16 +2000,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1806
2000
|
fill: "transparent",
|
|
1807
2001
|
stroke: "transparent",
|
|
1808
2002
|
"stroke-width": hitStrokeWidth.value,
|
|
1809
|
-
onPointerdown: _cache[
|
|
1810
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1811
|
-
onTouchstart: _cache[5] || (_cache[5] = //@ts-ignore
|
|
2003
|
+
onPointerdown: _cache[2] || (_cache[2] = //@ts-ignore
|
|
1812
2004
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1813
2005
|
style: normalizeStyle({
|
|
1814
2006
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1815
2007
|
pointerEvents: __props.isSelected ? "none" : endings.value.end.filled ? "visible" : "visibleStroke",
|
|
1816
2008
|
strokeLinecap: "butt"
|
|
1817
2009
|
})
|
|
1818
|
-
}, null, 44, _hoisted_4$
|
|
2010
|
+
}, null, 44, _hoisted_4$4)) : createCommentVNode("", true),
|
|
1819
2011
|
!__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1820
2012
|
createElementVNode("line", {
|
|
1821
2013
|
x1: localLine.value.x1,
|
|
@@ -1832,7 +2024,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1832
2024
|
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
1833
2025
|
}
|
|
1834
2026
|
})
|
|
1835
|
-
}, null, 12, _hoisted_5$
|
|
2027
|
+
}, null, 12, _hoisted_5$3),
|
|
1836
2028
|
endings.value.start ? (openBlock(), createElementBlock("path", {
|
|
1837
2029
|
key: 0,
|
|
1838
2030
|
d: endings.value.start.d,
|
|
@@ -1847,7 +2039,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1847
2039
|
strokeDasharray: (_b = __props.strokeDashArray) == null ? void 0 : _b.join(",")
|
|
1848
2040
|
}
|
|
1849
2041
|
})
|
|
1850
|
-
}, null, 12, _hoisted_6$
|
|
2042
|
+
}, null, 12, _hoisted_6$2)) : createCommentVNode("", true),
|
|
1851
2043
|
endings.value.end ? (openBlock(), createElementBlock("path", {
|
|
1852
2044
|
key: 1,
|
|
1853
2045
|
d: endings.value.end.d,
|
|
@@ -1864,11 +2056,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1864
2056
|
})
|
|
1865
2057
|
}, null, 12, _hoisted_7$1)) : createCommentVNode("", true)
|
|
1866
2058
|
], 64)) : createCommentVNode("", true)
|
|
1867
|
-
], 12, _hoisted_1$
|
|
2059
|
+
], 12, _hoisted_1$7);
|
|
1868
2060
|
};
|
|
1869
2061
|
}
|
|
1870
2062
|
});
|
|
1871
|
-
const _sfc_main$
|
|
2063
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
1872
2064
|
__name: "line-renderer",
|
|
1873
2065
|
props: {
|
|
1874
2066
|
annotation: {},
|
|
@@ -1883,7 +2075,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1883
2075
|
},
|
|
1884
2076
|
setup(__props) {
|
|
1885
2077
|
return (_ctx, _cache) => {
|
|
1886
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2078
|
+
return openBlock(), createBlock(_sfc_main$u, mergeProps(__props.currentObject, {
|
|
1887
2079
|
isSelected: __props.isSelected,
|
|
1888
2080
|
scale: __props.scale,
|
|
1889
2081
|
onClick: __props.onClick,
|
|
@@ -1892,16 +2084,16 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1892
2084
|
};
|
|
1893
2085
|
}
|
|
1894
2086
|
});
|
|
1895
|
-
const _hoisted_1$
|
|
1896
|
-
const _hoisted_2$
|
|
1897
|
-
const _hoisted_3$
|
|
1898
|
-
const _hoisted_4$
|
|
1899
|
-
const _hoisted_5$
|
|
1900
|
-
const _hoisted_6 = ["d", "transform", "stroke", "fill"];
|
|
2087
|
+
const _hoisted_1$6 = ["width", "height", "viewBox"];
|
|
2088
|
+
const _hoisted_2$4 = ["d", "stroke-width"];
|
|
2089
|
+
const _hoisted_3$4 = ["d", "transform", "stroke-width"];
|
|
2090
|
+
const _hoisted_4$3 = ["d", "transform", "stroke-width"];
|
|
2091
|
+
const _hoisted_5$2 = ["d", "opacity"];
|
|
2092
|
+
const _hoisted_6$1 = ["d", "transform", "stroke", "fill"];
|
|
1901
2093
|
const _hoisted_7 = ["d", "transform", "stroke", "fill"];
|
|
1902
|
-
const __default__$
|
|
1903
|
-
const _sfc_main$
|
|
1904
|
-
...__default__$
|
|
2094
|
+
const __default__$9 = { inheritAttrs: false };
|
|
2095
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
2096
|
+
...__default__$9,
|
|
1905
2097
|
__name: "polyline",
|
|
1906
2098
|
props: {
|
|
1907
2099
|
rect: {},
|
|
@@ -1910,6 +2102,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1910
2102
|
strokeColor: { default: "#000000" },
|
|
1911
2103
|
opacity: { default: 1 },
|
|
1912
2104
|
strokeWidth: {},
|
|
2105
|
+
strokeStyle: { default: PdfAnnotationBorderStyle.SOLID },
|
|
2106
|
+
strokeDashArray: {},
|
|
1913
2107
|
scale: {},
|
|
1914
2108
|
isSelected: { type: Boolean },
|
|
1915
2109
|
onClick: {},
|
|
@@ -1962,6 +2156,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1962
2156
|
() => Math.max(props.strokeWidth, MIN_HIT_AREA_SCREEN_PX / props.scale)
|
|
1963
2157
|
);
|
|
1964
2158
|
return (_ctx, _cache) => {
|
|
2159
|
+
var _a, _b, _c;
|
|
1965
2160
|
return openBlock(), createElementBlock("svg", {
|
|
1966
2161
|
style: normalizeStyle({
|
|
1967
2162
|
position: "absolute",
|
|
@@ -1982,15 +2177,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1982
2177
|
"stroke-width": hitStrokeWidth.value,
|
|
1983
2178
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
1984
2179
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1985
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
1986
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
1987
2180
|
style: normalizeStyle({
|
|
1988
2181
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
1989
2182
|
pointerEvents: __props.isSelected ? "none" : "visibleStroke",
|
|
1990
2183
|
strokeLinecap: "butt",
|
|
1991
2184
|
strokeLinejoin: "miter"
|
|
1992
2185
|
})
|
|
1993
|
-
}, null, 44, _hoisted_2$
|
|
2186
|
+
}, null, 44, _hoisted_2$4),
|
|
1994
2187
|
endings.value.start ? (openBlock(), createElementBlock("path", {
|
|
1995
2188
|
key: 0,
|
|
1996
2189
|
d: endings.value.start.d,
|
|
@@ -1998,16 +2191,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1998
2191
|
fill: "transparent",
|
|
1999
2192
|
stroke: "transparent",
|
|
2000
2193
|
"stroke-width": hitStrokeWidth.value,
|
|
2001
|
-
onPointerdown: _cache[
|
|
2002
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2003
|
-
onTouchstart: _cache[3] || (_cache[3] = //@ts-ignore
|
|
2194
|
+
onPointerdown: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2004
2195
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2005
2196
|
style: normalizeStyle({
|
|
2006
2197
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
2007
2198
|
pointerEvents: __props.isSelected ? "none" : endings.value.start.filled ? "visible" : "visibleStroke",
|
|
2008
2199
|
strokeLinecap: "butt"
|
|
2009
2200
|
})
|
|
2010
|
-
}, null, 44, _hoisted_3$
|
|
2201
|
+
}, null, 44, _hoisted_3$4)) : createCommentVNode("", true),
|
|
2011
2202
|
endings.value.end ? (openBlock(), createElementBlock("path", {
|
|
2012
2203
|
key: 1,
|
|
2013
2204
|
d: endings.value.end.d,
|
|
@@ -2015,16 +2206,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2015
2206
|
fill: "transparent",
|
|
2016
2207
|
stroke: "transparent",
|
|
2017
2208
|
"stroke-width": hitStrokeWidth.value,
|
|
2018
|
-
onPointerdown: _cache[
|
|
2019
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2020
|
-
onTouchstart: _cache[5] || (_cache[5] = //@ts-ignore
|
|
2209
|
+
onPointerdown: _cache[2] || (_cache[2] = //@ts-ignore
|
|
2021
2210
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2022
2211
|
style: normalizeStyle({
|
|
2023
2212
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
2024
2213
|
pointerEvents: __props.isSelected ? "none" : endings.value.end.filled ? "visible" : "visibleStroke",
|
|
2025
2214
|
strokeLinecap: "butt"
|
|
2026
2215
|
})
|
|
2027
|
-
}, null, 44, _hoisted_4$
|
|
2216
|
+
}, null, 44, _hoisted_4$3)) : createCommentVNode("", true),
|
|
2028
2217
|
!__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2029
2218
|
createElementVNode("path", {
|
|
2030
2219
|
d: pathData.value,
|
|
@@ -2035,9 +2224,12 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2035
2224
|
strokeWidth: __props.strokeWidth,
|
|
2036
2225
|
pointerEvents: "none",
|
|
2037
2226
|
strokeLinecap: "butt",
|
|
2038
|
-
strokeLinejoin: "miter"
|
|
2227
|
+
strokeLinejoin: "miter",
|
|
2228
|
+
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
2229
|
+
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
2230
|
+
}
|
|
2039
2231
|
})
|
|
2040
|
-
}, null, 12, _hoisted_5$
|
|
2232
|
+
}, null, 12, _hoisted_5$2),
|
|
2041
2233
|
endings.value.start ? (openBlock(), createElementBlock("path", {
|
|
2042
2234
|
key: 0,
|
|
2043
2235
|
d: endings.value.start.d,
|
|
@@ -2047,9 +2239,12 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2047
2239
|
style: normalizeStyle({
|
|
2048
2240
|
pointerEvents: "none",
|
|
2049
2241
|
strokeWidth: __props.strokeWidth,
|
|
2050
|
-
strokeLinecap: "butt"
|
|
2242
|
+
strokeLinecap: "butt",
|
|
2243
|
+
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
2244
|
+
strokeDasharray: (_b = __props.strokeDashArray) == null ? void 0 : _b.join(",")
|
|
2245
|
+
}
|
|
2051
2246
|
})
|
|
2052
|
-
}, null, 12, _hoisted_6)) : createCommentVNode("", true),
|
|
2247
|
+
}, null, 12, _hoisted_6$1)) : createCommentVNode("", true),
|
|
2053
2248
|
endings.value.end ? (openBlock(), createElementBlock("path", {
|
|
2054
2249
|
key: 1,
|
|
2055
2250
|
d: endings.value.end.d,
|
|
@@ -2059,15 +2254,18 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2059
2254
|
style: normalizeStyle({
|
|
2060
2255
|
pointerEvents: "none",
|
|
2061
2256
|
strokeWidth: __props.strokeWidth,
|
|
2062
|
-
strokeLinecap: "butt"
|
|
2257
|
+
strokeLinecap: "butt",
|
|
2258
|
+
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
2259
|
+
strokeDasharray: (_c = __props.strokeDashArray) == null ? void 0 : _c.join(",")
|
|
2260
|
+
}
|
|
2063
2261
|
})
|
|
2064
2262
|
}, null, 12, _hoisted_7)) : createCommentVNode("", true)
|
|
2065
2263
|
], 64)) : createCommentVNode("", true)
|
|
2066
|
-
], 12, _hoisted_1$
|
|
2264
|
+
], 12, _hoisted_1$6);
|
|
2067
2265
|
};
|
|
2068
2266
|
}
|
|
2069
2267
|
});
|
|
2070
|
-
const _sfc_main$
|
|
2268
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
2071
2269
|
__name: "polyline-renderer",
|
|
2072
2270
|
props: {
|
|
2073
2271
|
annotation: {},
|
|
@@ -2082,7 +2280,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2082
2280
|
},
|
|
2083
2281
|
setup(__props) {
|
|
2084
2282
|
return (_ctx, _cache) => {
|
|
2085
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2283
|
+
return openBlock(), createBlock(_sfc_main$s, mergeProps(__props.currentObject, {
|
|
2086
2284
|
isSelected: __props.isSelected,
|
|
2087
2285
|
scale: __props.scale,
|
|
2088
2286
|
onClick: __props.onClick,
|
|
@@ -2091,14 +2289,15 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2091
2289
|
};
|
|
2092
2290
|
}
|
|
2093
2291
|
});
|
|
2094
|
-
const _hoisted_1$
|
|
2095
|
-
const _hoisted_2$
|
|
2096
|
-
const _hoisted_3$
|
|
2097
|
-
const _hoisted_4$
|
|
2098
|
-
const _hoisted_5 = ["
|
|
2099
|
-
const
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2292
|
+
const _hoisted_1$5 = ["width", "height", "viewBox"];
|
|
2293
|
+
const _hoisted_2$3 = ["d", "stroke-width"];
|
|
2294
|
+
const _hoisted_3$3 = ["d", "opacity"];
|
|
2295
|
+
const _hoisted_4$2 = ["d", "opacity"];
|
|
2296
|
+
const _hoisted_5$1 = ["d"];
|
|
2297
|
+
const _hoisted_6 = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"];
|
|
2298
|
+
const __default__$8 = { inheritAttrs: false };
|
|
2299
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
2300
|
+
...__default__$8,
|
|
2102
2301
|
__name: "polygon",
|
|
2103
2302
|
props: {
|
|
2104
2303
|
rect: {},
|
|
@@ -2114,11 +2313,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2114
2313
|
onClick: {},
|
|
2115
2314
|
currentVertex: {},
|
|
2116
2315
|
handleSize: { default: 14 },
|
|
2117
|
-
appearanceActive: { type: Boolean, default: false }
|
|
2316
|
+
appearanceActive: { type: Boolean, default: false },
|
|
2317
|
+
cloudyBorderIntensity: {}
|
|
2118
2318
|
},
|
|
2119
2319
|
setup(__props) {
|
|
2120
2320
|
const MIN_HIT_AREA_SCREEN_PX = 20;
|
|
2121
2321
|
const props = __props;
|
|
2322
|
+
const isCloudy = computed(() => (props.cloudyBorderIntensity ?? 0) > 0);
|
|
2122
2323
|
const allPoints = computed(
|
|
2123
2324
|
() => props.currentVertex ? [...props.vertices, props.currentVertex] : props.vertices
|
|
2124
2325
|
);
|
|
@@ -2134,6 +2335,15 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2134
2335
|
const isPreview = !!props.currentVertex;
|
|
2135
2336
|
return (`M ${first.x} ${first.y} ` + rest.map((p) => `L ${p.x} ${p.y}`).join(" ") + (isPreview ? "" : " Z")).trim();
|
|
2136
2337
|
});
|
|
2338
|
+
const cloudyPath = computed(() => {
|
|
2339
|
+
if (!isCloudy.value || allPoints.value.length < 3) return null;
|
|
2340
|
+
return generateCloudyPolygonPath(
|
|
2341
|
+
allPoints.value,
|
|
2342
|
+
props.rect.origin,
|
|
2343
|
+
props.cloudyBorderIntensity,
|
|
2344
|
+
props.strokeWidth
|
|
2345
|
+
);
|
|
2346
|
+
});
|
|
2137
2347
|
const isPreviewing = computed(() => props.currentVertex && props.vertices.length > 0);
|
|
2138
2348
|
const width = computed(() => props.rect.size.width * props.scale);
|
|
2139
2349
|
const height = computed(() => props.rect.size.height * props.scale);
|
|
@@ -2156,67 +2366,78 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2156
2366
|
viewBox: `0 0 ${__props.rect.size.width} ${__props.rect.size.height}`
|
|
2157
2367
|
}, [
|
|
2158
2368
|
createElementVNode("path", {
|
|
2159
|
-
d: pathData.value,
|
|
2369
|
+
d: isCloudy.value && cloudyPath.value ? cloudyPath.value.path : pathData.value,
|
|
2160
2370
|
fill: "transparent",
|
|
2161
2371
|
stroke: "transparent",
|
|
2162
2372
|
"stroke-width": hitStrokeWidth.value,
|
|
2163
2373
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2164
2374
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2165
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2166
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2167
2375
|
style: normalizeStyle({
|
|
2168
2376
|
cursor: __props.isSelected ? "move" : "pointer",
|
|
2169
2377
|
pointerEvents: __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible",
|
|
2170
2378
|
strokeLinecap: "butt",
|
|
2171
2379
|
strokeLinejoin: "miter"
|
|
2172
2380
|
})
|
|
2173
|
-
}, null, 44, _hoisted_2$
|
|
2381
|
+
}, null, 44, _hoisted_2$3),
|
|
2174
2382
|
!__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2175
|
-
|
|
2176
|
-
|
|
2383
|
+
isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
|
|
2384
|
+
key: 0,
|
|
2385
|
+
d: cloudyPath.value.path,
|
|
2177
2386
|
opacity: __props.opacity,
|
|
2178
2387
|
style: normalizeStyle({
|
|
2179
|
-
fill: __props.
|
|
2388
|
+
fill: __props.color,
|
|
2180
2389
|
stroke: __props.strokeColor ?? __props.color,
|
|
2181
2390
|
strokeWidth: __props.strokeWidth,
|
|
2182
2391
|
pointerEvents: "none",
|
|
2183
|
-
|
|
2184
|
-
strokeLinejoin: "miter",
|
|
2185
|
-
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
2186
|
-
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
2187
|
-
}
|
|
2392
|
+
strokeLinejoin: "round"
|
|
2188
2393
|
})
|
|
2189
|
-
}, null, 12, _hoisted_3$
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2394
|
+
}, null, 12, _hoisted_3$3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2395
|
+
createElementVNode("path", {
|
|
2396
|
+
d: pathData.value,
|
|
2397
|
+
opacity: __props.opacity,
|
|
2398
|
+
style: normalizeStyle({
|
|
2399
|
+
fill: __props.currentVertex ? "none" : __props.color,
|
|
2400
|
+
stroke: __props.strokeColor ?? __props.color,
|
|
2401
|
+
strokeWidth: __props.strokeWidth,
|
|
2402
|
+
pointerEvents: "none",
|
|
2403
|
+
strokeLinecap: "butt",
|
|
2404
|
+
strokeLinejoin: "miter",
|
|
2405
|
+
...__props.strokeStyle === unref(PdfAnnotationBorderStyle).DASHED && {
|
|
2406
|
+
strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
|
|
2407
|
+
}
|
|
2408
|
+
})
|
|
2409
|
+
}, null, 12, _hoisted_4$2),
|
|
2410
|
+
isPreviewing.value && localPts.value.length > 1 ? (openBlock(), createElementBlock("path", {
|
|
2411
|
+
key: 0,
|
|
2412
|
+
d: `M ${localPts.value[localPts.value.length - 1].x} ${localPts.value[localPts.value.length - 1].y} L ${localPts.value[0].x} ${localPts.value[0].y}`,
|
|
2413
|
+
fill: "none",
|
|
2414
|
+
style: normalizeStyle({
|
|
2415
|
+
stroke: __props.strokeColor,
|
|
2416
|
+
strokeWidth: __props.strokeWidth,
|
|
2417
|
+
strokeDasharray: "4,4",
|
|
2418
|
+
opacity: 0.7,
|
|
2419
|
+
pointerEvents: "none"
|
|
2420
|
+
})
|
|
2421
|
+
}, null, 12, _hoisted_5$1)) : createCommentVNode("", true),
|
|
2422
|
+
isPreviewing.value && localPts.value.length >= 2 ? (openBlock(), createElementBlock("rect", {
|
|
2423
|
+
key: 1,
|
|
2424
|
+
x: localPts.value[0].x - __props.handleSize / __props.scale / 2,
|
|
2425
|
+
y: localPts.value[0].y - __props.handleSize / __props.scale / 2,
|
|
2426
|
+
width: __props.handleSize / __props.scale,
|
|
2427
|
+
height: __props.handleSize / __props.scale,
|
|
2428
|
+
fill: __props.strokeColor,
|
|
2429
|
+
opacity: 0.4,
|
|
2195
2430
|
stroke: __props.strokeColor,
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
})
|
|
2201
|
-
}, null, 12, _hoisted_4$1)) : createCommentVNode("", true),
|
|
2202
|
-
isPreviewing.value && localPts.value.length >= 2 ? (openBlock(), createElementBlock("rect", {
|
|
2203
|
-
key: 1,
|
|
2204
|
-
x: localPts.value[0].x - __props.handleSize / __props.scale / 2,
|
|
2205
|
-
y: localPts.value[0].y - __props.handleSize / __props.scale / 2,
|
|
2206
|
-
width: __props.handleSize / __props.scale,
|
|
2207
|
-
height: __props.handleSize / __props.scale,
|
|
2208
|
-
fill: __props.strokeColor,
|
|
2209
|
-
opacity: 0.4,
|
|
2210
|
-
stroke: __props.strokeColor,
|
|
2211
|
-
"stroke-width": __props.strokeWidth / 2,
|
|
2212
|
-
style: { "pointer-events": "none" }
|
|
2213
|
-
}, null, 8, _hoisted_5)) : createCommentVNode("", true)
|
|
2431
|
+
"stroke-width": __props.strokeWidth / 2,
|
|
2432
|
+
style: { "pointer-events": "none" }
|
|
2433
|
+
}, null, 8, _hoisted_6)) : createCommentVNode("", true)
|
|
2434
|
+
], 64))
|
|
2214
2435
|
], 64)) : createCommentVNode("", true)
|
|
2215
|
-
], 12, _hoisted_1$
|
|
2436
|
+
], 12, _hoisted_1$5);
|
|
2216
2437
|
};
|
|
2217
2438
|
}
|
|
2218
2439
|
});
|
|
2219
|
-
const _sfc_main$
|
|
2440
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2220
2441
|
__name: "polygon-renderer",
|
|
2221
2442
|
props: {
|
|
2222
2443
|
annotation: {},
|
|
@@ -2231,7 +2452,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2231
2452
|
},
|
|
2232
2453
|
setup(__props) {
|
|
2233
2454
|
return (_ctx, _cache) => {
|
|
2234
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2455
|
+
return openBlock(), createBlock(_sfc_main$q, mergeProps(__props.currentObject, {
|
|
2235
2456
|
isSelected: __props.isSelected,
|
|
2236
2457
|
scale: __props.scale,
|
|
2237
2458
|
onClick: __props.onClick,
|
|
@@ -2240,10 +2461,10 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2240
2461
|
};
|
|
2241
2462
|
}
|
|
2242
2463
|
});
|
|
2243
|
-
const _hoisted_1$
|
|
2244
|
-
const __default__$
|
|
2245
|
-
const _sfc_main$
|
|
2246
|
-
...__default__$
|
|
2464
|
+
const _hoisted_1$4 = ["contenteditable"];
|
|
2465
|
+
const __default__$7 = { inheritAttrs: false };
|
|
2466
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2467
|
+
...__default__$7,
|
|
2247
2468
|
__name: "free-text",
|
|
2248
2469
|
props: {
|
|
2249
2470
|
documentId: {},
|
|
@@ -2341,8 +2562,6 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2341
2562
|
opacity: __props.appearanceActive ? 0 : 1
|
|
2342
2563
|
}),
|
|
2343
2564
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2344
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2345
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2346
2565
|
(...args) => __props.onClick && __props.onClick(...args))
|
|
2347
2566
|
}, [
|
|
2348
2567
|
createElementVNode("span", {
|
|
@@ -2352,12 +2571,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2352
2571
|
tabindex: "0",
|
|
2353
2572
|
style: normalizeStyle(editorStyle.value),
|
|
2354
2573
|
contenteditable: __props.isEditing
|
|
2355
|
-
}, toDisplayString(__props.annotation.object.contents), 45, _hoisted_1$
|
|
2574
|
+
}, toDisplayString(__props.annotation.object.contents), 45, _hoisted_1$4)
|
|
2356
2575
|
], 36);
|
|
2357
2576
|
};
|
|
2358
2577
|
}
|
|
2359
2578
|
});
|
|
2360
|
-
const _sfc_main$
|
|
2579
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2361
2580
|
__name: "free-text-renderer",
|
|
2362
2581
|
props: {
|
|
2363
2582
|
annotation: {},
|
|
@@ -2372,7 +2591,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2372
2591
|
},
|
|
2373
2592
|
setup(__props) {
|
|
2374
2593
|
return (_ctx, _cache) => {
|
|
2375
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2594
|
+
return openBlock(), createBlock(_sfc_main$o, {
|
|
2376
2595
|
documentId: __props.documentId,
|
|
2377
2596
|
isSelected: __props.isSelected,
|
|
2378
2597
|
isEditing: __props.isEditing,
|
|
@@ -2385,8 +2604,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2385
2604
|
};
|
|
2386
2605
|
}
|
|
2387
2606
|
});
|
|
2388
|
-
const _hoisted_1$
|
|
2389
|
-
const _sfc_main$
|
|
2607
|
+
const _hoisted_1$3 = ["src"];
|
|
2608
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2390
2609
|
__name: "render-annotation",
|
|
2391
2610
|
props: {
|
|
2392
2611
|
documentId: {},
|
|
@@ -2481,13 +2700,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2481
2700
|
display: "block",
|
|
2482
2701
|
...__props.style
|
|
2483
2702
|
})
|
|
2484
|
-
}, null, 44, _hoisted_1$
|
|
2703
|
+
}, null, 44, _hoisted_1$3)) : createCommentVNode("", true);
|
|
2485
2704
|
};
|
|
2486
2705
|
}
|
|
2487
2706
|
});
|
|
2488
|
-
const __default__$
|
|
2489
|
-
const _sfc_main$
|
|
2490
|
-
...__default__$
|
|
2707
|
+
const __default__$6 = { inheritAttrs: false };
|
|
2708
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2709
|
+
...__default__$6,
|
|
2491
2710
|
__name: "stamp",
|
|
2492
2711
|
props: {
|
|
2493
2712
|
isSelected: { type: Boolean },
|
|
@@ -2513,11 +2732,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2513
2732
|
cursor: "pointer"
|
|
2514
2733
|
}),
|
|
2515
2734
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2516
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2517
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2518
2735
|
(...args) => __props.onClick && __props.onClick(...args))
|
|
2519
2736
|
}, [
|
|
2520
|
-
createVNode(_sfc_main$
|
|
2737
|
+
createVNode(_sfc_main$m, {
|
|
2521
2738
|
documentId: __props.documentId,
|
|
2522
2739
|
pageIndex: __props.pageIndex,
|
|
2523
2740
|
annotation: { ...__props.annotation.object, id: __props.annotation.object.id },
|
|
@@ -2528,7 +2745,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2528
2745
|
};
|
|
2529
2746
|
}
|
|
2530
2747
|
});
|
|
2531
|
-
const _sfc_main$
|
|
2748
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2532
2749
|
__name: "stamp-renderer",
|
|
2533
2750
|
props: {
|
|
2534
2751
|
annotation: {},
|
|
@@ -2543,7 +2760,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2543
2760
|
},
|
|
2544
2761
|
setup(__props) {
|
|
2545
2762
|
return (_ctx, _cache) => {
|
|
2546
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2763
|
+
return openBlock(), createBlock(_sfc_main$l, {
|
|
2547
2764
|
isSelected: __props.isSelected,
|
|
2548
2765
|
annotation: __props.annotation,
|
|
2549
2766
|
documentId: __props.documentId,
|
|
@@ -2554,13 +2771,13 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2554
2771
|
};
|
|
2555
2772
|
}
|
|
2556
2773
|
});
|
|
2557
|
-
const _hoisted_1 = ["width", "height", "viewBox"];
|
|
2558
|
-
const _hoisted_2 = ["width", "height"];
|
|
2559
|
-
const _hoisted_3 = ["y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"];
|
|
2560
|
-
const _hoisted_4 = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-dasharray"];
|
|
2561
|
-
const __default__$
|
|
2562
|
-
const _sfc_main$
|
|
2563
|
-
...__default__$
|
|
2774
|
+
const _hoisted_1$2 = ["width", "height", "viewBox"];
|
|
2775
|
+
const _hoisted_2$2 = ["width", "height"];
|
|
2776
|
+
const _hoisted_3$2 = ["y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"];
|
|
2777
|
+
const _hoisted_4$1 = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-dasharray"];
|
|
2778
|
+
const __default__$5 = { inheritAttrs: false };
|
|
2779
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2780
|
+
...__default__$5,
|
|
2564
2781
|
__name: "link",
|
|
2565
2782
|
props: {
|
|
2566
2783
|
isSelected: { type: Boolean },
|
|
@@ -2612,13 +2829,15 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2612
2829
|
width: width.value,
|
|
2613
2830
|
height: height.value,
|
|
2614
2831
|
fill: "transparent",
|
|
2615
|
-
onPointerdown: _cache[0] || (_cache[0] = ($event) =>
|
|
2616
|
-
|
|
2832
|
+
onPointerdown: _cache[0] || (_cache[0] = ($event) => {
|
|
2833
|
+
var _a;
|
|
2834
|
+
return __props.hasIRT ? void 0 : (_a = __props.onClick) == null ? void 0 : _a.call(__props, $event);
|
|
2835
|
+
}),
|
|
2617
2836
|
style: normalizeStyle({
|
|
2618
2837
|
cursor: hitAreaCursor.value,
|
|
2619
2838
|
pointerEvents: hitAreaPointerEvents.value
|
|
2620
2839
|
})
|
|
2621
|
-
}, null, 44, _hoisted_2),
|
|
2840
|
+
}, null, 44, _hoisted_2$2),
|
|
2622
2841
|
isUnderline.value ? (openBlock(), createElementBlock("line", {
|
|
2623
2842
|
key: 0,
|
|
2624
2843
|
x1: 1,
|
|
@@ -2629,7 +2848,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2629
2848
|
"stroke-width": __props.strokeWidth,
|
|
2630
2849
|
"stroke-dasharray": dashArray.value,
|
|
2631
2850
|
style: { "pointer-events": "none" }
|
|
2632
|
-
}, null, 8, _hoisted_3)) : (openBlock(), createElementBlock("rect", {
|
|
2851
|
+
}, null, 8, _hoisted_3$2)) : (openBlock(), createElementBlock("rect", {
|
|
2633
2852
|
key: 1,
|
|
2634
2853
|
x: __props.strokeWidth / 2,
|
|
2635
2854
|
y: __props.strokeWidth / 2,
|
|
@@ -2640,12 +2859,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2640
2859
|
"stroke-width": __props.strokeWidth,
|
|
2641
2860
|
"stroke-dasharray": dashArray.value,
|
|
2642
2861
|
style: { "pointer-events": "none" }
|
|
2643
|
-
}, null, 8, _hoisted_4))
|
|
2644
|
-
], 12, _hoisted_1);
|
|
2862
|
+
}, null, 8, _hoisted_4$1))
|
|
2863
|
+
], 12, _hoisted_1$2);
|
|
2645
2864
|
};
|
|
2646
2865
|
}
|
|
2647
2866
|
});
|
|
2648
|
-
const _sfc_main$
|
|
2867
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2649
2868
|
__name: "link-renderer",
|
|
2650
2869
|
props: {
|
|
2651
2870
|
annotation: {},
|
|
@@ -2660,7 +2879,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2660
2879
|
},
|
|
2661
2880
|
setup(__props) {
|
|
2662
2881
|
return (_ctx, _cache) => {
|
|
2663
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2882
|
+
return openBlock(), createBlock(_sfc_main$j, mergeProps(__props.currentObject, {
|
|
2664
2883
|
isSelected: __props.isSelected,
|
|
2665
2884
|
scale: __props.scale,
|
|
2666
2885
|
onClick: __props.onClick,
|
|
@@ -2669,9 +2888,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2669
2888
|
};
|
|
2670
2889
|
}
|
|
2671
2890
|
});
|
|
2672
|
-
const __default__$
|
|
2673
|
-
const _sfc_main$
|
|
2674
|
-
...__default__$
|
|
2891
|
+
const __default__$4 = { inheritAttrs: false };
|
|
2892
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2893
|
+
...__default__$4,
|
|
2675
2894
|
__name: "highlight",
|
|
2676
2895
|
props: {
|
|
2677
2896
|
strokeColor: {},
|
|
@@ -2691,8 +2910,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2691
2910
|
key: i,
|
|
2692
2911
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2693
2912
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2694
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2695
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2696
2913
|
style: normalizeStyle({
|
|
2697
2914
|
position: "absolute",
|
|
2698
2915
|
left: `${(__props.rect ? b.origin.x - __props.rect.origin.x : b.origin.x) * __props.scale}px`,
|
|
@@ -2710,7 +2927,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2710
2927
|
};
|
|
2711
2928
|
}
|
|
2712
2929
|
});
|
|
2713
|
-
const _sfc_main$
|
|
2930
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2714
2931
|
__name: "highlight-renderer",
|
|
2715
2932
|
props: {
|
|
2716
2933
|
annotation: {},
|
|
@@ -2725,7 +2942,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2725
2942
|
},
|
|
2726
2943
|
setup(__props) {
|
|
2727
2944
|
return (_ctx, _cache) => {
|
|
2728
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2945
|
+
return openBlock(), createBlock(_sfc_main$h, mergeProps(__props.currentObject, {
|
|
2729
2946
|
scale: __props.scale,
|
|
2730
2947
|
onClick: __props.onClick,
|
|
2731
2948
|
appearanceActive: __props.appearanceActive
|
|
@@ -2733,9 +2950,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2733
2950
|
};
|
|
2734
2951
|
}
|
|
2735
2952
|
});
|
|
2736
|
-
const __default__$
|
|
2737
|
-
const _sfc_main$
|
|
2738
|
-
...__default__$
|
|
2953
|
+
const __default__$3 = { inheritAttrs: false };
|
|
2954
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2955
|
+
...__default__$3,
|
|
2739
2956
|
__name: "underline",
|
|
2740
2957
|
props: {
|
|
2741
2958
|
strokeColor: {},
|
|
@@ -2756,8 +2973,6 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2756
2973
|
key: i,
|
|
2757
2974
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2758
2975
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2759
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2760
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2761
2976
|
style: normalizeStyle({
|
|
2762
2977
|
position: "absolute",
|
|
2763
2978
|
left: `${(__props.rect ? r.origin.x - __props.rect.origin.x : r.origin.x) * __props.scale}px`,
|
|
@@ -2788,7 +3003,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2788
3003
|
};
|
|
2789
3004
|
}
|
|
2790
3005
|
});
|
|
2791
|
-
const _sfc_main$
|
|
3006
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2792
3007
|
__name: "underline-renderer",
|
|
2793
3008
|
props: {
|
|
2794
3009
|
annotation: {},
|
|
@@ -2803,7 +3018,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2803
3018
|
},
|
|
2804
3019
|
setup(__props) {
|
|
2805
3020
|
return (_ctx, _cache) => {
|
|
2806
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3021
|
+
return openBlock(), createBlock(_sfc_main$f, mergeProps(__props.currentObject, {
|
|
2807
3022
|
scale: __props.scale,
|
|
2808
3023
|
onClick: __props.onClick,
|
|
2809
3024
|
appearanceActive: __props.appearanceActive
|
|
@@ -2811,9 +3026,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2811
3026
|
};
|
|
2812
3027
|
}
|
|
2813
3028
|
});
|
|
2814
|
-
const __default__$
|
|
2815
|
-
const _sfc_main$
|
|
2816
|
-
...__default__$
|
|
3029
|
+
const __default__$2 = { inheritAttrs: false };
|
|
3030
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3031
|
+
...__default__$2,
|
|
2817
3032
|
__name: "strikeout",
|
|
2818
3033
|
props: {
|
|
2819
3034
|
strokeColor: {},
|
|
@@ -2834,8 +3049,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2834
3049
|
key: i,
|
|
2835
3050
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2836
3051
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2837
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2838
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2839
3052
|
style: normalizeStyle({
|
|
2840
3053
|
position: "absolute",
|
|
2841
3054
|
left: `${(__props.rect ? r.origin.x - __props.rect.origin.x : r.origin.x) * __props.scale}px`,
|
|
@@ -2867,7 +3080,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2867
3080
|
};
|
|
2868
3081
|
}
|
|
2869
3082
|
});
|
|
2870
|
-
const _sfc_main$
|
|
3083
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2871
3084
|
__name: "strikeout-renderer",
|
|
2872
3085
|
props: {
|
|
2873
3086
|
annotation: {},
|
|
@@ -2882,7 +3095,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2882
3095
|
},
|
|
2883
3096
|
setup(__props) {
|
|
2884
3097
|
return (_ctx, _cache) => {
|
|
2885
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3098
|
+
return openBlock(), createBlock(_sfc_main$d, mergeProps(__props.currentObject, {
|
|
2886
3099
|
scale: __props.scale,
|
|
2887
3100
|
onClick: __props.onClick,
|
|
2888
3101
|
appearanceActive: __props.appearanceActive
|
|
@@ -2890,9 +3103,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2890
3103
|
};
|
|
2891
3104
|
}
|
|
2892
3105
|
});
|
|
2893
|
-
const __default__ = { inheritAttrs: false };
|
|
2894
|
-
const _sfc_main$
|
|
2895
|
-
...__default__,
|
|
3106
|
+
const __default__$1 = { inheritAttrs: false };
|
|
3107
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3108
|
+
...__default__$1,
|
|
2896
3109
|
__name: "squiggly",
|
|
2897
3110
|
props: {
|
|
2898
3111
|
strokeColor: {},
|
|
@@ -2923,8 +3136,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2923
3136
|
key: i,
|
|
2924
3137
|
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2925
3138
|
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2926
|
-
onTouchstart: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2927
|
-
(...args) => __props.onClick && __props.onClick(...args)),
|
|
2928
3139
|
style: normalizeStyle({
|
|
2929
3140
|
position: "absolute",
|
|
2930
3141
|
left: `${(__props.rect ? r.origin.x - __props.rect.origin.x : r.origin.x) * __props.scale}px`,
|
|
@@ -2957,7 +3168,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2957
3168
|
};
|
|
2958
3169
|
}
|
|
2959
3170
|
});
|
|
2960
|
-
const _sfc_main$
|
|
3171
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
2961
3172
|
__name: "squiggly-renderer",
|
|
2962
3173
|
props: {
|
|
2963
3174
|
annotation: {},
|
|
@@ -2972,7 +3183,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2972
3183
|
},
|
|
2973
3184
|
setup(__props) {
|
|
2974
3185
|
return (_ctx, _cache) => {
|
|
2975
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3186
|
+
return openBlock(), createBlock(_sfc_main$b, mergeProps(__props.currentObject, {
|
|
2976
3187
|
scale: __props.scale,
|
|
2977
3188
|
onClick: __props.onClick,
|
|
2978
3189
|
appearanceActive: __props.appearanceActive
|
|
@@ -2980,29 +3191,224 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2980
3191
|
};
|
|
2981
3192
|
}
|
|
2982
3193
|
});
|
|
3194
|
+
const _hoisted_1$1 = ["width", "height", "viewBox"];
|
|
3195
|
+
const _hoisted_2$1 = ["d"];
|
|
3196
|
+
const _hoisted_3$1 = ["d", "fill", "stroke", "opacity"];
|
|
3197
|
+
const __default__ = { inheritAttrs: false };
|
|
3198
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3199
|
+
...__default__,
|
|
3200
|
+
__name: "caret",
|
|
3201
|
+
props: {
|
|
3202
|
+
isSelected: { type: Boolean },
|
|
3203
|
+
strokeColor: { default: "#000000" },
|
|
3204
|
+
opacity: { default: 1 },
|
|
3205
|
+
rect: {},
|
|
3206
|
+
scale: {},
|
|
3207
|
+
onClick: {},
|
|
3208
|
+
appearanceActive: { type: Boolean, default: false }
|
|
3209
|
+
},
|
|
3210
|
+
setup(__props) {
|
|
3211
|
+
const props = __props;
|
|
3212
|
+
const width = computed(() => props.rect.size.width);
|
|
3213
|
+
const height = computed(() => props.rect.size.height);
|
|
3214
|
+
const path = computed(() => {
|
|
3215
|
+
const w = width.value;
|
|
3216
|
+
const h = height.value;
|
|
3217
|
+
const midX = w / 2;
|
|
3218
|
+
return [
|
|
3219
|
+
`M 0 ${h}`,
|
|
3220
|
+
`C ${w * 0.27} ${h} ${midX} ${h - h * 0.44} ${midX} 0`,
|
|
3221
|
+
`C ${midX} ${h - h * 0.44} ${w - w * 0.27} ${h} ${w} ${h}`,
|
|
3222
|
+
"Z"
|
|
3223
|
+
].join(" ");
|
|
3224
|
+
});
|
|
3225
|
+
const svgWidth = computed(() => width.value * props.scale);
|
|
3226
|
+
const svgHeight = computed(() => height.value * props.scale);
|
|
3227
|
+
return (_ctx, _cache) => {
|
|
3228
|
+
return openBlock(), createElementBlock("svg", {
|
|
3229
|
+
style: normalizeStyle({
|
|
3230
|
+
position: "absolute",
|
|
3231
|
+
width: svgWidth.value,
|
|
3232
|
+
height: svgHeight.value,
|
|
3233
|
+
pointerEvents: "none",
|
|
3234
|
+
zIndex: 2
|
|
3235
|
+
}),
|
|
3236
|
+
width: svgWidth.value,
|
|
3237
|
+
height: svgHeight.value,
|
|
3238
|
+
viewBox: `0 0 ${width.value} ${height.value}`,
|
|
3239
|
+
overflow: "visible"
|
|
3240
|
+
}, [
|
|
3241
|
+
createElementVNode("path", {
|
|
3242
|
+
d: path.value,
|
|
3243
|
+
fill: "transparent",
|
|
3244
|
+
stroke: "transparent",
|
|
3245
|
+
"stroke-width": 4,
|
|
3246
|
+
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
3247
|
+
(...args) => __props.onClick && __props.onClick(...args)),
|
|
3248
|
+
style: normalizeStyle({
|
|
3249
|
+
cursor: __props.isSelected ? "move" : "pointer",
|
|
3250
|
+
pointerEvents: __props.isSelected ? "none" : "visible"
|
|
3251
|
+
})
|
|
3252
|
+
}, null, 44, _hoisted_2$1),
|
|
3253
|
+
!__props.appearanceActive ? (openBlock(), createElementBlock("path", {
|
|
3254
|
+
key: 0,
|
|
3255
|
+
d: path.value,
|
|
3256
|
+
fill: __props.strokeColor,
|
|
3257
|
+
stroke: __props.strokeColor,
|
|
3258
|
+
"stroke-width": 0.5,
|
|
3259
|
+
opacity: __props.opacity,
|
|
3260
|
+
"fill-rule": "evenodd",
|
|
3261
|
+
style: { pointerEvents: "none" }
|
|
3262
|
+
}, null, 8, _hoisted_3$1)) : createCommentVNode("", true)
|
|
3263
|
+
], 12, _hoisted_1$1);
|
|
3264
|
+
};
|
|
3265
|
+
}
|
|
3266
|
+
});
|
|
3267
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3268
|
+
__name: "caret-renderer",
|
|
3269
|
+
props: {
|
|
3270
|
+
annotation: {},
|
|
3271
|
+
currentObject: {},
|
|
3272
|
+
isSelected: { type: Boolean },
|
|
3273
|
+
isEditing: { type: Boolean },
|
|
3274
|
+
scale: {},
|
|
3275
|
+
pageIndex: {},
|
|
3276
|
+
documentId: {},
|
|
3277
|
+
onClick: { type: Function },
|
|
3278
|
+
appearanceActive: { type: Boolean }
|
|
3279
|
+
},
|
|
3280
|
+
setup(__props) {
|
|
3281
|
+
return (_ctx, _cache) => {
|
|
3282
|
+
return openBlock(), createBlock(_sfc_main$9, mergeProps(__props.currentObject, {
|
|
3283
|
+
isSelected: __props.isSelected,
|
|
3284
|
+
scale: __props.scale,
|
|
3285
|
+
onClick: __props.onClick,
|
|
3286
|
+
appearanceActive: __props.appearanceActive
|
|
3287
|
+
}), null, 16, ["isSelected", "scale", "onClick", "appearanceActive"]);
|
|
3288
|
+
};
|
|
3289
|
+
}
|
|
3290
|
+
});
|
|
3291
|
+
const _hoisted_1 = {
|
|
3292
|
+
key: 0,
|
|
3293
|
+
style: { position: "absolute", inset: 0, pointerEvents: "none" },
|
|
3294
|
+
viewBox: "0 0 20 20",
|
|
3295
|
+
width: "100%",
|
|
3296
|
+
height: "100%"
|
|
3297
|
+
};
|
|
3298
|
+
const _hoisted_2 = ["fill", "opacity", "stroke"];
|
|
3299
|
+
const _hoisted_3 = ["stroke"];
|
|
3300
|
+
const _hoisted_4 = ["stroke"];
|
|
3301
|
+
const _hoisted_5 = ["stroke"];
|
|
3302
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3303
|
+
__name: "text",
|
|
3304
|
+
props: {
|
|
3305
|
+
isSelected: { type: Boolean },
|
|
3306
|
+
color: { default: "#facc15" },
|
|
3307
|
+
opacity: { default: 1 },
|
|
3308
|
+
onClick: {},
|
|
3309
|
+
appearanceActive: { type: Boolean, default: false }
|
|
3310
|
+
},
|
|
3311
|
+
setup(__props) {
|
|
3312
|
+
const props = __props;
|
|
3313
|
+
const lineColor = computed(() => getContrastStrokeColor(props.color));
|
|
3314
|
+
return (_ctx, _cache) => {
|
|
3315
|
+
return openBlock(), createElementBlock("div", {
|
|
3316
|
+
style: normalizeStyle({
|
|
3317
|
+
position: "absolute",
|
|
3318
|
+
inset: 0,
|
|
3319
|
+
zIndex: 2,
|
|
3320
|
+
pointerEvents: __props.isSelected ? "none" : "auto",
|
|
3321
|
+
cursor: __props.isSelected ? "move" : "pointer"
|
|
3322
|
+
}),
|
|
3323
|
+
onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
|
|
3324
|
+
(...args) => __props.onClick && __props.onClick(...args))
|
|
3325
|
+
}, [
|
|
3326
|
+
!__props.appearanceActive ? (openBlock(), createElementBlock("svg", _hoisted_1, [
|
|
3327
|
+
createElementVNode("path", {
|
|
3328
|
+
d: "M 0.5 15.5 L 0.5 0.5 L 19.5 0.5 L 19.5 15.5 L 8.5 15.5 L 6.5 19.5 L 4.5 15.5 Z",
|
|
3329
|
+
fill: __props.color,
|
|
3330
|
+
opacity: __props.opacity,
|
|
3331
|
+
stroke: lineColor.value,
|
|
3332
|
+
"stroke-width": "1",
|
|
3333
|
+
"stroke-linejoin": "miter"
|
|
3334
|
+
}, null, 8, _hoisted_2),
|
|
3335
|
+
createElementVNode("line", {
|
|
3336
|
+
x1: "2.5",
|
|
3337
|
+
y1: "4.25",
|
|
3338
|
+
x2: "17.5",
|
|
3339
|
+
y2: "4.25",
|
|
3340
|
+
stroke: lineColor.value,
|
|
3341
|
+
"stroke-width": "1"
|
|
3342
|
+
}, null, 8, _hoisted_3),
|
|
3343
|
+
createElementVNode("line", {
|
|
3344
|
+
x1: "2.5",
|
|
3345
|
+
y1: "8",
|
|
3346
|
+
x2: "17.5",
|
|
3347
|
+
y2: "8",
|
|
3348
|
+
stroke: lineColor.value,
|
|
3349
|
+
"stroke-width": "1"
|
|
3350
|
+
}, null, 8, _hoisted_4),
|
|
3351
|
+
createElementVNode("line", {
|
|
3352
|
+
x1: "2.5",
|
|
3353
|
+
y1: "11.75",
|
|
3354
|
+
x2: "17.5",
|
|
3355
|
+
y2: "11.75",
|
|
3356
|
+
stroke: lineColor.value,
|
|
3357
|
+
"stroke-width": "1"
|
|
3358
|
+
}, null, 8, _hoisted_5)
|
|
3359
|
+
])) : createCommentVNode("", true)
|
|
3360
|
+
], 36);
|
|
3361
|
+
};
|
|
3362
|
+
}
|
|
3363
|
+
});
|
|
3364
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3365
|
+
__name: "text-renderer",
|
|
3366
|
+
props: {
|
|
3367
|
+
annotation: {},
|
|
3368
|
+
currentObject: {},
|
|
3369
|
+
isSelected: { type: Boolean },
|
|
3370
|
+
isEditing: { type: Boolean },
|
|
3371
|
+
scale: {},
|
|
3372
|
+
pageIndex: {},
|
|
3373
|
+
documentId: {},
|
|
3374
|
+
onClick: { type: Function },
|
|
3375
|
+
appearanceActive: { type: Boolean }
|
|
3376
|
+
},
|
|
3377
|
+
setup(__props) {
|
|
3378
|
+
return (_ctx, _cache) => {
|
|
3379
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
3380
|
+
isSelected: __props.isSelected,
|
|
3381
|
+
color: __props.currentObject.strokeColor ?? __props.currentObject.color,
|
|
3382
|
+
opacity: __props.currentObject.opacity,
|
|
3383
|
+
onClick: __props.onClick,
|
|
3384
|
+
appearanceActive: __props.appearanceActive
|
|
3385
|
+
}, null, 8, ["isSelected", "color", "opacity", "onClick", "appearanceActive"]);
|
|
3386
|
+
};
|
|
3387
|
+
}
|
|
3388
|
+
});
|
|
2983
3389
|
const builtInRenderers = [
|
|
2984
3390
|
createRenderer({
|
|
2985
3391
|
id: "ink",
|
|
2986
3392
|
matches: (a) => a.type === PdfAnnotationSubtype.INK,
|
|
2987
|
-
component: _sfc_main$
|
|
3393
|
+
component: _sfc_main$z,
|
|
2988
3394
|
interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
|
|
2989
3395
|
}),
|
|
2990
3396
|
createRenderer({
|
|
2991
3397
|
id: "square",
|
|
2992
3398
|
matches: (a) => a.type === PdfAnnotationSubtype.SQUARE,
|
|
2993
|
-
component: _sfc_main$
|
|
3399
|
+
component: _sfc_main$x,
|
|
2994
3400
|
interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
|
|
2995
3401
|
}),
|
|
2996
3402
|
createRenderer({
|
|
2997
3403
|
id: "circle",
|
|
2998
3404
|
matches: (a) => a.type === PdfAnnotationSubtype.CIRCLE,
|
|
2999
|
-
component: _sfc_main$
|
|
3405
|
+
component: _sfc_main$v,
|
|
3000
3406
|
interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
|
|
3001
3407
|
}),
|
|
3002
3408
|
createRenderer({
|
|
3003
3409
|
id: "line",
|
|
3004
3410
|
matches: (a) => a.type === PdfAnnotationSubtype.LINE,
|
|
3005
|
-
component: _sfc_main$
|
|
3411
|
+
component: _sfc_main$t,
|
|
3006
3412
|
vertexConfig: {
|
|
3007
3413
|
extractVertices: (a) => [a.linePoints.start, a.linePoints.end],
|
|
3008
3414
|
transformAnnotation: (a, v) => ({
|
|
@@ -3015,7 +3421,7 @@ const builtInRenderers = [
|
|
|
3015
3421
|
createRenderer({
|
|
3016
3422
|
id: "polyline",
|
|
3017
3423
|
matches: (a) => a.type === PdfAnnotationSubtype.POLYLINE,
|
|
3018
|
-
component: _sfc_main$
|
|
3424
|
+
component: _sfc_main$r,
|
|
3019
3425
|
vertexConfig: {
|
|
3020
3426
|
extractVertices: (a) => a.vertices,
|
|
3021
3427
|
transformAnnotation: (a, vertices) => ({ ...a, vertices })
|
|
@@ -3025,7 +3431,7 @@ const builtInRenderers = [
|
|
|
3025
3431
|
createRenderer({
|
|
3026
3432
|
id: "polygon",
|
|
3027
3433
|
matches: (a) => a.type === PdfAnnotationSubtype.POLYGON,
|
|
3028
|
-
component: _sfc_main$
|
|
3434
|
+
component: _sfc_main$p,
|
|
3029
3435
|
vertexConfig: {
|
|
3030
3436
|
extractVertices: (a) => a.vertices,
|
|
3031
3437
|
transformAnnotation: (a, vertices) => ({ ...a, vertices })
|
|
@@ -3035,38 +3441,48 @@ const builtInRenderers = [
|
|
|
3035
3441
|
createRenderer({
|
|
3036
3442
|
id: "highlight",
|
|
3037
3443
|
matches: (a) => a.type === PdfAnnotationSubtype.HIGHLIGHT,
|
|
3038
|
-
component: _sfc_main$
|
|
3444
|
+
component: _sfc_main$g,
|
|
3039
3445
|
zIndex: 0,
|
|
3040
3446
|
interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false },
|
|
3041
|
-
|
|
3042
|
-
mixBlendMode: blendModeToCss(a.blendMode ?? PdfBlendMode.Multiply)
|
|
3043
|
-
})
|
|
3447
|
+
defaultBlendMode: PdfBlendMode.Multiply
|
|
3044
3448
|
}),
|
|
3045
3449
|
createRenderer({
|
|
3046
3450
|
id: "underline",
|
|
3047
3451
|
matches: (a) => a.type === PdfAnnotationSubtype.UNDERLINE,
|
|
3048
|
-
component: _sfc_main$
|
|
3452
|
+
component: _sfc_main$e,
|
|
3049
3453
|
zIndex: 0,
|
|
3050
3454
|
interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false }
|
|
3051
3455
|
}),
|
|
3052
3456
|
createRenderer({
|
|
3053
3457
|
id: "strikeout",
|
|
3054
3458
|
matches: (a) => a.type === PdfAnnotationSubtype.STRIKEOUT,
|
|
3055
|
-
component: _sfc_main$
|
|
3459
|
+
component: _sfc_main$c,
|
|
3056
3460
|
zIndex: 0,
|
|
3057
3461
|
interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false }
|
|
3058
3462
|
}),
|
|
3059
3463
|
createRenderer({
|
|
3060
3464
|
id: "squiggly",
|
|
3061
3465
|
matches: (a) => a.type === PdfAnnotationSubtype.SQUIGGLY,
|
|
3062
|
-
component: _sfc_main$
|
|
3466
|
+
component: _sfc_main$a,
|
|
3063
3467
|
zIndex: 0,
|
|
3064
3468
|
interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false }
|
|
3065
3469
|
}),
|
|
3470
|
+
createRenderer({
|
|
3471
|
+
id: "text",
|
|
3472
|
+
matches: (a) => a.type === PdfAnnotationSubtype.TEXT && !a.inReplyToId,
|
|
3473
|
+
component: _sfc_main$6,
|
|
3474
|
+
interactionDefaults: { isDraggable: true, isResizable: false, isRotatable: false }
|
|
3475
|
+
}),
|
|
3476
|
+
createRenderer({
|
|
3477
|
+
id: "caret",
|
|
3478
|
+
matches: (a) => a.type === PdfAnnotationSubtype.CARET,
|
|
3479
|
+
component: _sfc_main$8,
|
|
3480
|
+
interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false }
|
|
3481
|
+
}),
|
|
3066
3482
|
createRenderer({
|
|
3067
3483
|
id: "freeText",
|
|
3068
3484
|
matches: (a) => a.type === PdfAnnotationSubtype.FREETEXT,
|
|
3069
|
-
component: _sfc_main$
|
|
3485
|
+
component: _sfc_main$n,
|
|
3070
3486
|
interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true },
|
|
3071
3487
|
isDraggable: (toolDraggable, { isEditing }) => toolDraggable && !isEditing,
|
|
3072
3488
|
onDoubleClick: (id, setEditingId) => setEditingId(id)
|
|
@@ -3074,14 +3490,14 @@ const builtInRenderers = [
|
|
|
3074
3490
|
createRenderer({
|
|
3075
3491
|
id: "stamp",
|
|
3076
3492
|
matches: (a) => a.type === PdfAnnotationSubtype.STAMP,
|
|
3077
|
-
component: _sfc_main$
|
|
3493
|
+
component: _sfc_main$k,
|
|
3078
3494
|
useAppearanceStream: false,
|
|
3079
3495
|
interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
|
|
3080
3496
|
}),
|
|
3081
3497
|
createRenderer({
|
|
3082
3498
|
id: "link",
|
|
3083
3499
|
matches: (a) => a.type === PdfAnnotationSubtype.LINK,
|
|
3084
|
-
component: _sfc_main$
|
|
3500
|
+
component: _sfc_main$i,
|
|
3085
3501
|
interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false },
|
|
3086
3502
|
useAppearanceStream: false,
|
|
3087
3503
|
selectOverride: (e, annotation, helpers) => {
|
|
@@ -3378,11 +3794,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3378
3794
|
renderer.onDoubleClick(annotation.object.id, setEditingId);
|
|
3379
3795
|
};
|
|
3380
3796
|
};
|
|
3381
|
-
const
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
};
|
|
3797
|
+
const getBlendMode = (annotation, renderer) => {
|
|
3798
|
+
return blendModeToCss(
|
|
3799
|
+
annotation.object.blendMode ?? renderer.defaultBlendMode ?? PdfBlendMode.Normal
|
|
3800
|
+
);
|
|
3386
3801
|
};
|
|
3387
3802
|
const getAppearance = (annotation, renderer) => {
|
|
3388
3803
|
var _a, _b;
|
|
@@ -3403,10 +3818,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3403
3818
|
return (_ctx, _cache) => {
|
|
3404
3819
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3405
3820
|
(openBlock(true), createElementBlock(Fragment, null, renderList(resolvedAnnotations.value, ({ annotation, renderer }) => {
|
|
3821
|
+
var _a;
|
|
3406
3822
|
return openBlock(), createElementBlock(Fragment, {
|
|
3407
3823
|
key: annotation.object.id
|
|
3408
3824
|
}, [
|
|
3409
|
-
renderer ? (openBlock(), createBlock(_sfc_main$
|
|
3825
|
+
renderer ? (openBlock(), createBlock(_sfc_main$C, mergeProps({
|
|
3410
3826
|
key: 0,
|
|
3411
3827
|
trackedAnnotation: annotation,
|
|
3412
3828
|
isSelected: allSelectedIds.value.includes(annotation.object.id),
|
|
@@ -3421,7 +3837,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3421
3837
|
onSelect: getOnSelect(annotation, renderer),
|
|
3422
3838
|
onDoubleClick: getOnDoubleClick(renderer, annotation),
|
|
3423
3839
|
zIndex: renderer.zIndex,
|
|
3424
|
-
|
|
3840
|
+
blendMode: getBlendMode(annotation, renderer),
|
|
3841
|
+
style: (_a = renderer.containerStyle) == null ? void 0 : _a.call(renderer, annotation.object),
|
|
3425
3842
|
appearance: getAppearance(annotation, renderer)
|
|
3426
3843
|
}, { ref_for: true }, containerProps.value), createSlots({
|
|
3427
3844
|
default: withCtx(({ annotation: currentObject, appearanceActive }) => [
|
|
@@ -3455,10 +3872,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3455
3872
|
]),
|
|
3456
3873
|
key: "0"
|
|
3457
3874
|
} : void 0
|
|
3458
|
-
]), 1040, ["trackedAnnotation", "isSelected", "isEditing", "isMultiSelected", "isDraggable", "isResizable", "lockAspectRatio", "isRotatable", "vertexConfig", "selectionMenu", "onSelect", "onDoubleClick", "zIndex", "style", "appearance"])) : createCommentVNode("", true)
|
|
3875
|
+
]), 1040, ["trackedAnnotation", "isSelected", "isEditing", "isMultiSelected", "isDraggable", "isResizable", "lockAspectRatio", "isRotatable", "vertexConfig", "selectionMenu", "onSelect", "onDoubleClick", "zIndex", "blendMode", "style", "appearance"])) : createCommentVNode("", true)
|
|
3459
3876
|
], 64);
|
|
3460
3877
|
}), 128)),
|
|
3461
|
-
allSelectedOnSamePage.value && selectedAnnotationsOnPage.value.length >= 2 ? (openBlock(), createBlock(_sfc_main$
|
|
3878
|
+
allSelectedOnSamePage.value && selectedAnnotationsOnPage.value.length >= 2 ? (openBlock(), createBlock(_sfc_main$B, {
|
|
3462
3879
|
key: 0,
|
|
3463
3880
|
documentId: __props.documentId,
|
|
3464
3881
|
pageIndex: __props.pageIndex,
|
|
@@ -3541,25 +3958,25 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3541
3958
|
inset: 0
|
|
3542
3959
|
})
|
|
3543
3960
|
}, [
|
|
3544
|
-
activeTool.value.defaults.type === unref(PdfAnnotationSubtype).HIGHLIGHT ? (openBlock(), createBlock(_sfc_main$
|
|
3961
|
+
activeTool.value.defaults.type === unref(PdfAnnotationSubtype).HIGHLIGHT ? (openBlock(), createBlock(_sfc_main$h, {
|
|
3545
3962
|
key: 0,
|
|
3546
3963
|
strokeColor: activeTool.value.defaults.strokeColor,
|
|
3547
3964
|
opacity: activeTool.value.defaults.opacity,
|
|
3548
3965
|
segmentRects: rects.value,
|
|
3549
3966
|
scale: __props.scale
|
|
3550
|
-
}, null, 8, ["strokeColor", "opacity", "segmentRects", "scale"])) : activeTool.value.defaults.type === unref(PdfAnnotationSubtype).UNDERLINE ? (openBlock(), createBlock(_sfc_main$
|
|
3967
|
+
}, null, 8, ["strokeColor", "opacity", "segmentRects", "scale"])) : activeTool.value.defaults.type === unref(PdfAnnotationSubtype).UNDERLINE ? (openBlock(), createBlock(_sfc_main$f, {
|
|
3551
3968
|
key: 1,
|
|
3552
3969
|
strokeColor: activeTool.value.defaults.strokeColor,
|
|
3553
3970
|
opacity: activeTool.value.defaults.opacity,
|
|
3554
3971
|
segmentRects: rects.value,
|
|
3555
3972
|
scale: __props.scale
|
|
3556
|
-
}, null, 8, ["strokeColor", "opacity", "segmentRects", "scale"])) : activeTool.value.defaults.type === unref(PdfAnnotationSubtype).STRIKEOUT ? (openBlock(), createBlock(_sfc_main$
|
|
3973
|
+
}, null, 8, ["strokeColor", "opacity", "segmentRects", "scale"])) : activeTool.value.defaults.type === unref(PdfAnnotationSubtype).STRIKEOUT ? (openBlock(), createBlock(_sfc_main$d, {
|
|
3557
3974
|
key: 2,
|
|
3558
3975
|
strokeColor: activeTool.value.defaults.strokeColor,
|
|
3559
3976
|
opacity: activeTool.value.defaults.opacity,
|
|
3560
3977
|
segmentRects: rects.value,
|
|
3561
3978
|
scale: __props.scale
|
|
3562
|
-
}, null, 8, ["strokeColor", "opacity", "segmentRects", "scale"])) : activeTool.value.defaults.type === unref(PdfAnnotationSubtype).SQUIGGLY ? (openBlock(), createBlock(_sfc_main$
|
|
3979
|
+
}, null, 8, ["strokeColor", "opacity", "segmentRects", "scale"])) : activeTool.value.defaults.type === unref(PdfAnnotationSubtype).SQUIGGLY ? (openBlock(), createBlock(_sfc_main$b, {
|
|
3563
3980
|
key: 3,
|
|
3564
3981
|
strokeColor: activeTool.value.defaults.strokeColor,
|
|
3565
3982
|
opacity: activeTool.value.defaults.opacity,
|
|
@@ -3578,40 +3995,46 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3578
3995
|
},
|
|
3579
3996
|
setup(__props) {
|
|
3580
3997
|
const props = __props;
|
|
3581
|
-
const style = computed(() =>
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3998
|
+
const style = computed(() => {
|
|
3999
|
+
const base = {
|
|
4000
|
+
position: "absolute",
|
|
4001
|
+
left: `${props.preview.bounds.origin.x * props.scale}px`,
|
|
4002
|
+
top: `${props.preview.bounds.origin.y * props.scale}px`,
|
|
4003
|
+
width: `${props.preview.bounds.size.width * props.scale}px`,
|
|
4004
|
+
height: `${props.preview.bounds.size.height * props.scale}px`,
|
|
4005
|
+
pointerEvents: "none",
|
|
4006
|
+
zIndex: 10
|
|
4007
|
+
};
|
|
4008
|
+
if (props.preview.type === PdfAnnotationSubtype.INK) {
|
|
4009
|
+
base.mixBlendMode = blendModeToCss(props.preview.data.blendMode ?? PdfBlendMode.Normal);
|
|
4010
|
+
}
|
|
4011
|
+
return base;
|
|
4012
|
+
});
|
|
3590
4013
|
return (_ctx, _cache) => {
|
|
3591
4014
|
return openBlock(), createElementBlock("div", {
|
|
3592
4015
|
style: normalizeStyle(style.value)
|
|
3593
4016
|
}, [
|
|
3594
|
-
__props.preview.type === unref(PdfAnnotationSubtype).CIRCLE ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4017
|
+
__props.preview.type === unref(PdfAnnotationSubtype).CIRCLE ? (openBlock(), createBlock(unref(_sfc_main$w), mergeProps({
|
|
3595
4018
|
key: 0,
|
|
3596
4019
|
isSelected: false,
|
|
3597
4020
|
scale: __props.scale
|
|
3598
|
-
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).SQUARE ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4021
|
+
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).SQUARE ? (openBlock(), createBlock(unref(_sfc_main$y), mergeProps({
|
|
3599
4022
|
key: 1,
|
|
3600
4023
|
isSelected: false,
|
|
3601
4024
|
scale: __props.scale
|
|
3602
|
-
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).POLYGON ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4025
|
+
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).POLYGON ? (openBlock(), createBlock(unref(_sfc_main$q), mergeProps({
|
|
3603
4026
|
key: 2,
|
|
3604
4027
|
isSelected: false,
|
|
3605
4028
|
scale: __props.scale
|
|
3606
|
-
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).POLYLINE ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4029
|
+
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).POLYLINE ? (openBlock(), createBlock(unref(_sfc_main$s), mergeProps({
|
|
3607
4030
|
key: 3,
|
|
3608
4031
|
isSelected: false,
|
|
3609
4032
|
scale: __props.scale
|
|
3610
|
-
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).LINE ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4033
|
+
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).LINE ? (openBlock(), createBlock(unref(_sfc_main$u), mergeProps({
|
|
3611
4034
|
key: 4,
|
|
3612
4035
|
isSelected: false,
|
|
3613
4036
|
scale: __props.scale
|
|
3614
|
-
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).INK ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4037
|
+
}, __props.preview.data), null, 16, ["scale"])) : __props.preview.type === unref(PdfAnnotationSubtype).INK ? (openBlock(), createBlock(unref(_sfc_main$A), mergeProps({
|
|
3615
4038
|
key: 5,
|
|
3616
4039
|
isSelected: false,
|
|
3617
4040
|
scale: __props.scale
|
|
@@ -3862,29 +4285,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3862
4285
|
});
|
|
3863
4286
|
const AnnotationPluginPackage = createPluginPackage(AnnotationPluginPackage$1).addWrapper(_sfc_main).build();
|
|
3864
4287
|
export {
|
|
3865
|
-
_sfc_main$
|
|
4288
|
+
_sfc_main$C as AnnotationContainer,
|
|
3866
4289
|
_sfc_main$1 as AnnotationLayer,
|
|
3867
4290
|
_sfc_main$2 as AnnotationPaintLayer,
|
|
3868
4291
|
AnnotationPluginPackage,
|
|
3869
4292
|
_sfc_main$5 as Annotations,
|
|
3870
|
-
_sfc_main$
|
|
3871
|
-
_sfc_main$
|
|
3872
|
-
_sfc_main$
|
|
3873
|
-
_sfc_main$
|
|
3874
|
-
_sfc_main$
|
|
3875
|
-
_sfc_main$
|
|
3876
|
-
_sfc_main$
|
|
3877
|
-
_sfc_main$
|
|
3878
|
-
_sfc_main$
|
|
4293
|
+
_sfc_main$w as Circle,
|
|
4294
|
+
_sfc_main$o as FreeText,
|
|
4295
|
+
_sfc_main$B as GroupSelectionBox,
|
|
4296
|
+
_sfc_main$h as Highlight,
|
|
4297
|
+
_sfc_main$A as Ink,
|
|
4298
|
+
_sfc_main$u as Line,
|
|
4299
|
+
_sfc_main$j as Link,
|
|
4300
|
+
_sfc_main$q as Polygon,
|
|
4301
|
+
_sfc_main$s as Polyline,
|
|
3879
4302
|
_sfc_main$3 as PreviewRenderer,
|
|
3880
|
-
_sfc_main$
|
|
4303
|
+
_sfc_main$m as RenderAnnotation,
|
|
3881
4304
|
_sfc_main as RendererRegistryProvider,
|
|
3882
|
-
_sfc_main$
|
|
3883
|
-
_sfc_main$
|
|
3884
|
-
_sfc_main$
|
|
3885
|
-
_sfc_main$
|
|
4305
|
+
_sfc_main$y as Square,
|
|
4306
|
+
_sfc_main$b as Squiggly,
|
|
4307
|
+
_sfc_main$l as Stamp,
|
|
4308
|
+
_sfc_main$d as Strikeout,
|
|
4309
|
+
_sfc_main$7 as Text,
|
|
3886
4310
|
_sfc_main$4 as TextMarkup,
|
|
3887
|
-
_sfc_main$
|
|
4311
|
+
_sfc_main$f as Underline,
|
|
3888
4312
|
createRenderer,
|
|
3889
4313
|
createRendererRegistry,
|
|
3890
4314
|
provideRendererRegistry,
|