22 lines
496 B
JavaScript
22 lines
496 B
JavaScript
'use strict';
|
|
|
|
oml.ui.annotation = function(data, $iframe) {
|
|
var that = Ox.Element().attr({
|
|
id: 'a-' + data.id
|
|
}).css({
|
|
backgroundColor: 'white',
|
|
color: 'black',
|
|
fontFamily: 'serif',
|
|
fontSize: '16px',
|
|
lineHeight: '22px',
|
|
padding: '8px'
|
|
}).html(data.text).on({
|
|
click: function(event) {
|
|
$iframe.postMessage('selectAnnotation', {
|
|
id: data.id
|
|
})
|
|
}
|
|
});
|
|
return that;
|
|
};
|