mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Minor fixes.
This commit is contained in:
parent
a10001dd80
commit
707e1864ef
@ -18,8 +18,13 @@
|
||||
|
||||
mindplot.ControlPoint = new Class({
|
||||
initialize:function() {
|
||||
this._controlPointsController = [new web2d.Elipse({width:6, height:6, stroke:'1 solid #6589de',fillColor:'gray', visibility:false}),
|
||||
new web2d.Elipse({width:6, height:6, stroke:'1 solid #6589de',fillColor:'gray', visibility:false})];
|
||||
var control1 = new web2d.Elipse({width:6, height:6, stroke:'1 solid #6589de',fillColor:'gray', visibility:false});
|
||||
control1.setCursor('pointer');
|
||||
|
||||
var control2 = new web2d.Elipse({width:6, height:6, stroke:'1 solid #6589de',fillColor:'gray', visibility:false});
|
||||
control2.setCursor('pointer');
|
||||
|
||||
this._controlPointsController = [control1,control2];
|
||||
this._controlLines = [new web2d.Line({strokeColor:"#6589de", strokeWidth:1, opacity:0.3}),
|
||||
new web2d.Line({strokeColor:"#6589de", strokeWidth:1, opacity:0.3})];
|
||||
|
||||
|
@ -22,7 +22,6 @@ mindplot.RelationshipLine = new Class({
|
||||
|
||||
this._line2d.setIsSrcControlPointCustom(false);
|
||||
this._line2d.setIsDestControlPointCustom(false);
|
||||
this._isOnfocus = false;
|
||||
this._focusShape = this._createLine(this.getLineType(), mindplot.ConnectionLine.SIMPLE_CURVED);
|
||||
this._focusShape.setStroke(2, "solid", "#3f96ff");
|
||||
var ctrlPoints = this._line2d.getControlPoints();
|
||||
@ -70,6 +69,7 @@ mindplot.RelationshipLine = new Class({
|
||||
var spoint = new core.Point();
|
||||
spoint.x = parseInt(ctrlPoints[0].x) + parseInt(sourcePosition.x);
|
||||
spoint.y = parseInt(ctrlPoints[0].y) + parseInt(sourcePosition.y);
|
||||
|
||||
var tpoint = new core.Point();
|
||||
tpoint.x = parseInt(ctrlPoints[1].x) + parseInt(targetPosition.x);
|
||||
tpoint.y = parseInt(ctrlPoints[1].y) + parseInt(targetPosition.y);
|
||||
@ -160,6 +160,8 @@ mindplot.RelationshipLine = new Class({
|
||||
|
||||
this._controlPointsController.setVisibility(focus);
|
||||
this._onFocus = focus;
|
||||
this._line2d.setCursor(this.isOnFocus() ? 'default' : 'pointer');
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -19,7 +19,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
||||
Extends:mindplot.Command,
|
||||
initialize: function(ctrlPointController, point) {
|
||||
$assert(ctrlPointController, 'line can not be null');
|
||||
$assert(point, 'point can not be null');
|
||||
$assert($defined(point), 'point can not be null');
|
||||
|
||||
this._ctrlPointControler = ctrlPointController;
|
||||
this._line = ctrlPointController._line;
|
||||
@ -39,6 +39,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
this._point = point;
|
||||
},
|
||||
|
||||
execute: function(commandContext) {
|
||||
var model = this._line.getModel();
|
||||
switch (this._point) {
|
||||
@ -62,6 +63,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
||||
}
|
||||
this._line.getLine().updateLine(this._point);
|
||||
},
|
||||
|
||||
undoExecute: function(commandContext) {
|
||||
var line = this._line;
|
||||
var model = line.getModel();
|
||||
|
Loading…
Reference in New Issue
Block a user