fix getType test, fix typo
This commit is contained in:
parent
ba5f39bac5
commit
ea52a2c46f
1 changed files with 3 additions and 2 deletions
|
@ -352,7 +352,7 @@ pandora.createLinks = function($element) {
|
||||||
if (object.action == 'copy' || object.action == 'paste') {
|
if (object.action == 'copy' || object.action == 'paste') {
|
||||||
removeItems(object.items, object.targets[0], done);
|
removeItems(object.items, object.targets[0], done);
|
||||||
} else if (object.action == 'cut' || object.action == 'delete') {
|
} else if (object.action == 'cut' || object.action == 'delete') {
|
||||||
addItems(object.removedItems, object.targets[0], done);
|
addItems(object.items, object.targets[0], done);
|
||||||
} else if (object.action == 'move') {
|
} else if (object.action == 'move') {
|
||||||
removeItems(object.items[1], object.targets[1], function() {
|
removeItems(object.items[1], object.targets[1], function() {
|
||||||
addItems(object.items[0], object.targets[0], done);
|
addItems(object.items[0], object.targets[0], done);
|
||||||
|
@ -423,7 +423,8 @@ pandora.createLinks = function($element) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getType(items) {
|
function getType(items) {
|
||||||
return items[0] && Ox.contains(items[0], '/') ? 'clip' : 'item';
|
var item = Ox.isArray(items[0]) ? items[0][0] : items[0];
|
||||||
|
return Ox.contains(item, '/') ? 'clip' : 'item';
|
||||||
};
|
};
|
||||||
|
|
||||||
function removeItems(items, target, callback) {
|
function removeItems(items, target, callback) {
|
||||||
|
|
Loading…
Reference in a new issue