Video Edit Panel: handle width/height update

This commit is contained in:
rlx 2013-07-14 10:23:43 +00:00
parent 667d22efa4
commit 1c969a7c2f

View file

@ -252,10 +252,12 @@ Ox.VideoEditPanel = function(options, self) {
that.triggerEvent('select', data); that.triggerEvent('select', data);
}, },
sort: function(data) { sort: function(data) {
self.options.clipSort = data.sort;
that.triggerEvent('sort', data); that.triggerEvent('sort', data);
}, },
toggle: toggleClips toggle: toggleClips,
view: function(data) {
that.triggerEvent('view', data);
}
}); });
that.setElement( that.setElement(
@ -286,13 +288,13 @@ Ox.VideoEditPanel = function(options, self) {
} }
function getPlayerHeight() { function getPlayerHeight() {
return self.options.height - 24 - return self.options.height - 24
self.options.showTimeline * 80 - 1; - self.options.showTimeline * 80 - 1;
} }
function getPlayerWidth() { function getPlayerWidth() {
return self.options.width - return self.options.width
(self.options.showClips && !self.fullscreen) - (self.options.showClips && !self.fullscreen)
* self.options.clipSize - 1; * self.options.clipSize - 1;
} }
@ -315,8 +317,8 @@ Ox.VideoEditPanel = function(options, self) {
} }
function getTimelineWidth() { function getTimelineWidth() {
return self.options.width - return self.options.width
(self.options.showClips && !self.fullscreen) - (self.options.showClips && !self.fullscreen)
* self.options.clipSize - 16 - 1; * self.options.clipSize - 16 - 1;
} }
@ -334,7 +336,7 @@ Ox.VideoEditPanel = function(options, self) {
} }
function resizeendClips(data) { function resizeendClips(data) {
that.triggerEvent('clipsize', data.size); that.triggerEvent('size', data.size);
} }
function selectClip(data) { function selectClip(data) {
@ -378,7 +380,7 @@ Ox.VideoEditPanel = function(options, self) {
width: getTimelineWidth() width: getTimelineWidth()
}); });
that.triggerEvent('toggleclips', { that.triggerEvent('toggleclips', {
showClips: self.options.showAnnotations showClips: self.options.showClips
}); });
} }