add annotation panel

This commit is contained in:
j 2019-01-23 20:44:59 +05:30
commit 4f3d5f5ee1
9 changed files with 201 additions and 36 deletions

16
static/js/annotation.js Normal file
View file

@ -0,0 +1,16 @@
'use strict';
oml.ui.annotation = function(data, $iframe) {
var that = Ox.Element().attr({
id: 'a-' + data.id
}).css({
padding: '16px'
}).html(data.text).on({
click: function(event) {
$iframe.postMessage('selectAnnotation', {
id: data.id
})
}
});
return that;
};