Commit 45a63f2
committed
#6108 - Relation support for the Apache Annotator HTML editor mode
- Add relation rendering to the Apache Annotator HTML editor: relations with both endpoints inside the effect-range band are drawn as full arcs, band-crossing relations as directional up/down stubs whose clickable tip jumps to the far endpoint, and pass-through relations are not drawn (RelationVisualizer)
- Add relation-creation by dragging from a span: a drag state machine (IDLE -> ARMED -> DRAGGING -> COMMIT/CANCEL) with window-level capture listeners so a release outside the iframe still resolves and does not leak into span creation (RelationDragController)
- Add hover-surfaced relation-creation "grips": a small drag affordance anchored above a hovered span's start that proxies the span without competing with the native text-selection gesture (RelationGripLayer)
- Add a target-disambiguation popup ("relation-target" mode) so a relation drag ending on overlapping spans lets the user pick which span is the target; dismissing cancels the relation (ApacheAnnotatorSelector.pickRelationTarget)
- Add a pooled per-color SVG arrowhead marker registry plus an svgEl element-creation helper (ArrowMarkerPool)
- Add a relation-labels preference and toolbar toggle: labels shown at rest vs. on hover, applied as a pure CSS mode flip without re-rendering
- Add line-spacing presets (low/mid/high/xhigh) with toolbar S/M/L/X buttons, applied as a class on the editor root; cap the arc bow scale so xhigh stacking matches the high preset
- Re-band the relation overlay around the current viewport on manual scroll, coalesced to one redraw per frame
- Fix overlay sizing so it collapses to zero before measuring content extent, preventing scrolling past the text into a blank region with no arcs (#6108)
- Add showRelationLabels and lineSpacing to the editor user-preferences schema
- Document ViewportTracker's visible range as a superset (recomputed only when elements are added), and remove dead display-style probing code
- Add distinctHighlightStack and fanAngle helpers (Utilities)
- Remove the invalid bugs URL from inception-assistant-ui package.json1 parent 67f99ef commit 45a63f2
17 files changed
Lines changed: 2626 additions & 123 deletions
File tree
- inception
- inception-assistant-ui/src/main/ts_template
- inception-html-apache-annotator-editor/src/main
- java/de/tudarmstadt/ukp/inception/apacheannotatoreditor
- ts/src/apache-annotator
- inception-js-api/src/main/ts/src/util
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
122 | 143 | | |
123 | 144 | | |
124 | 145 | | |
| |||
Lines changed: 53 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | | - | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 86 | | |
93 | 87 | | |
94 | 88 | | |
| |||
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
| 94 | + | |
| 95 | + | |
100 | 96 | | |
101 | 97 | | |
102 | 98 | | |
| |||
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | | - | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
142 | | - | |
143 | 140 | | |
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
147 | 144 | | |
148 | | - | |
149 | 145 | | |
150 | 146 | | |
151 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
155 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
| |||
184 | 182 | | |
185 | 183 | | |
186 | 184 | | |
187 | | - | |
188 | 185 | | |
189 | 186 | | |
190 | | - | |
191 | 187 | | |
192 | 188 | | |
193 | 189 | | |
| |||
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | | - | |
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
| |||
357 | 352 | | |
358 | 353 | | |
359 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
360 | 368 | | |
361 | 369 | | |
362 | 370 | | |
363 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
364 | 386 | | |
365 | 387 | | |
366 | 388 | | |
| |||
Lines changed: 46 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | | - | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
114 | 139 | | |
115 | | - | |
116 | 140 | | |
117 | 141 | | |
118 | 142 | | |
| |||
141 | 165 | | |
142 | 166 | | |
143 | 167 | | |
| 168 | + | |
144 | 169 | | |
145 | 170 | | |
146 | 171 | | |
| |||
153 | 178 | | |
154 | 179 | | |
155 | 180 | | |
156 | | - | |
157 | 181 | | |
158 | 182 | | |
159 | 183 | | |
| |||
205 | 229 | | |
206 | 230 | | |
207 | 231 | | |
208 | | - | |
209 | | - | |
| 232 | + | |
210 | 233 | | |
211 | 234 | | |
212 | 235 | | |
213 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
214 | 242 | | |
215 | 243 | | |
216 | 244 | | |
| |||
303 | 331 | | |
304 | 332 | | |
305 | 333 | | |
306 | | - | |
| 334 | + | |
307 | 335 | | |
308 | 336 | | |
309 | 337 | | |
310 | 338 | | |
| 339 | + | |
| 340 | + | |
311 | 341 | | |
312 | 342 | | |
313 | 343 | | |
314 | 344 | | |
315 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
316 | 355 | | |
317 | 356 | | |
318 | 357 | | |
| |||
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments