forked from 0x2620/oxjs
- find in layers
- change upadteAnnotation call to allow id updates
This commit is contained in:
parent
e8b1362309
commit
fd96423266
6 changed files with 81 additions and 38 deletions
|
|
@ -11,6 +11,7 @@ Ox.ArrayEditable = function(options, self) {
|
|||
.defaults({
|
||||
clickLink: null,
|
||||
editable: true,
|
||||
highlight: null,
|
||||
itemName: 'item',
|
||||
items: [],
|
||||
maxHeight: void 0,
|
||||
|
|
@ -269,7 +270,11 @@ Ox.ArrayEditable = function(options, self) {
|
|||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'items') {
|
||||
if (key == 'highlight') {
|
||||
self.$items.forEach(function($item) {
|
||||
$item.options({highlight: value})
|
||||
});
|
||||
} else if (key == 'items') {
|
||||
if (self.options.selected && getSelectedPosition() == -1) {
|
||||
selectNone();
|
||||
}
|
||||
|
|
@ -318,7 +323,7 @@ Ox.ArrayEditable = function(options, self) {
|
|||
};
|
||||
|
||||
that.editItem = function() {
|
||||
Ox.print('AE EDIT ITEM')
|
||||
Ox.Log('AE', 'EDIT ITEM', self.options.editable, self.options.selected);
|
||||
if (self.options.editable && self.options.selected) {
|
||||
self.editing = true;
|
||||
self.$items[self.selected].options({editing: true});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue