forked from 0x2620/oxjs
implement 'view annotations at position / in selection / all'
This commit is contained in:
parent
0c6541363d
commit
39f9e9bb4d
6 changed files with 152 additions and 80 deletions
|
|
@ -26,7 +26,7 @@ Ox.List <f:Ox.Element> List Element
|
|||
selected <a|[]> ids of the selected elements
|
||||
sort <a|[]> sort order
|
||||
sortable <b|false> If true, items can be re-ordered
|
||||
type <s|text>
|
||||
type <s|'text'>
|
||||
unique <s|''> name of the key that acts as unique id
|
||||
self <o> shared private variable
|
||||
add <!> item added
|
||||
|
|
@ -442,8 +442,8 @@ Ox.List = function(options, self) {
|
|||
if (self.listLength < visibleItems) {
|
||||
Ox.range(self.listLength, visibleItems).forEach(function(i) {
|
||||
var $item = Ox.ListItem({
|
||||
construct: self.options.construct,
|
||||
});
|
||||
construct: self.options.construct,
|
||||
});
|
||||
$item.addClass('OxEmpty').removeClass('OxTarget');
|
||||
if (i == visibleItems - 1) {
|
||||
$item.$element.css({
|
||||
|
|
@ -1507,7 +1507,7 @@ Ox.List = function(options, self) {
|
|||
});
|
||||
self.options.items.splice.apply(self.options.items, Ox.merge([pos, 0], items));
|
||||
self.$items.splice.apply(self.$items, Ox.merge([pos, 0], $items));
|
||||
self.listLength += length;
|
||||
self.listLength = self.options.items.length;
|
||||
//loadItems();
|
||||
updatePositions();
|
||||
}
|
||||
|
|
@ -1657,10 +1657,10 @@ Ox.List = function(options, self) {
|
|||
self.selected[i] -= length;
|
||||
}
|
||||
});
|
||||
self.listLength -= length;
|
||||
self.listLength = self.options.items.length;
|
||||
updatePositions();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*@
|
||||
scrollToSelection <f> scroll list to current selection
|
||||
() -> <f> returns List Element
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue