@annotorious/annotorious 3.7.13 → 3.7.14-beta
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/annotation/utils/styling.d.ts +2 -2
- package/dist/annotorious.es.js +7 -7
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/package.json +5 -3
- package/src/annotation/editors/EditorMount.svelte +1 -1
- package/src/annotation/utils/styling.ts +4 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DrawingStyleExpression } from '@annotorious/core';
|
|
1
|
+
import { AnnotationState, DrawingStyleExpression } from '@annotorious/core';
|
|
2
2
|
import { ImageAnnotation } from '../../model';
|
|
3
|
-
export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyleExpression<ImageAnnotation
|
|
3
|
+
export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyleExpression<ImageAnnotation>, state?: AnnotationState) => string | undefined;
|
package/dist/annotorious.es.js
CHANGED
|
@@ -1758,12 +1758,12 @@ const ji = (e, t) => {
|
|
|
1758
1758
|
}), i.observe(t.parentElement)), { destroy: () => {
|
|
1759
1759
|
i && i.disconnect();
|
|
1760
1760
|
}, subscribe: n };
|
|
1761
|
-
}, Re = (e, t) => {
|
|
1762
|
-
const
|
|
1763
|
-
if (
|
|
1764
|
-
const { fill:
|
|
1765
|
-
let
|
|
1766
|
-
return
|
|
1761
|
+
}, Re = (e, t, n) => {
|
|
1762
|
+
const o = typeof t == "function" ? t(e, n) : t;
|
|
1763
|
+
if (o) {
|
|
1764
|
+
const { fill: i, fillOpacity: s, stroke: r, strokeWidth: l, strokeOpacity: a } = o;
|
|
1765
|
+
let u = "";
|
|
1766
|
+
return i && (u += `fill:${i};`), s || s === 0 ? u += `fill-opacity:${s};` : i && (u += "fill-opacity:0.25;"), r && (u += `stroke:${r};`, u += `stroke-width:${l || "1"};`, u += `stroke-opacity:${a || "1"};`), u;
|
|
1767
1767
|
}
|
|
1768
1768
|
}, wt = (e, t = 0) => {
|
|
1769
1769
|
const { minX: n, minY: o, maxX: i, maxY: s } = e;
|
|
@@ -4383,7 +4383,7 @@ function As(e, t, n) {
|
|
|
4383
4383
|
"annotation" in h && n(0, s = h.annotation), "editor" in h && n(1, r = h.editor), "style" in h && n(2, l = h.style), "target" in h && n(3, a = h.target), "transform" in h && n(4, u = h.transform), "viewportScale" in h && n(5, d = h.viewportScale);
|
|
4384
4384
|
}, e.$$.update = () => {
|
|
4385
4385
|
e.$$.dirty & /*annotation, style*/
|
|
4386
|
-
5 && n(7, o = Re(s, l)), e.$$.dirty & /*annotation, editorComponent*/
|
|
4386
|
+
5 && n(7, o = Re(s, l, { selected: !0, hovered: !0 })), e.$$.dirty & /*annotation, editorComponent*/
|
|
4387
4387
|
65 && s && (f == null || f.$set({ shape: s.target.selector })), e.$$.dirty & /*editorComponent, transform*/
|
|
4388
4388
|
80 && f && f.$set({ transform: u }), e.$$.dirty & /*editorComponent, viewportScale*/
|
|
4389
4389
|
96 && f && f.$set({ viewportScale: d }), e.$$.dirty & /*editorComponent, computedStyle*/
|