forked from 0x2620/oxjs
update video editor (maps, calendars)
This commit is contained in:
parent
1445824ffd
commit
dc47e901ad
9 changed files with 196 additions and 69 deletions
|
|
@ -164,28 +164,64 @@ Ox.VideoPanel = function(options, self) {
|
|||
}
|
||||
],
|
||||
orientation: 'vertical'
|
||||
})
|
||||
.bindEvent({
|
||||
resize: resizePanel
|
||||
});
|
||||
|
||||
self.$annotationPanel = Ox.AnnotationPanel({
|
||||
calendarSize: self.options.annotationsCalendarSize,
|
||||
editable: false,
|
||||
font: self.options.annotationsFont,
|
||||
'in': self.options['in'],
|
||||
layers: self.options.layers,
|
||||
mapSize: self.options.annotationsMapSize,
|
||||
out: self.options.out,
|
||||
position: self.options.position,
|
||||
range: self.options.annotationsRange,
|
||||
selected: self.options.selected,
|
||||
showCalendar: self.options.showAnnotationsCalendar,
|
||||
showFonts: true,
|
||||
showLayers: self.options.showLayers,
|
||||
showMap: self.options.showAnnotationsMap,
|
||||
showUsers: self.options.showUsers,
|
||||
sort: self.options.annotationsSort
|
||||
sort: self.options.annotationsSort,
|
||||
width: self.options.annotationsSize
|
||||
})
|
||||
.bindEvent({
|
||||
annotationsfont: function(data) {
|
||||
self.options.annotationsFont = data.font;
|
||||
that.triggerEvent('annotationsfont', data);
|
||||
},
|
||||
annotationsrange: function(data) {
|
||||
self.options.annotationsRange = data.range;
|
||||
that.triggerEvent('annotationsrange', data);
|
||||
},
|
||||
annotationssort: function(data) {
|
||||
self.options.annotationsSort = data.sort;
|
||||
that.triggerEvent('annotationssort', data);
|
||||
},
|
||||
resize: resizeAnnotations,
|
||||
resizeend: resizeendAnnotations,
|
||||
resizecalendar: function(data) {
|
||||
that.triggerEvent('resizecalendar', data);
|
||||
},
|
||||
resizemap: function(data) {
|
||||
that.triggerEvent('resizemap', data);
|
||||
},
|
||||
select: selectAnnotation,
|
||||
toggle: toggleAnnotations
|
||||
toggle: toggleAnnotations,
|
||||
togglecalendar: function(data) {
|
||||
self.options.showAnnotationsCalendar = !data.collapsed;
|
||||
that.triggerEvent('togglecalendar', data);
|
||||
},
|
||||
togglelayer: function(data) {
|
||||
that.triggerEvent('togglelayer', {
|
||||
collapsed: data.collapsed,
|
||||
layer: data.layer
|
||||
});
|
||||
},
|
||||
togglemap: function(data) {
|
||||
self.options.showAnnotationsMap = !data.collapsed;
|
||||
that.triggerEvent('togglemap', data);
|
||||
}
|
||||
});
|
||||
|
||||
that.$element = Ox.SplitPanel({
|
||||
|
|
@ -239,13 +275,11 @@ Ox.VideoPanel = function(options, self) {
|
|||
self.$timeline.options({
|
||||
width: getTimelineWidth()
|
||||
});
|
||||
self.$annotationPanel.options({width: data.size});
|
||||
}
|
||||
|
||||
function resizeendAnnotations(data) {
|
||||
self.options.annotationsSize = data.size;
|
||||
that.triggerEvent('resizeannotations', {
|
||||
annotationsSize: self.options.annotationsSize
|
||||
});
|
||||
that.triggerEvent('annotationssize', data.size);
|
||||
}
|
||||
|
||||
function resizeElement(data) {
|
||||
|
|
@ -256,8 +290,10 @@ Ox.VideoPanel = function(options, self) {
|
|||
});
|
||||
}
|
||||
|
||||
/*
|
||||
function resizePanel(data) {
|
||||
// called on annotations toggle
|
||||
// called on annotations toggle <-- FIXME: NOT TRUE
|
||||
Ox.print('RESIZEPANEL----------')
|
||||
self.$video.options({
|
||||
width: getPlayerWidth()
|
||||
});
|
||||
|
|
@ -265,6 +301,7 @@ Ox.VideoPanel = function(options, self) {
|
|||
width: getTimelineWidth()
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
function selectAnnotation(data) {
|
||||
self.options.selected = data.id;
|
||||
|
|
@ -292,7 +329,10 @@ Ox.VideoPanel = function(options, self) {
|
|||
function toggleAnnotations(data) {
|
||||
self.options.showAnnotations = !data.collapsed;
|
||||
self.$video.options({
|
||||
height: getPlayerHeight()
|
||||
width: getPlayerWidth()
|
||||
});
|
||||
self.$timeline.options({
|
||||
width: getTimelineWidth()
|
||||
});
|
||||
that.triggerEvent('toggleannotations', {
|
||||
showAnnotations: self.options.showAnnotations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue