update user.ui keys in edit panel

This commit is contained in:
rolux 2013-08-07 14:32:17 +00:00
parent 36c32a5333
commit 4e0a702cd5

View file

@ -16,8 +16,8 @@ pandora.ui.editPanel = function() {
ui.edit ? renderEdit() : renderEdits(); ui.edit ? renderEdit() : renderEdits();
function editPointsKey(key) { function editsKey(key) {
return 'editPoints.' + ui.edit.replace(/\./g, '\\.') + '.' + key; return 'edits.' + ui.edit.replace(/\./g, '\\.') + '.' + key;
} }
function enableDragAndDrop() { function enableDragAndDrop() {
@ -62,7 +62,7 @@ pandora.ui.editPanel = function() {
clipSize: listSize, clipSize: listSize,
clipSort: ui.clipSort, clipSort: ui.clipSort,
clipSortOptions: [/*...*/], clipSortOptions: [/*...*/],
clipView: ui.clipView, clipView: ui.editView,
duration: edit.duration, duration: edit.duration,
editable: edit.editable, editable: edit.editable,
enableSubtitles: ui.videoSubtitles, enableSubtitles: ui.videoSubtitles,
@ -75,11 +75,11 @@ pandora.ui.editPanel = function() {
pandora.getLargeEditTimelineURL(edit, type, i, callback); pandora.getLargeEditTimelineURL(edit, type, i, callback);
}, },
height: pandora.$ui.appPanel.size(1), height: pandora.$ui.appPanel.size(1),
'in': ui.editPoints[ui.edit]['in'], 'in': ui.edits[ui.edit]['in'],
loop: ui.videoLoop, loop: ui.videoLoop,
muted: ui.videoMuted, muted: ui.videoMuted,
out: ui.editPoints[ui.edit].out, out: ui.edits[ui.edit].out,
position: ui.editPoints[ui.edit].position, position: ui.edits[ui.edit].position,
resolution: ui.videoResolution, resolution: ui.videoResolution,
scaleToFill: ui.videoScale == 'fill', scaleToFill: ui.videoScale == 'fill',
// selected: ... // selected: ...
@ -195,7 +195,7 @@ pandora.ui.editPanel = function() {
pandora.UI.set({videoMuted: data.muted}); pandora.UI.set({videoMuted: data.muted});
}, },
open: function(data) { open: function(data) {
pandora.UI.set(editPointsKey('clip'), data.ids[0]); pandora.UI.set(editsKey('clip'), data.ids[0]);
}, },
paste: function() { paste: function() {
var clips; var clips;
@ -221,14 +221,14 @@ pandora.ui.editPanel = function() {
}, },
playing: function(data) { playing: function(data) {
var set = {}; var set = {};
set[editPointsKey('clip')] = ''; set[editsKey('clip')] = '';
set[editPointsKey('position')] = data.position; set[editsKey('position')] = data.position;
pandora.UI.set(set); pandora.UI.set(set);
}, },
position: function(data) { position: function(data) {
var set = {}; var set = {};
set[editPointsKey('clip')] = ''; set[editsKey('clip')] = '';
set[editPointsKey('position')] = data.position; set[editsKey('position')] = data.position;
pandora.UI.set(set); pandora.UI.set(set);
}, },
resize: function(data) { resize: function(data) {
@ -288,7 +288,7 @@ pandora.ui.editPanel = function() {
pandora.UI.set({showTimeline: data.showTimeline}); pandora.UI.set({showTimeline: data.showTimeline});
}, },
view: function(data) { view: function(data) {
pandora.UI.set({clipView: data.view}); pandora.UI.set({editView: data.view});
data.view == 'grid' && enableDragAndDrop(); data.view == 'grid' && enableDragAndDrop();
}, },
volume: function(data) { volume: function(data) {
@ -305,7 +305,7 @@ pandora.ui.editPanel = function() {
} }
}) })
); );
ui.clipView == 'grid' && enableDragAndDrop(); ui.editView == 'grid' && enableDragAndDrop();
}); });
} }