From db3ebf76636519b52c39211c0980aeb78dd05c0a Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 14 Jul 2013 15:13:46 +0000 Subject: [PATCH] video edit panel: handle open event --- source/Ox.UI/js/Video/VideoEditPanel.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Video/VideoEditPanel.js b/source/Ox.UI/js/Video/VideoEditPanel.js index bbcc5f82..1ef8c90f 100644 --- a/source/Ox.UI/js/Video/VideoEditPanel.js +++ b/source/Ox.UI/js/Video/VideoEditPanel.js @@ -241,7 +241,8 @@ Ox.VideoEditPanel = function(options, self) { that.triggerEvent('move', data); }, open: function(data) { - // ... + setPosition(getClipById(data.ids[0])['position']); + that.triggerEvent('open', data); }, paste: function() { that.triggerEvent('paste'); @@ -291,6 +292,10 @@ Ox.VideoEditPanel = function(options, self) { that.triggerEvent('position', {position: self.options.position}); } + function getClipById(id) { + return Ox.getObjectById(self.options.clips, id); + } + function getPlayerHeight() { return self.options.height - 24 - self.options.showTimeline * 80 - 1;