fix updating clipView
This commit is contained in:
parent
e288749077
commit
71c163f9fb
2 changed files with 26 additions and 13 deletions
|
@ -71,6 +71,10 @@ Ox.ClipPanel = function(options, self) {
|
|||
sort: getListSort(),
|
||||
sortable: isSortable(),
|
||||
});
|
||||
},
|
||||
view: function() {
|
||||
updateView();
|
||||
self.$menu.checkItem(self.options.view);
|
||||
}
|
||||
})
|
||||
.bindEvent({
|
||||
|
@ -219,20 +223,8 @@ Ox.ClipPanel = function(options, self) {
|
|||
.bindEvent({
|
||||
change: function(data) {
|
||||
if (data.id == 'view') {
|
||||
var action = self.options.editable
|
||||
&& self.options.selected.length
|
||||
&& data.checked[0].id != 'annotations'
|
||||
? 'enableItem' : 'disableItem';
|
||||
self.options.view = data.checked[0].id;
|
||||
self.$menu[action]('split');
|
||||
self.$menu[
|
||||
self.options.editable
|
||||
&& self.options.selected.length > 1
|
||||
&& data.checked[0].id != 'annotations'
|
||||
? 'enableItem' : 'disableItem'
|
||||
]('join');
|
||||
self.$menu[action]('replace');
|
||||
self.$panel.replaceElement(1, self.$list = getList());
|
||||
updateView();
|
||||
that.triggerEvent('view', {view: self.options.view});
|
||||
}
|
||||
},
|
||||
|
@ -657,6 +649,22 @@ Ox.ClipPanel = function(options, self) {
|
|||
);
|
||||
}
|
||||
|
||||
function updateView() {
|
||||
var action = self.options.editable
|
||||
&& self.options.selected.length
|
||||
&& self.options.view != 'annotations'
|
||||
? 'enableItem' : 'disableItem';
|
||||
self.$menu[action]('split');
|
||||
self.$menu[
|
||||
self.options.editable
|
||||
&& self.options.selected.length > 1
|
||||
&& self.options.view != 'annotations'
|
||||
? 'enableItem' : 'disableItem'
|
||||
]('join');
|
||||
self.$menu[action]('replace');
|
||||
self.$panel.replaceElement(1, self.$list = getList());
|
||||
}
|
||||
|
||||
that.getPasteIndex = function() {
|
||||
return self.$list.getPasteIndex();
|
||||
};
|
||||
|
|
|
@ -69,6 +69,11 @@ Ox.VideoEditPanel = function(options, self) {
|
|||
self.$mainPanel.resizeElement(1, self.options.clipSize);
|
||||
resizeClips({size: self.options.clipSize});
|
||||
},
|
||||
clipView: function() {
|
||||
self.$clipPanel.options({
|
||||
view: self.options.clipView
|
||||
});
|
||||
},
|
||||
duration: function() {
|
||||
self.$timeline && self.$timeline.replaceWith(
|
||||
self.$timeline = getTimeline()
|
||||
|
|
Loading…
Reference in a new issue