openmedialibrary/static/js/annotation.js

22 lines
496 B
JavaScript
Raw Normal View History

2019-01-23 15:14:59 +00:00
'use strict';
oml.ui.annotation = function(data, $iframe) {
var that = Ox.Element().attr({
id: 'a-' + data.id
}).css({
2019-01-24 05:24:40 +00:00
backgroundColor: 'white',
color: 'black',
fontFamily: 'serif',
fontSize: '16px',
lineHeight: '22px',
padding: '8px'
2019-01-23 15:14:59 +00:00
}).html(data.text).on({
click: function(event) {
$iframe.postMessage('selectAnnotation', {
id: data.id
})
}
});
return that;
};