pass showLayers from panels to folder

This commit is contained in:
j 2015-03-23 17:26:41 +05:30
parent 69cd6ceed8
commit f302db9490
4 changed files with 23 additions and 0 deletions

View file

@ -83,6 +83,12 @@ Ox.AnnotationPanel = function(options, self) {
$folder.options({selected: ''});
});
}
} else if (key == 'showLayers') {
self.options.layers.forEach(function(layer, index) {
self.$folder[index].options({
collapsed: !self.options.showLayers[layer.id]
});
});
} else if (key == 'width') {
self.$folder.forEach(function($folder) {
$folder.options({width: self.options.width - Ox.UI.SCROLLBAR_SIZE});

View file

@ -58,6 +58,13 @@ Ox.ClipPanel = function(options, self) {
}
},
selected: selectClips,
showLayers: function() {
if (self.options.view == 'annotations') {
self.$list.options({
showLayers: Ox.clone(self.options.showLayers)
});
}
},
sort: function() {
updateSortElement();
self.$list.options({

View file

@ -131,6 +131,11 @@ Ox.VideoAnnotationPanel = function(options, self) {
showAnnotations: function() {
self.$mainPanel.toggleElement(1);
},
showLayers: function() {
self.$annotationPanel.options({
showLayers: Ox.clone(self.options.showLayers)
});
},
timeline: function() {
self.$menuButton.checkItem('timelines_' + self.options.timeline);
updateTimelines();

View file

@ -95,6 +95,11 @@ Ox.VideoEditPanel = function(options, self) {
showClips: function() {
self.$mainPanel.toggle(1);
},
showLayers: function() {
self.$clipPanel.options({
showLayers: self.options.showLayers
});
},
showTimeline: function() {
self.$videoPanel.toggle(2);
},