disable add annotation menu items if layer is not editable
This commit is contained in:
parent
9b8d45ba74
commit
21c94c00a9
2 changed files with 8 additions and 3 deletions
|
|
@ -247,7 +247,12 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.$editMenuButton = Ox.MenuButton({
|
||||
items: [].concat(
|
||||
self.options.layers.map(function(layer, i) {
|
||||
return {id: 'add' + layer.id, title: Ox._('Add {0}', [layer.item]), keyboard: i < 9 ? i + 1 + '' : null}
|
||||
return {
|
||||
id: 'add' + layer.id,
|
||||
disabled: !layer.editable,
|
||||
title: Ox._('Add {0}', [layer.item]),
|
||||
keyboard: i < 9 ? i + 1 + '' : null
|
||||
}
|
||||
}),
|
||||
[
|
||||
{},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue