forked from 0x2620/oxjs
swap the meaning of makeArray and toArray: makeArray, like makeObject, is a helper function for arguments processing (that wraps any non-array in an array), toArray, like in other libraries, is an alias for Array.prototype.slice.call
This commit is contained in:
parent
5cabb679f9
commit
5692195509
21 changed files with 88 additions and 88 deletions
|
|
@ -297,7 +297,7 @@ Ox.List = function(options, self) {
|
|||
|
||||
function addToSelection(pos) {
|
||||
var triggerEvent = false;
|
||||
Ox.toArray(pos).forEach(function(pos) {
|
||||
Ox.makeArray(pos).forEach(function(pos) {
|
||||
if (!isSelected(pos)) {
|
||||
self.selected.push(pos);
|
||||
!Ox.isUndefined(self.$items[pos])
|
||||
|
|
@ -364,7 +364,7 @@ Ox.List = function(options, self) {
|
|||
|
||||
function deselect(pos) {
|
||||
var triggerEvent = false;
|
||||
Ox.toArray(pos).forEach(function(pos) {
|
||||
Ox.makeArray(pos).forEach(function(pos) {
|
||||
if (isSelected(pos)) {
|
||||
self.selected.splice(self.selected.indexOf(pos), 1);
|
||||
!Ox.isUndefined(self.$items[pos])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue