fix bugs in video edit panel, clone some options
This commit is contained in:
parent
45155f1f71
commit
658b642887
2 changed files with 7 additions and 6 deletions
|
@ -35,7 +35,7 @@ Ox.ClipPanel = function(options, self) {
|
||||||
.update({
|
.update({
|
||||||
clips: function() {
|
clips: function() {
|
||||||
self.$list.options({
|
self.$list.options({
|
||||||
items: self.options.clips,
|
items: Ox.clone(self.options.clips),
|
||||||
sort: getListSort(),
|
sort: getListSort(),
|
||||||
sortable: isSortable()
|
sortable: isSortable()
|
||||||
});
|
});
|
||||||
|
@ -349,7 +349,7 @@ Ox.ClipPanel = function(options, self) {
|
||||||
columnsRemovable: true,
|
columnsRemovable: true,
|
||||||
columnsResizable: true,
|
columnsResizable: true,
|
||||||
columnsVisible: true,
|
columnsVisible: true,
|
||||||
items: self.options.clips,
|
items: Ox.clone(self.options.clips),
|
||||||
keys: ['director'],
|
keys: ['director'],
|
||||||
scrollbarVisible: true,
|
scrollbarVisible: true,
|
||||||
selected: self.options.selected,
|
selected: self.options.selected,
|
||||||
|
|
|
@ -57,7 +57,7 @@ Ox.VideoEditPanel = function(options, self) {
|
||||||
clips: function() {
|
clips: function() {
|
||||||
self.$clipPanel.options({
|
self.$clipPanel.options({
|
||||||
clips: Ox.clone(self.options.clips),
|
clips: Ox.clone(self.options.clips),
|
||||||
sort: self.options.sort
|
sort: Ox.clone(self.options.sort)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
duration: function() {
|
duration: function() {
|
||||||
|
@ -134,6 +134,7 @@ Ox.VideoEditPanel = function(options, self) {
|
||||||
movePositionTo('cut', -1);
|
movePositionTo('cut', -1);
|
||||||
},
|
},
|
||||||
key_control_c: function() {
|
key_control_c: function() {
|
||||||
|
// FIXME: this looks wrong, should copy getSelectedClips
|
||||||
that.triggerEvent('copy', [{
|
that.triggerEvent('copy', [{
|
||||||
annotation: self.options.selected,
|
annotation: self.options.selected,
|
||||||
'in': self.options['in'],
|
'in': self.options['in'],
|
||||||
|
@ -322,7 +323,7 @@ Ox.VideoEditPanel = function(options, self) {
|
||||||
showAnnotationsMap: self.options.showAnnotationsMap,
|
showAnnotationsMap: self.options.showAnnotationsMap,
|
||||||
showLayers: self.options.showLayers,
|
showLayers: self.options.showLayers,
|
||||||
showUsers: self.options.showUsers,
|
showUsers: self.options.showUsers,
|
||||||
sort: self.options.sort,
|
sort: Ox.clone(self.options.sort),
|
||||||
sortOptions: self.options.sortOptions,
|
sortOptions: self.options.sortOptions,
|
||||||
view: self.options.clipView,
|
view: self.options.clipView,
|
||||||
width: self.options.clipSize
|
width: self.options.clipSize
|
||||||
|
@ -362,7 +363,7 @@ Ox.VideoEditPanel = function(options, self) {
|
||||||
resize: resizeClips,
|
resize: resizeClips,
|
||||||
resizeend: resizeendClips,
|
resizeend: resizeendClips,
|
||||||
select: function(data) {
|
select: function(data) {
|
||||||
self.options.selected = data;
|
self.options.selected = data.ids;
|
||||||
that.triggerEvent('select', data);
|
that.triggerEvent('select', data);
|
||||||
},
|
},
|
||||||
sort: function(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) {
|
return self.options.selected.length ? self.options.selected.map(function(id) {
|
||||||
var clip = getClipById(id);
|
var clip = getClipById(id);
|
||||||
return clip.annotation || clip.item + '/' + clip['in'] + '-' + clip.out;
|
return clip.annotation || clip.item + '/' + clip['in'] + '-' + clip.out;
|
||||||
|
|
Loading…
Reference in a new issue