@annotorious/annotorious 3.4.5 → 3.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annotorious/annotorious",
3
- "version": "3.4.5",
3
+ "version": "3.4.7",
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.1.4"
50
50
  },
51
51
  "dependencies": {
52
- "@annotorious/core": "3.4.5",
52
+ "@annotorious/core": "3.4.7",
53
53
  "dequal": "^2.0.3",
54
54
  "rbush": "^4.0.1",
55
55
  "simplify-js": "^1.2.4",
@@ -37,6 +37,53 @@
37
37
  -webkit-tap-highlight-color: transparent;
38
38
  }
39
39
 
40
+ .a9s-touch-halo {
41
+ fill: transparent;
42
+ pointer-events: none;
43
+ stroke-width: 0;
44
+ transition: fill 150ms;
45
+ }
46
+
47
+ .a9s-touch-halo.touched {
48
+ fill: rgba(255, 255, 255, 0.4);
49
+ }
50
+
51
+ .a9s-handle-buffer {
52
+ fill: transparent;
53
+ }
54
+
55
+ .a9s-handle-dot {
56
+ fill: #fff;
57
+ pointer-events: none;
58
+ stroke: rgba(0, 0, 0, 0.35);
59
+ stroke-width: 1px;
60
+ vector-effect: non-scaling-stroke;
61
+ }
62
+
63
+ .a9s-handle-dot.selected {
64
+ fill: #1a1a1a;
65
+ stroke: none;
66
+ }
67
+
68
+ .a9s-handle-selected {
69
+ animation: dash-rotate 350ms linear infinite reverse;
70
+ fill: rgba(255, 255, 255, 0.25);
71
+ stroke: rgba(0, 0, 0, 0.9);
72
+ stroke-dasharray: 2 2;
73
+ stroke-width: 1px;
74
+ pointer-events: none;
75
+ vector-effect: non-scaling-stroke;
76
+ }
77
+
78
+ @keyframes dash-rotate {
79
+ 0% {
80
+ stroke-dashoffset: 0;
81
+ }
82
+ 100% {
83
+ stroke-dashoffset: 4; /* Sum of dash + gap */
84
+ }
85
+ }
86
+
40
87
  .a9s-edge-handle {
41
88
  fill: transparent;
42
89
  stroke: transparent;
@@ -73,53 +73,4 @@
73
73
  cy={y}
74
74
  r={handleRadius} />
75
75
  </g>
76
- {/if}
77
-
78
- <style>
79
- .a9s-touch-halo {
80
- fill: transparent;
81
- pointer-events: none;
82
- stroke-width: 0;
83
- transition: fill 150ms;
84
- }
85
-
86
- .a9s-touch-halo.touched {
87
- fill: rgba(255, 255, 255, 0.4);
88
- }
89
-
90
- .a9s-handle-buffer {
91
- fill: transparent;
92
- }
93
-
94
- .a9s-handle-dot {
95
- fill: #fff;
96
- pointer-events: none;
97
- stroke: rgba(0, 0, 0, 0.35);
98
- stroke-width: 1px;
99
- vector-effect: non-scaling-stroke;
100
- }
101
-
102
- .a9s-handle-dot.selected {
103
- fill: #1a1a1a;
104
- stroke: none;
105
- }
106
-
107
- .a9s-handle-selected {
108
- animation: dash-rotate 350ms linear infinite reverse;
109
- fill: rgba(255, 255, 255, 0.25);
110
- stroke: rgba(0, 0, 0, 0.9);
111
- stroke-dasharray: 2 2;
112
- stroke-width: 1px;
113
- pointer-events: none;
114
- vector-effect: non-scaling-stroke;
115
- }
116
-
117
- @keyframes dash-rotate {
118
- 0% {
119
- stroke-dashoffset: 0;
120
- }
121
- 100% {
122
- stroke-dashoffset: 4; /* Sum of dash + gap */
123
- }
124
- }
125
- </style>
76
+ {/if}
@@ -71,7 +71,9 @@ export const createImageAnnotatorState = <I extends Annotation, E extends unknow
71
71
  }
72
72
 
73
73
  const getIntersecting = (x: number, y: number, width: number, height: number) =>
74
- tree.getIntersecting(x, y, width, height).map(target => store.getAnnotation(target.annotation) as I);
74
+ tree.getIntersecting(x, y, width, height)
75
+ .map(target => store.getAnnotation(target.annotation) as I)
76
+ .filter(Boolean); // Race conditions may have deleted annotations concurrently
75
77
 
76
78
  return {
77
79
  store: {