mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
refresing control points when undoing topic move
This commit is contained in:
parent
a6c066273b
commit
4b8d6a51f3
@ -49,6 +49,11 @@ mindplot.ControlPoint.prototype.setLine= function(line) {
|
|||||||
this._endPoint[1] = this._line.getLine().getTo().clone();
|
this._endPoint[1] = this._line.getLine().getTo().clone();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mindplot.ControlPoint.prototype.redraw = function(){
|
||||||
|
if(this._line)
|
||||||
|
this._createControlPoint();
|
||||||
|
};
|
||||||
|
|
||||||
mindplot.ControlPoint.prototype._createControlPoint = function() {
|
mindplot.ControlPoint.prototype._createControlPoint = function() {
|
||||||
this._controls= this._line.getLine().getControlPoints();
|
this._controls= this._line.getLine().getControlPoints();
|
||||||
var pos = this._line.getLine().getFrom();
|
var pos = this._line.getLine().getFrom();
|
||||||
|
@ -134,6 +134,9 @@ mindplot.CommandContext = new Class({
|
|||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
return result;
|
return result;
|
||||||
|
},
|
||||||
|
getSelectedRelationshipLines:function(){
|
||||||
|
return this._designer.getSelectedRelationshipLines();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ mindplot.RelationshipLine.prototype.redraw = function()
|
|||||||
this._refreshSelectedShape();
|
this._refreshSelectedShape();
|
||||||
}
|
}
|
||||||
this._focusShape.moveToBack();
|
this._focusShape.moveToBack();
|
||||||
|
this._controlPointsController.redraw();
|
||||||
};
|
};
|
||||||
|
|
||||||
mindplot.RelationshipLine.prototype.addToWorkspace = function(workspace)
|
mindplot.RelationshipLine.prototype.addToWorkspace = function(workspace)
|
||||||
|
@ -86,6 +86,10 @@ mindplot.commands.DragTopicCommand = mindplot.Command.extend(
|
|||||||
undoExecute: function(commandContext)
|
undoExecute: function(commandContext)
|
||||||
{
|
{
|
||||||
this.execute(commandContext);
|
this.execute(commandContext);
|
||||||
|
var selectedRelationships = commandContext.getSelectedRelationshipLines();
|
||||||
|
selectedRelationships.forEach(function(relationshipLine,index){
|
||||||
|
relationshipLine.redraw();
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
setPosition: function(point)
|
setPosition: function(point)
|
||||||
|
Loading…
Reference in New Issue
Block a user