1
0
Fork 0
forked from 0x2620/oxjs

some css for text annotations

This commit is contained in:
rlx 2011-02-03 22:58:31 +00:00
commit 2c9d6c7e91
3 changed files with 39 additions and 1 deletions

View file

@ -10427,6 +10427,7 @@ requires
that = new Ox.Element('div', self)
.defaults({
id: '',
items: [],
title: '',
type: 'text'
})
@ -10434,12 +10435,31 @@ requires
that.$element = new Ox.CollapsePanel({
collapsed: false,
extras: [
new Ox.Button({
id: 'add',
style: 'symbol',
title: 'Add',
type: 'image'
})
],
size: 16,
title: self.options.title
})
.addClass('OxAnnotationPanel')
.bindEvent({
toggle: togglePanel
});
that.$content = that.$element.$content;
self.$annotations = new Ox.Element('div')
.appendTo(that.$content);
self.options.items.forEach(function(item, i) {
new Ox.Element('div')
.addClass('OxAnnotation')
.html(item.value)
.appendTo(self.$annotations);
});
function togglePanel() {
@ -11434,6 +11454,9 @@ requires
.appendTo(self.$video);
self.$annotations = new Ox.Element()
.css({
overflowY: 'auto'
})
.bindEvent({
resize: resizeAnnotations,
toggle: toggleAnnotations
@ -11441,7 +11464,9 @@ requires
self.$annotationPanel = [];
self.options.layers.forEach(function(layer, i) {
self.$annotationPanel[i] = new Ox.AnnotationPanel(layer)
self.$annotationPanel[i] = new Ox.AnnotationPanel(
$.extend({}, layer, layer.id == 'subtitles' ? {items: self.options.subtitles} : {})
)
.appendTo(self.$annotations);
});