-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search no longer re-runs when advanced dialog opens
- Loading branch information
Showing
4 changed files
with
104 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Annotorious | Geotagging Widget</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious.min.js"></script> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<img id="image" src="Epitome_theatri_Ortelianii.jpg"> | ||
</div> | ||
</div> | ||
<script> | ||
window.onload = function() { | ||
// Geotagging widget config | ||
const config = { | ||
tileUrl: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', | ||
defaultOrigin: [ 48, 16 ], | ||
// defaultZoom: 12 | ||
search: 'osm' | ||
} | ||
|
||
anno = Annotorious.init({ | ||
image: 'image', | ||
widgets: [ | ||
{ widget: recogito.GeoTagging(config) }, | ||
{ widget: 'COMMENT' }, | ||
{ widget: 'TAG', vocabulary: [ 'Animal', 'Building', 'Waterbody'] } | ||
] | ||
}); | ||
|
||
anno.on('createAnnotation', function (annotation) { | ||
console.log('created', annotation); | ||
}); | ||
|
||
anno.on('updateAnnotation', function(annotation, previous) { | ||
console.log('updated', previous, 'with', annotation); | ||
}); | ||
|
||
anno.on('deleteAnnotation', function(annotation) { | ||
console.log('deleted', annotation); | ||
}); | ||
|
||
anno.loadAnnotations('annotations.w3c.json'); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,49 +2,76 @@ | |
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Annotorious | Geotagging Widget</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/annotorious.min.js"></script> | ||
<title>RecogitoJS | Development</title> | ||
<link href="https://fonts.googleapis.com/css?family=Lato&display=swap" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/recogito.min.css" rel="stylesheet"> | ||
<script src="https://cdn.jsdelivr.net/npm/@recogito/[email protected]/dist/recogito.min.js"></script> | ||
<style> | ||
html, body { | ||
padding:10px 20px; | ||
margin:0; | ||
} | ||
|
||
h1 { | ||
font-size:22px; | ||
margin-top:30px; | ||
margin-bottom:20px; | ||
} | ||
|
||
#content { | ||
max-width:920px; | ||
font-family:'Lato', sans-serif; | ||
font-size:17px; | ||
line-height:27px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<img id="image" src="Epitome_theatri_Ortelianii.jpg"> | ||
<div id="content" class="plaintext"> | ||
<h1>Homer: The Odyssey</h1> | ||
<p> | ||
<strong>Tell me, O muse,</strong> of that ingenious hero who travelled far and wide after he had sacked | ||
the famous town of Troy. Many cities did he visit, and many were the nations with whose manners and customs | ||
he was acquainted; moreover he suffered much by sea while trying to save his own life and bring his men safely | ||
home; but do what he might he could not save his men, for they perished through their own sheer folly in eating | ||
the cattle of the Sun-god Hyperion; so the god prevented them from ever reaching home. Tell me, too, about all | ||
these things, O daughter of Jove, from whatsoever source you may know them. | ||
</p> | ||
<p> | ||
<strong>So now all who escaped death in battle</strong> or by shipwreck had got safely home except Ulysses, | ||
and he, though he was longing to return to his wife and country, was detained by the goddess Calypso, who | ||
had got him into a large cave and wanted to marry him. But as years went by, there came a time when the gods | ||
settled that he should go back to Ithaca; even then, however, when he was among his own people, his troubles | ||
were not yet over; nevertheless all the gods had now begun to pity him except Neptune, who still persecuted | ||
him without ceasing and would not let him get home. | ||
</p> | ||
</div> | ||
</div> | ||
<script> | ||
|
||
<script type="text/javascript"> | ||
window.onload = function() { | ||
// Geotagging widget config | ||
const config = { | ||
tileUrl: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', | ||
defaultOrigin: [ 48, 16 ], | ||
// defaultZoom: 12 | ||
search: 'osm' | ||
} | ||
}; | ||
|
||
anno = Annotorious.init({ | ||
image: 'image', | ||
widgets: [ | ||
var r = Recogito.init({ | ||
content: 'content', | ||
allowEmpty: true, | ||
widgets: [ | ||
{ widget: recogito.GeoTagging(config) }, | ||
{ widget: 'COMMENT' }, | ||
{ widget: 'TAG', vocabulary: [ 'Animal', 'Building', 'Waterbody'] } | ||
] | ||
}); | ||
|
||
anno.on('createAnnotation', function (annotation) { | ||
console.log('created', annotation); | ||
r.on('createAnnotation', function(a) { | ||
console.log('created', a); | ||
}); | ||
|
||
anno.on('updateAnnotation', function(annotation, previous) { | ||
r.on('updateAnnotation', function(annotation, previous) { | ||
console.log('updated', previous, 'with', annotation); | ||
}); | ||
|
||
anno.on('deleteAnnotation', function(annotation) { | ||
console.log('deleted', annotation); | ||
}); | ||
|
||
anno.loadAnnotations('annotations.w3c.json'); | ||
} | ||
}; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters