update edit panel (update methods)

This commit is contained in:
rolux 2013-08-09 14:36:30 +00:00
parent c6aaacdf90
commit 6d13693e58

View file

@ -295,12 +295,8 @@ pandora.ui.editPanel = function() {
} }
}); });
that.updatePanel = function() { that.updatePanel = function() {
getEdit(function() { Ox.Request.clearCache('getEdit');
that.options({ getEdit(updateClips);
clips: edit.clips,
duration: edit.duration
});
});
}; };
pandora.$ui.mainPanel.replaceElement(1, that); pandora.$ui.mainPanel.replaceElement(1, that);
updateSmallTimelineURL(); updateSmallTimelineURL();
@ -364,6 +360,7 @@ pandora.ui.editPanel = function() {
} }
function updateClips(clips) { function updateClips(clips) {
clips = clips || edit.clips;
edit.clips = clips; edit.clips = clips;
edit.duration = 0; edit.duration = 0;
edit.clips.forEach(function(clip) { edit.clips.forEach(function(clip) {
@ -372,6 +369,7 @@ pandora.ui.editPanel = function() {
}); });
that.options({ that.options({
clips: Ox.clone(clips), clips: Ox.clone(clips),
duration: edit.duration,
smallTimelineURL: getSmallTimelineURL(), smallTimelineURL: getSmallTimelineURL(),
video: getVideos() video: getVideos()
}); });
@ -405,6 +403,7 @@ pandora.ui.editPanel = function() {
edit.duration += clip.duration; edit.duration += clip.duration;
}); });
that.options({ that.options({
duration: edit.duration,
smallTimelineURL: getSmallTimelineURL(), smallTimelineURL: getSmallTimelineURL(),
video: getVideos() video: getVideos()
}); });