add some annotation capability

This commit is contained in:
rlx 2019-01-24 14:50:25 +05:30
commit e89dc03685
2 changed files with 18 additions and 8 deletions

View file

@ -1,6 +1,12 @@
'use strict';
oml.ui.annotation = function(data, $iframe) {
var $arrayEditable = Ox.ArrayEditable({
editing: true,
type: 'textarea'
}).css({
minHeight: '16px'
});
var that = Ox.Element().attr({
id: 'a-' + data.id
}).addClass(
@ -22,12 +28,14 @@ oml.ui.annotation = function(data, $iframe) {
})
}
})
).append(
Ox.ArrayEditable({
type: 'textarea'
}).css({
height: 0
})
);
).append($arrayEditable);
that.annotate = function() {
var item = {
id: 'note', value: '', editable: true
}
$arrayEditable.addItem(0, item)
.options({selected: item.id})
.editItem();
}
return that;
};