@annotorious/annotorious 3.5.0 → 3.5.1
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/annotorious.es.js +143 -143
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +2 -2
- package/dist/annotorious.js.map +1 -1
- package/dist/model/core/Shape.d.ts +1 -1
- package/package.json +2 -2
- package/src/annotation/SVGAnnotationLayer.svelte +1 -1
- package/src/annotation/editors/editorsRegistry.ts +1 -1
- package/src/model/core/Shape.ts +1 -1
- package/src/model/core/multipolygon/multiPolygonUtils.ts +1 -1
- package/src/model/w3c/svg/SVGSelector.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@annotorious/annotorious",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Add image annotation functionality to any web page with a few lines of JavaScript",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"vitest": "^3.2.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@annotorious/core": "3.5.
|
|
52
|
+
"@annotorious/core": "3.5.1",
|
|
53
53
|
"dequal": "^2.0.3",
|
|
54
54
|
"rbush": "^4.0.1",
|
|
55
55
|
"simplify-js": "^1.2.4",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
annotation={annotation}
|
|
176
176
|
geom={selector.geometry}
|
|
177
177
|
style={style} />
|
|
178
|
-
{:else if (selector?.type === ShapeType.
|
|
178
|
+
{:else if (selector?.type === ShapeType.MULTIPOLYGON)}
|
|
179
179
|
<MultiPolygon
|
|
180
180
|
annotation={annotation}
|
|
181
181
|
geom={selector.geometry}
|
|
@@ -7,7 +7,7 @@ import { RectangleEditor } from './rectangle';
|
|
|
7
7
|
const REGISTERED = new Map<ShapeType, typeof SvelteComponent>([
|
|
8
8
|
[ShapeType.RECTANGLE, RectangleEditor as typeof SvelteComponent],
|
|
9
9
|
[ShapeType.POLYGON, PolygonEditor as typeof SvelteComponent],
|
|
10
|
-
[ShapeType.
|
|
10
|
+
[ShapeType.MULTIPOLYGON, MultiPolygonEditor as typeof SvelteComponent]
|
|
11
11
|
]);
|
|
12
12
|
|
|
13
13
|
export const getEditor = (shape: Shape) => REGISTERED.get(shape.type);
|
package/src/model/core/Shape.ts
CHANGED
|
@@ -108,7 +108,7 @@ const parseSVGPath = (value: string): Polygon | MultiPolygon => {
|
|
|
108
108
|
bounds
|
|
109
109
|
}
|
|
110
110
|
} : {
|
|
111
|
-
type: ShapeType.
|
|
111
|
+
type: ShapeType.MULTIPOLYGON,
|
|
112
112
|
geometry: {
|
|
113
113
|
polygons,
|
|
114
114
|
bounds
|
|
@@ -153,7 +153,7 @@ export const serializeSVGSelector = (shape: Shape): SVGSelector => {
|
|
|
153
153
|
value = `<svg><ellipse cx="${geom.cx}" cy="${geom.cy}" rx="${geom.rx}" ry="${geom.ry}" /></svg>`;
|
|
154
154
|
break;
|
|
155
155
|
}
|
|
156
|
-
case ShapeType.
|
|
156
|
+
case ShapeType.MULTIPOLYGON: {
|
|
157
157
|
const geom = shape.geometry as MultiPolygonGeometry;
|
|
158
158
|
value = `<svg>${serializeMultiPolygon(geom)}</svg>`;
|
|
159
159
|
break;
|