ModelCloneUtils.js 588 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {
  2. forEach
  3. } from 'min-dash';
  4. /**
  5. * These are the properties that should be ignored when cloning elements.
  6. *
  7. * @type {Array}
  8. */
  9. export var IGNORED_PROPERTIES = [
  10. 'lanes',
  11. 'incoming',
  12. 'outgoing',
  13. 'artifacts',
  14. 'default',
  15. 'flowElements',
  16. 'dataInputAssociations',
  17. 'dataOutputAssociations'
  18. ];
  19. export function getProperties(descriptor, keepDefault) {
  20. var properties = [];
  21. forEach(descriptor.properties, function(property) {
  22. if (keepDefault && property.default) {
  23. return;
  24. }
  25. properties.push(property.ns.name);
  26. });
  27. return properties;
  28. }