fix bugs in video edit panel, clone some options

This commit is contained in:
rolux 2014-02-07 08:41:47 +00:00
parent 45155f1f71
commit 658b642887
2 changed files with 7 additions and 6 deletions

View file

@ -35,7 +35,7 @@ Ox.ClipPanel = function(options, self) {
.update({
clips: function() {
self.$list.options({
items: self.options.clips,
items: Ox.clone(self.options.clips),
sort: getListSort(),
sortable: isSortable()
});
@ -349,7 +349,7 @@ Ox.ClipPanel = function(options, self) {
columnsRemovable: true,
columnsResizable: true,
columnsVisible: true,
items: self.options.clips,
items: Ox.clone(self.options.clips),
keys: ['director'],
scrollbarVisible: true,
selected: self.options.selected,

View file

@ -57,7 +57,7 @@ Ox.VideoEditPanel = function(options, self) {
clips: function() {
self.$clipPanel.options({
clips: Ox.clone(self.options.clips),
sort: self.options.sort
sort: Ox.clone(self.options.sort)
});
},
duration: function() {
@ -134,6 +134,7 @@ Ox.VideoEditPanel = function(options, self) {
movePositionTo('cut', -1);
},
key_control_c: function() {
// FIXME: this looks wrong, should copy getSelectedClips
that.triggerEvent('copy', [{
annotation: self.options.selected,
'in': self.options['in'],
@ -322,7 +323,7 @@ Ox.VideoEditPanel = function(options, self) {
showAnnotationsMap: self.options.showAnnotationsMap,
showLayers: self.options.showLayers,
showUsers: self.options.showUsers,
sort: self.options.sort,
sort: Ox.clone(self.options.sort),
sortOptions: self.options.sortOptions,
view: self.options.clipView,
width: self.options.clipSize
@ -362,7 +363,7 @@ Ox.VideoEditPanel = function(options, self) {
resize: resizeClips,
resizeend: resizeendClips,
select: function(data) {
self.options.selected = data;
self.options.selected = data.ids;
that.triggerEvent('select', data);
},
sort: function(data) {
@ -626,7 +627,7 @@ Ox.VideoEditPanel = function(options, self) {
});
}
that.getClipSelection = function() {
that.getSelectedClips = function() {
return self.options.selected.length ? self.options.selected.map(function(id) {
var clip = getClipById(id);
return clip.annotation || clip.item + '/' + clip['in'] + '-' + clip.out;