mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-22 23:08:49 +00:00
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…
x
Reference in New Issue
Block a user