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