Merge branch 'master' into develop

This commit is contained in:
Niklas Kiefer 2019-09-25 13:34:54 +02:00
commit 0143595230
5 changed files with 59 additions and 17 deletions

View File

@ -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._
## 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
* `FIX`: correct sequence flow layout after drop on flow ([#1178](https://github.com/bpmn-io/bpmn-js/issues/1178))

View File

@ -240,6 +240,10 @@ ModdleCopy.prototype.copyProperty = function(property, parent, propertyName) {
// copy model elements
if (isObject(property) && property.$type) {
if (this._moddle.getElementDescriptor(property).isGeneric) {
return;
}
copiedProperty = self._bpmnFactory.create(property.$type);
copiedProperty.$parent = parent;

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "bpmn-js",
"version": "5.0.4",
"version": "5.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "bpmn-js",
"version": "5.0.4",
"version": "5.0.5",
"description": "A bpmn 2.0 toolkit and web modeler",
"scripts": {
"all": "run-s lint test distro test:distro",

View File

@ -39,7 +39,7 @@ describe('features/copy-paste/ModdleCopy', function() {
describe('simple', function() {
it('should copy primitive properties', inject(function(moddleCopy, moddle) {
it('should copy primitive properties', inject(function(moddle, moddleCopy) {
// given
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
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(
function(moddleCopy, moddle) {
function(moddle, moddleCopy) {
// given
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
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
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
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
var userTask = moddle.create('bpmn:UserTask', {
@ -221,7 +221,7 @@ describe('features/copy-paste/ModdleCopy', function() {
describe('nested', function() {
it('should copy documentation', inject(function(moddleCopy, moddle) {
it('should copy documentation', inject(function(moddle, moddleCopy) {
// given
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
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
var outputParameter = moddle.create('camunda:OutputParameter', {
@ -360,7 +360,7 @@ describe('features/copy-paste/ModdleCopy', function() {
describe('camunda:Connector', function() {
it('should copy if parent is message event definition and is child of end event', inject(
function(moddleCopy, moddle) {
function(moddle, moddleCopy) {
// given
var connector = moddle.create('camunda:Connector', {
@ -399,7 +399,7 @@ describe('features/copy-paste/ModdleCopy', function() {
describe('camunda:Field', function() {
it('should copy if parent is message event definition and is child of end event', inject(
function(moddleCopy, moddle) {
function(moddle, moddleCopy) {
// given
var field = moddle.create('camunda:Field', {
@ -438,7 +438,7 @@ describe('features/copy-paste/ModdleCopy', function() {
describe('camunda:FailedJobRetryTimeCycle', function() {
it('should copy if parent is SignalEventDefinition and is intermediate throwing', inject(
function(moddleCopy, moddle) {
function(moddle, moddleCopy) {
// given
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(
function(moddleCopy, moddle) {
function(moddle, moddleCopy) {
// given
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
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;
}));
});
});