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
|
2019-01-24 05:39:09 +00:00
|
|
|
}).addClass(
|
|
|
|
'OxSelectable'
|
|
|
|
).css({
|
2019-01-24 05:24:40 +00:00
|
|
|
backgroundColor: 'white',
|
2019-01-24 05:39:09 +00:00
|
|
|
borderBottom: '1px solid rgb(208, 208, 208)',
|
2019-01-24 05:24:40 +00:00
|
|
|
color: 'black',
|
2019-01-24 05:41:44 +00:00
|
|
|
fontFamily: 'Georgia, Palatino, DejaVu Serif, Book Antiqua, Palatino Linotype, Times New Roman, serif',
|
|
|
|
fontSize: '14px',
|
|
|
|
lineHeight: '21px',
|
2019-01-24 05:24:40 +00:00
|
|
|
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;
|
|
|
|
};
|