How to use the min-dash.some function in min-dash

To help you get started, we’ve selected a few min-dash examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bpmn-io / cmmn-js / lib / features / rules / CmmnRules.js View on Github external
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;
};
github bpmn-io / bpmn-js / lib / features / rules / BpmnRules.js View on Github external
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);
  });
}
github bpmn-io / bpmn-js / test / spec / util / camunda-moddle.js View on Github external
function anyType(element, types) {
  return some(types, function(type) {
    return is(element, type);
  });
}
github bpmn-io / diagram-js / test / spec / features / copy-paste / CopyPasteSpec.js View on Github external
return some(depths, function(depth) {

      return some(depth, function(descriptor) {
        return element.id === descriptor.id;
      });
    });
  });
github bpmn-io / bpmn-js / test / spec / util / camunda-moddle.js View on Github external
function includesType(collection, type) {
  return exists(collection) && some(collection, function(element) {
    return is(element, type);
  });
}
github bpmn-io / diagram-js / test / spec / features / copy-paste / CopyPasteSpec.js View on Github external
return filter(elements, function(element) {

    return some(depths, function(depth) {

      return some(depth, function(descriptor) {
        return element.id === descriptor.id;
      });
    });
  });
}
github bpmn-io / bpmn-js / lib / util / model / ModelCloneHelper.js View on Github external
function isType(element, types) {
  return some(types, function(type) {
    return typeof element === type;
  });
}
github bpmn-io / dmn-js / packages / dmn-js-shared / lib / util / ModelUtil.js View on Github external
export function isAny(element, types) {
  return some(types, function(t) {
    return is(element, t);
  });
}
github bpmn-io / diagram-js / lib / features / modeling / cmd / AppendShapeHandler.js View on Github external
function existsConnection(source, target) {
  return some(source.outgoing, function(c) {
    return c.target === target;
  });
}