Skip to content

Commit ead4840

Browse files
committed
Formatting
1 parent 4f737bf commit ead4840

File tree

2 files changed

+72
-69
lines changed

2 files changed

+72
-69
lines changed

packages/extension-tei/test/index.html

Lines changed: 71 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,87 +6,90 @@
66
<link rel="stylesheet" href="CETEIcean.css">
77
<script type="module" src="../src/index.ts"></script>
88
<style>
9-
*, *:before, *:after {
10-
box-sizing: border-box;
11-
}
12-
13-
html, body {
14-
background: #e2e2e2;
15-
padding: 0;
16-
margin: 0;
17-
display: flex;
18-
flex-direction: row;
19-
justify-content: center;
20-
}
21-
22-
#content {
23-
max-width: 800px;
24-
background-color: #fff;
25-
padding: 40px;
26-
border-style: solid;
27-
border-color: #cfcfcf;
28-
border-width: 0 1px;
29-
position: relative;
30-
}
31-
32-
#content img {
33-
max-width: 100%;
34-
}
35-
36-
h1 {
37-
margin: 0;
38-
padding: 0 0 20px 0;
39-
}
40-
41-
p {
42-
font-size: 17px;
43-
line-height: 160%;
44-
}
9+
*,
10+
*:before,
11+
*:after {
12+
box-sizing: border-box;
13+
}
14+
15+
html,
16+
body {
17+
background: #e2e2e2;
18+
padding: 0;
19+
margin: 0;
20+
display: flex;
21+
flex-direction: row;
22+
justify-content: center;
23+
}
24+
25+
#content {
26+
max-width: 800px;
27+
background-color: #fff;
28+
padding: 40px;
29+
border-style: solid;
30+
border-color: #cfcfcf;
31+
border-width: 0 1px;
32+
position: relative;
33+
}
34+
35+
#content img {
36+
max-width: 100%;
37+
}
38+
39+
h1 {
40+
margin: 0;
41+
padding: 0 0 20px 0;
42+
}
43+
44+
p {
45+
font-size: 17px;
46+
line-height: 160%;
47+
}
4548
</style>
4649
</head>
4750

4851
<body>
49-
<div id="content">
50-
</div>
52+
<div id="content">
53+
</div>
5154

52-
<script type="module">
53-
import CETEI from 'CETEIcean';
54-
import { createTextAnnotator } from '@recogito/text-annotator';
55-
import { TEIPlugin } from '../src/index.ts';
55+
<script type="module">
56+
import CETEI from 'CETEIcean';
57+
import { createTextAnnotator } from '@recogito/text-annotator';
58+
import { TEIPlugin } from '../src/index.ts';
5659

57-
import '@recogito/text-annotator/dist/text-annotator.css';
60+
import '@recogito/text-annotator/dist/text-annotator.css';
5861

59-
window.onload = async function () {
60-
var CETEIcean = new CETEI();
62+
window.onload = async function () {
63+
var CETEIcean = new CETEI();
6164

62-
CETEIcean.getHTML5('macbeth.xml', data => {
63-
document.getElementById('content').appendChild(data);
65+
CETEIcean.getHTML5('macbeth.xml', data => {
66+
document.getElementById('content').appendChild(data);
6467

65-
var anno = TEIPlugin(createTextAnnotator(document.getElementById('content')));
68+
var anno = TEIPlugin(createTextAnnotator(document.getElementById('content')));
6669

67-
anno.loadAnnotations('annotations.json');
70+
anno.loadAnnotations('annotations.json');
6871

69-
anno.on('createAnnotation', annotation => {
70-
console.log('createAnnotation', annotation);
71-
});
72+
anno.on('createAnnotation', annotation => {
73+
console.log('createAnnotation', annotation);
74+
});
7275

73-
anno.on('updateAnnotation', (annotation, previous) => {
74-
console.log('updateAnnotation', annotation);
75-
});
76+
anno.on('updateAnnotation', (annotation, previous) => {
77+
console.log('updateAnnotation', annotation);
78+
});
7679

77-
anno.on('deleteAnnotation', (annotation) => {
78-
console.log('deleteAnnotation', annotation);
79-
});
80+
anno.on('deleteAnnotation', (annotation) => {
81+
console.log('deleteAnnotation', annotation);
82+
});
8083

81-
anno.on('selectionChanged', (annotations) => {
82-
console.log('selectionChanged', annotations);
83-
});
84+
anno.on('selectionChanged', (annotations) => {
85+
console.log('selectionChanged', annotations);
86+
});
8487

85-
anno.on('viewportIntersect', (annotations) => {
86-
console.log('viewport', annotations);
87-
});
88-
});
89-
};
90-
</script>
88+
anno.on('viewportIntersect', (annotations) => {
89+
console.log('viewport', annotations);
90+
});
91+
});
92+
};
93+
</script>
9194
</body>
92-
</html>
95+
</html>

packages/text-annotator/src/highlight/span/spansRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ export const createSpansRenderer = (
132132
container: HTMLElement,
133133
state: TextAnnotatorState<TextAnnotation, unknown>,
134134
viewport: ViewportState
135-
) => createBaseRenderer(container, state, viewport, createRenderer(container))
135+
) => createBaseRenderer(container, state, viewport, createRenderer(container));

0 commit comments

Comments
 (0)