Skip to content

Commit 556aac4

Browse files
committed
Bugfixes and cleanup
- Renamed: `processors` -> `odin` - Styles: Removed `.polyline` class for SVG elements (misleading; these are actually full Paths and not Polylines) - Some optimisation of SVG-handling code - Bugfix: Previously, large leftwards/rightwards movements of a Word might cause it to be placed outside the right bound of its Row. - Demo: Watch task for demo builds now produces source maps for easier debugging - Removed various bits of dead, debug, and deprecated code
1 parent ce18897 commit 556aac4

30 files changed

+771
-2071
lines changed

demo/demo.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/index-old.html

Lines changed: 0 additions & 144 deletions
This file was deleted.

demo/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h4>Basic example</h4>
3434
<code class="language-javascript">const tag = TAG.tag({
3535
container: "container-id",
3636
data: {...},
37-
format: "json"
37+
format: "odin"
3838
});</code></pre>
3939

4040
<div id="basicContainer" style="border: solid 1px lightgray"></div>
@@ -92,9 +92,9 @@ <h4>Extended UI example</h4>
9292
<a class="dropdown-item tag-dataset" data-path="data/example3.ann" data-format="brat" href="#">
9393
Brat event annotations (example3.ann)
9494
</a>
95-
<a class="dropdown-item tag-dataset" data-path="data/test-processors.json" data-format="processors"
95+
<a class="dropdown-item tag-dataset" data-path="data/test-odin.json" data-format="odin"
9696
href="#">
97-
Processors format test (test-processors.json)
97+
Odin format test (test-odin.json)
9898
</a>
9999
</div>
100100
</div>

demo/src/demo.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,14 @@ $(async () => {
5252

5353
// The initial data to load.
5454
// Different formats might expect different types for `data`:
55-
// E.g., the "json" format expects the annotations as an
55+
// E.g., the "odin" format expects the annotations as an
5656
// (already-parsed) Object, while the "brat" format expects them as a raw
5757
// String.
5858
// See the full documentation for details.
59-
data: require("../data/data7.json"),
60-
format: "reach"
59+
data: require("../data/test-odin.json"),
60+
format: "odin"
6161
});
6262

63-
// // Debug
64-
// await basicTag.loadUrlAsync("data/test-brat.ann", "brat");
65-
6663
// -------------------
6764
// Advanced/UI example
6865
// -------------------
@@ -71,12 +68,9 @@ $(async () => {
7168
container: $uiContainer
7269
});
7370

74-
// Data can be loaded after initialisation using the `.loadData()` function
75-
const sampleData = require("../data/data1.json");
76-
uiTag.loadData(sampleData, "reach");
77-
78-
// // Debug
79-
// await uiTag.loadUrlAsync("data/test-processors.json", "processors");
71+
// Data can be loaded after initialisation using the `.loadData()` function,
72+
// or from a remote URL via the asynchronous `.loadUrlAsync()` function.
73+
await uiTag.loadUrlAsync("data/test-brat.ann", "brat");
8074

8175
// --------------------------------------------------------------------------
8276

dist/tag/css/tag.css

Lines changed: 13 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)