mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-02-22 13:48:16 +00:00
* use ES6 import / export * UTILS: export individual utilities * TESTS: localize TestHelper includes BREAKING CHANGE: * all utilities export independent functions * library sources got ported to ES6. You must now use a ES module bundler such as Browserify + babelify or Webpack to consume this library (or parts of it).
38 lines
603 B
JavaScript
38 lines
603 B
JavaScript
'use strict';
|
|
|
|
import {
|
|
forEach
|
|
} from 'min-dash';
|
|
|
|
|
|
/**
|
|
* These are the properties that should be ignored when cloning elements.
|
|
*
|
|
* @type {Array}
|
|
*/
|
|
export var IGNORED_PROPERTIES = [
|
|
'lanes',
|
|
'incoming',
|
|
'outgoing',
|
|
'artifacts',
|
|
'default',
|
|
'flowElements',
|
|
'dataInputAssociations',
|
|
'dataOutputAssociations'
|
|
];
|
|
|
|
|
|
export function getProperties(descriptor, keepDefault) {
|
|
var properties = [];
|
|
|
|
forEach(descriptor.properties, function(property) {
|
|
|
|
if (keepDefault && property.default) {
|
|
return;
|
|
}
|
|
|
|
properties.push(property.ns.name);
|
|
});
|
|
|
|
return properties;
|
|
} |