save video points between views

This commit is contained in:
rolux 2011-09-26 19:45:57 +00:00
parent 4da5a6ca84
commit dee49e3a46
2 changed files with 8 additions and 5 deletions

View file

@ -299,6 +299,9 @@ pandora.ui.item = function() {
muted: function(data) {
pandora.UI.set('muted', data.muted);
},
position: function(data) {
pandora.UI.set('videoPoints.' + pandora.user.ui.item + '.position', data.position);
},
resizeannotations: function(data) {
pandora.UI.set('annotationsSize', data.annotationsSize);
},
@ -370,7 +373,7 @@ pandora.ui.item = function() {
});
},
position: function(data) {
pandora.UI.set('videoPoints.' + pandora.user.ui.item + '|position', data.position);
pandora.UI.set('videoPoints.' + pandora.user.ui.item + '.position', data.position);
},
resize: function(data) {
Ox.print('RESIZE!!', data.size)

View file

@ -20,6 +20,10 @@ pandora.ui.videoPreview = function(data) {
})
.bindEvent({
click: function(event) {
pandora.UI.set(
'videoPoints.' + data.id,
{'in': 0, out: 0, position: event.position}
);
if (pandora.user.ui.item && ['video', 'timeline'].indexOf(pandora.user.ui.itemView) > -1) {
pandora.$ui[
pandora.user.ui.itemView == 'video' ? 'player' : 'editor'
@ -27,10 +31,6 @@ pandora.ui.videoPreview = function(data) {
position: event.position
});
} else {
pandora.UI.set(
'videoPoints.' + data.id,
{'in': 0, out: 0, position: event.position}
);
pandora.UI.set({
item: data.id,
itemView: pandora.user.ui.videoView