fix: state support destroyed item and shape add isAnchorPiint attr

This commit is contained in:
zhanning.bzn 2019-11-20 11:58:02 +08:00
parent 8de4020bb7
commit 3181ef6af5

View File

@ -32,11 +32,20 @@ module.exports = {
return;
}
const { item } = e;
const { item, target } = e;
const hasLocked = item.hasLocked();
if (hasLocked) {
return;
}
// 如果拖动的target 是linkPoints / anchorPoints 则不允许拖动
if (target) {
const isAnchorPoint = target.get('isAnchorPoint');
if (isAnchorPoint) {
return;
}
}
const graph = this.graph;
this.targets = [];