Fix flicker.

Remove more code.
This commit is contained in:
Paulo Veiga
2011-08-29 20:10:05 -03:00
parent d94414775e
commit c74d2de32d
11 changed files with 83 additions and 155 deletions

View File

@@ -88,7 +88,7 @@ mindplot.RelationshipLine = new Class({
this._positionateConnector(targetTopic);
if (this.isOnFocus()) {
this._refreshSelectedShape();
this._refreshShape();
}
this._focusShape.moveToBack();
this._controlPointsController.redraw();
@@ -149,17 +149,19 @@ mindplot.RelationshipLine = new Class({
setOnFocus : function(focus) {
// Change focus shape
if (focus) {
this._refreshSelectedShape();
this._controlPointsController.setLine(this);
}
this._focusShape.setVisibility(focus);
if (this.isOnFocus() != focus) {
if (focus) {
this._refreshShape();
this._controlPointsController.setLine(this);
}
this._focusShape.setVisibility(focus);
this._controlPointsController.setVisibility(focus);
this._onFocus = focus;
this._controlPointsController.setVisibility(focus);
this._onFocus = focus;
}
},
_refreshSelectedShape : function () {
_refreshShape : function () {
var sPos = this._line2d.getFrom();
var tPos = this._line2d.getTo();
var ctrlPoints = this._line2d.getControlPoints();
@@ -171,8 +173,6 @@ mindplot.RelationshipLine = new Class({
shapeCtrlPoints[1].x = ctrlPoints[1].x;
shapeCtrlPoints[1].y = ctrlPoints[1].y;
this._focusShape.updateLine();
//this._focusShape.setSrcControlPoint(ctrlPoints[0]);
//this._focusShape.setDestControlPoint(ctrlPoints[1]);
},
addEvent : function(type, listener) {