feat(snapping): snap to source element
This ensures we snap to a source element if one is provided, i.e. during shape.append.
This commit is contained in:
parent
b233ab957c
commit
af9ce652e2
|
@ -193,6 +193,13 @@ BpmnSnapping.prototype.initSnap = function(event) {
|
|||
y: docking.y - event.y
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var source = context.source;
|
||||
|
||||
if (source) {
|
||||
snapContext.addDefaultSnap('mid', mid(source));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -231,4 +238,5 @@ BpmnSnapping.prototype.addTargetSnaps = function(snapPoints, shape, target) {
|
|||
snapPoints.add(c.id + '-docking', docking.original || docking);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
Loading…
Reference in New Issue