mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-26 04:32:44 +08:00
chore(project): migrate to new attach related Modeling APIs
Related to bpmn-io/diagram-js#242 BREAKING CHANGE: * as documented in bpmn-io/diagram-js#242 a few modeling APIs changed; users of these APIs must adapt accordingly.
This commit is contained in:
@ -51,7 +51,9 @@ function move(elementIds, delta, targetId, isAttach) {
|
||||
target = targetId && getElement(targetId);
|
||||
}
|
||||
|
||||
return modeling.moveElements(elements, delta, target, isAttach);
|
||||
var hints = isAttach ? { attach: true } : {};
|
||||
|
||||
return modeling.moveElements(elements, delta, target, hints);
|
||||
});
|
||||
}
|
||||
|
||||
@ -78,7 +80,7 @@ function add(attrs, position, target, isAttach) {
|
||||
target = getElement(target);
|
||||
}
|
||||
|
||||
return modeling.createShape(attrs, position, target, isAttach);
|
||||
return modeling.createShape(attrs, position, target, { attach: isAttach });
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user