mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
Relationship source position during drag is not positioned in the center anymore.
This commit is contained in:
parent
fc6d91f59e
commit
2ec9e70245
@ -99,8 +99,18 @@ mindplot.RelationshipPivot = new Class({
|
||||
var pos = screen.getWorkspaceMousePosition(event);
|
||||
|
||||
// Leave the arrow a couple of pixels away from the cursor.
|
||||
var gapDistance = Math.sign(pos.x - this._sourceTopic.getPosition().x) * 5;
|
||||
var sourcePosition = this._sourceTopic.getPosition();
|
||||
var gapDistance = Math.sign(pos.x - sourcePosition.x) * 5;
|
||||
|
||||
// Calculate origin position ...
|
||||
var controPoint = mindplot.util.Shape.calculateDefaultControlPoints(sourcePosition, pos);
|
||||
var spoint = new core.Point();
|
||||
spoint.x = parseInt(controPoint[0].x) + parseInt(sourcePosition.x);
|
||||
spoint.y = parseInt(controPoint[0].y) + parseInt(sourcePosition.y);
|
||||
var sPos = mindplot.util.Shape.calculateRelationShipPointCoordinates(this._sourceTopic, spoint);
|
||||
this._pivot.setFrom(sPos.x, sPos.y);
|
||||
|
||||
// Update target position ...
|
||||
this._pivot.setTo(pos.x - gapDistance, pos.y);
|
||||
|
||||
var controlPoints = this._pivot.getControlPoints();
|
||||
|
Loading…
Reference in New Issue
Block a user