forked from 0x2620/oxjs
move layer selection into annotation options menu
This commit is contained in:
parent
8b14537dce
commit
066de44cd2
2 changed files with 26 additions and 22 deletions
|
|
@ -492,6 +492,23 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
};
|
||||
})}
|
||||
] : [],
|
||||
[
|
||||
{},
|
||||
{id: 'results', title: Ox._('Find Annotations'), disabled: true},
|
||||
{group: 'results', max: 1, items: [
|
||||
{
|
||||
id: 'result_*',
|
||||
title: Ox._('All'),
|
||||
checked: self.options.highlightLayer == '*'
|
||||
}
|
||||
].concat(self.options.layers.map(function(result) {
|
||||
return {
|
||||
id: 'result_' + result.id,
|
||||
title: result.title,
|
||||
checked: result.id == self.options.highlightLayer
|
||||
};
|
||||
}))}
|
||||
],
|
||||
self.options.showUsers && self.users.length ? [
|
||||
{},
|
||||
{id: 'users', title: Ox._('Show Users'), disabled: true},
|
||||
|
|
@ -532,6 +549,10 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.$folder.forEach(function($folder) {
|
||||
$folder.options({users: self.enabledUsers});
|
||||
});
|
||||
} else if (data.id == 'results') {
|
||||
var layer = data.checked[0].id.split('_').pop()
|
||||
that.options('highlightLayer', layer);
|
||||
that.triggerEvent('highlightlayer', self.options.highlightLayer);
|
||||
} else {
|
||||
self.options[data.id] = data.checked[0].id;
|
||||
set[data.id] = self.options[data.id];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue