comparison Applications/StoneWebViewer/WebApplication/app.js @ 2001:e943a84da9ac

creation of text annotations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Nov 2022 14:56:35 +0100
parents 1fa3f484008e
children 963f28eb40cb 25d269c7b753
comparison
equal deleted inserted replaced
2000:3e9ced39cd1b 2001:e943a84da9ac
1186 }); 1186 });
1187 1187
1188 window.addEventListener('StoneAnnotationRemoved', function() { 1188 window.addEventListener('StoneAnnotationRemoved', function() {
1189 // Ignore 1189 // Ignore
1190 }); 1190 });
1191
1192 window.addEventListener('TextAnnotationRequired', function(args) {
1193 var label = prompt('Enter your annotation:', '');
1194 if (label !== null) {
1195 stone.AddTextAnnotation(args.detail.canvasId, label,
1196 args.detail.pointedX, args.detail.pointedY,
1197 args.detail.labelX, args.detail.labelY);
1198 }
1199 });
1191 } 1200 }
1192 }); 1201 });
1193 1202
1194 1203
1195 1204