Merge branch 'master' into develop
This commit is contained in:
commit
0143595230
|
@ -6,6 +6,15 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen
|
||||||
|
|
||||||
___Note:__ Yet to be released changes appear here._
|
___Note:__ Yet to be released changes appear here._
|
||||||
|
|
||||||
|
## 5.0.5
|
||||||
|
|
||||||
|
* `FIX`: snap connections to task mid ([`86c61b0`](https://github.com/bpmn-io/bpmn-js/commit/86c61b0c0d6dcf776adda94b6d72b621644c2abe))
|
||||||
|
* `FIX`: snap connections to sub process mid ([`83e9f05`](https://github.com/bpmn-io/bpmn-js/commit/83e9f05efab6fbe57100e11d0443291a561bdfe4))
|
||||||
|
* `FIX`: complete direct editing when auto place starts ([`dcf440b`](https://github.com/bpmn-io/bpmn-js/commit/dcf440b07684339bdb52ba97cd1c83f9eb234044))
|
||||||
|
* `FIX`: do not clear diagram if no diagram to clear ([#1181](https://github.com/bpmn-io/bpmn-js/issues/1181))
|
||||||
|
* `FIX`: copy boundary events attachments ([#1190](https://github.com/bpmn-io/bpmn-js/issues/1190))
|
||||||
|
* `FIX`: do not copy generic properties ([`a74d83`](https://github.com/bpmn-io/bpmn-js/commit/a74d838dc78aceddf88e07231cf85a4cf9e0dd95))
|
||||||
|
|
||||||
## 5.0.4
|
## 5.0.4
|
||||||
|
|
||||||
* `FIX`: correct sequence flow layout after drop on flow ([#1178](https://github.com/bpmn-io/bpmn-js/issues/1178))
|
* `FIX`: correct sequence flow layout after drop on flow ([#1178](https://github.com/bpmn-io/bpmn-js/issues/1178))
|
||||||
|
|
|
@ -240,6 +240,10 @@ ModdleCopy.prototype.copyProperty = function(property, parent, propertyName) {
|
||||||
|
|
||||||
// copy model elements
|
// copy model elements
|
||||||
if (isObject(property) && property.$type) {
|
if (isObject(property) && property.$type) {
|
||||||
|
if (this._moddle.getElementDescriptor(property).isGeneric) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
copiedProperty = self._bpmnFactory.create(property.$type);
|
copiedProperty = self._bpmnFactory.create(property.$type);
|
||||||
|
|
||||||
copiedProperty.$parent = parent;
|
copiedProperty.$parent = parent;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bpmn-js",
|
"name": "bpmn-js",
|
||||||
"version": "5.0.4",
|
"version": "5.0.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bpmn-js",
|
"name": "bpmn-js",
|
||||||
"version": "5.0.4",
|
"version": "5.0.5",
|
||||||
"description": "A bpmn 2.0 toolkit and web modeler",
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"all": "run-s lint test distro test:distro",
|
"all": "run-s lint test distro test:distro",
|
||||||
|
|
|
@ -39,7 +39,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
|
|
||||||
describe('simple', function() {
|
describe('simple', function() {
|
||||||
|
|
||||||
it('should copy primitive properties', inject(function(moddleCopy, moddle) {
|
it('should copy primitive properties', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var userTask = moddle.create('bpmn:UserTask', {
|
var userTask = moddle.create('bpmn:UserTask', {
|
||||||
|
@ -56,7 +56,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should copy arrays of properties', inject(function(moddleCopy, moddle) {
|
it('should copy arrays of properties', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var messageEventDefinition = moddle.create('bpmn:MessageEventDefinition'),
|
var messageEventDefinition = moddle.create('bpmn:MessageEventDefinition'),
|
||||||
|
@ -80,7 +80,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT copy properties that are not allowed in target element', inject(
|
it('should NOT copy properties that are not allowed in target element', inject(
|
||||||
function(moddleCopy, moddle) {
|
function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var userTask = moddle.create('bpmn:UserTask', {
|
var userTask = moddle.create('bpmn:UserTask', {
|
||||||
|
@ -98,7 +98,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
it('should NOT copy IDs', inject(function(moddleCopy, moddle) {
|
it('should NOT copy IDs', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var task = moddle.create('bpmn:Task', {
|
var task = moddle.create('bpmn:Task', {
|
||||||
|
@ -115,7 +115,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should NOT copy references', inject(function(moddleCopy, moddle) {
|
it('should NOT copy references', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var processRef = moddle.create('bpmn:Process'),
|
var processRef = moddle.create('bpmn:Process'),
|
||||||
|
@ -169,7 +169,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should NOT copy empty extension elements', inject(function(moddleCopy, moddle) {
|
it('should NOT copy empty extension elements', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var connector = moddle.create('camunda:Connector'),
|
var connector = moddle.create('camunda:Connector'),
|
||||||
|
@ -194,7 +194,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should only copy specified properties', inject(function(moddleCopy, moddle) {
|
it('should only copy specified properties', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var userTask = moddle.create('bpmn:UserTask', {
|
var userTask = moddle.create('bpmn:UserTask', {
|
||||||
|
@ -221,7 +221,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
|
|
||||||
describe('nested', function() {
|
describe('nested', function() {
|
||||||
|
|
||||||
it('should copy documentation', inject(function(moddleCopy, moddle) {
|
it('should copy documentation', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var documentation = [
|
var documentation = [
|
||||||
|
@ -245,7 +245,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should copy execution listener', inject(function(moddleCopy, moddle) {
|
it('should copy execution listener', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var script = moddle.create('camunda:Script', {
|
var script = moddle.create('camunda:Script', {
|
||||||
|
@ -289,7 +289,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should copy output parameter', inject(function(moddleCopy, moddle) {
|
it('should copy output parameter', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var outputParameter = moddle.create('camunda:OutputParameter', {
|
var outputParameter = moddle.create('camunda:OutputParameter', {
|
||||||
|
@ -360,7 +360,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
describe('camunda:Connector', function() {
|
describe('camunda:Connector', function() {
|
||||||
|
|
||||||
it('should copy if parent is message event definition and is child of end event', inject(
|
it('should copy if parent is message event definition and is child of end event', inject(
|
||||||
function(moddleCopy, moddle) {
|
function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var connector = moddle.create('camunda:Connector', {
|
var connector = moddle.create('camunda:Connector', {
|
||||||
|
@ -399,7 +399,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
describe('camunda:Field', function() {
|
describe('camunda:Field', function() {
|
||||||
|
|
||||||
it('should copy if parent is message event definition and is child of end event', inject(
|
it('should copy if parent is message event definition and is child of end event', inject(
|
||||||
function(moddleCopy, moddle) {
|
function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var field = moddle.create('camunda:Field', {
|
var field = moddle.create('camunda:Field', {
|
||||||
|
@ -438,7 +438,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
describe('camunda:FailedJobRetryTimeCycle', function() {
|
describe('camunda:FailedJobRetryTimeCycle', function() {
|
||||||
|
|
||||||
it('should copy if parent is SignalEventDefinition and is intermediate throwing', inject(
|
it('should copy if parent is SignalEventDefinition and is intermediate throwing', inject(
|
||||||
function(moddleCopy, moddle) {
|
function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var retryCycle = moddle.create('camunda:FailedJobRetryTimeCycle', {
|
var retryCycle = moddle.create('camunda:FailedJobRetryTimeCycle', {
|
||||||
|
@ -475,7 +475,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should copy if parent is TimerEventDefinition and is catching', inject(
|
it('should copy if parent is TimerEventDefinition and is catching', inject(
|
||||||
function(moddleCopy, moddle) {
|
function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var retryCycle = moddle.create('camunda:FailedJobRetryTimeCycle', {
|
var retryCycle = moddle.create('camunda:FailedJobRetryTimeCycle', {
|
||||||
|
@ -509,7 +509,7 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
it('should copy if parent is call activity', inject(function(moddleCopy, moddle) {
|
it('should copy if parent is call activity', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var retryCycle = moddle.create('camunda:FailedJobRetryTimeCycle', {
|
var retryCycle = moddle.create('camunda:FailedJobRetryTimeCycle', {
|
||||||
|
@ -542,6 +542,35 @@ describe('features/copy-paste/ModdleCopy', function() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
describe('generic properties', function() {
|
||||||
|
|
||||||
|
it('should not copy generic extension elements', inject(function(moddle, moddleCopy) {
|
||||||
|
|
||||||
|
// given
|
||||||
|
var genericExtensionElement = moddle.createAny('foo:property', {
|
||||||
|
value: 'foo'
|
||||||
|
});
|
||||||
|
|
||||||
|
var extensionElements = moddle.create('bpmn:ExtensionElements'),
|
||||||
|
startEvent = moddle.create('bpmn:StartEvent');
|
||||||
|
|
||||||
|
genericExtensionElement.$parent = extensionElements;
|
||||||
|
|
||||||
|
extensionElements.$parent = startEvent;
|
||||||
|
extensionElements.values = [ genericExtensionElement ];
|
||||||
|
|
||||||
|
startEvent.extensionElements = extensionElements;
|
||||||
|
|
||||||
|
// when
|
||||||
|
var endEvent = moddleCopy.copyElement(startEvent, moddle.create('bpmn:EndEvent'));
|
||||||
|
|
||||||
|
// then
|
||||||
|
expect(endEvent.extensionElements).not.to.exist;
|
||||||
|
}));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue