Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (source && isParent(target, source)) {
return false;
}
// disallow drop entry criterion...
// ... on case plan model
if (isCasePlanModel(target)) {
return false;
}
if (isPlanFragment(target, true)) {
// ... when element has an incoming connection which source
// is a child of the target
return !some(element.incoming, function(connection) {
if (is(connection.businessObject.cmmnElementRef, 'cmmn:PlanItemOnPart')) {
return isParent(target, connection.source);
}
});
}
return true;
};
function canMove(elements, target) {
// do not move selection containing lanes
if (some(elements, isLane)) {
return false;
}
// allow default move check to start move operation
if (!target) {
return true;
}
return elements.every(function(element) {
return canDrop(element, target);
});
}
function anyType(element, types) {
return some(types, function(type) {
return is(element, type);
});
}
return some(depths, function(depth) {
return some(depth, function(descriptor) {
return element.id === descriptor.id;
});
});
});
function includesType(collection, type) {
return exists(collection) && some(collection, function(element) {
return is(element, type);
});
}
return filter(elements, function(element) {
return some(depths, function(depth) {
return some(depth, function(descriptor) {
return element.id === descriptor.id;
});
});
});
}
function isType(element, types) {
return some(types, function(type) {
return typeof element === type;
});
}
export function isAny(element, types) {
return some(types, function(t) {
return is(element, t);
});
}
function existsConnection(source, target) {
return some(source.outgoing, function(c) {
return c.target === target;
});
}