mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-14 18:57:56 +01:00
- Fix relationship exception due to usage of Mootools deprecated method.
This commit is contained in:
parent
a3d129a034
commit
3a7c1d56cb
@ -29,12 +29,25 @@ mindplot.ControlPoint = new Class({
|
|||||||
new web2d.Line({strokeColor:"#6589de", strokeWidth:1, opacity:0.3})];
|
new web2d.Line({strokeColor:"#6589de", strokeWidth:1, opacity:0.3})];
|
||||||
|
|
||||||
this._isBinded = false;
|
this._isBinded = false;
|
||||||
this._controlPointsController[0].addEvent('mousedown', this._mouseDown.bindWithEvent(this, mindplot.ControlPoint.FROM));
|
this._controlPointsController[0].addEvent('mousedown', function(event) {
|
||||||
this._controlPointsController[0].addEvent('click', this._mouseClick.bindWithEvent(this));
|
(this._mouseDown.bind(this))(event, mindplot.ControlPoint.FROM);
|
||||||
this._controlPointsController[0].addEvent('dblclick', this._mouseClick.bindWithEvent(this));
|
}.bind(this));
|
||||||
this._controlPointsController[1].addEvent('mousedown', this._mouseDown.bindWithEvent(this, mindplot.ControlPoint.TO));
|
this._controlPointsController[0].addEvent('click', function(event) {
|
||||||
this._controlPointsController[1].addEvent('click', this._mouseClick.bindWithEvent(this));
|
(this._mouseClick.bind(this))(event);
|
||||||
this._controlPointsController[1].addEvent('dblclick', this._mouseClick.bindWithEvent(this));
|
}.bind(this));
|
||||||
|
this._controlPointsController[0].addEvent('dblclick', function(event) {
|
||||||
|
(this._mouseClick.bind(this))(event);
|
||||||
|
}.bind(this));
|
||||||
|
|
||||||
|
this._controlPointsController[1].addEvent('mousedown', function(event) {
|
||||||
|
(this._mouseDown.bind(this))(event, mindplot.ControlPoint.TO);
|
||||||
|
}.bind(this));
|
||||||
|
this._controlPointsController[1].addEvent('click', function(event) {
|
||||||
|
(this._mouseClick.bind(this))(event);
|
||||||
|
}.bind(this));
|
||||||
|
this._controlPointsController[1].addEvent('dblclick', function(event) {
|
||||||
|
(this._mouseClick.bind(this))(event);
|
||||||
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -81,9 +94,15 @@ mindplot.ControlPoint = new Class({
|
|||||||
_mouseDown : function(event, point) {
|
_mouseDown : function(event, point) {
|
||||||
if (!this._isBinded) {
|
if (!this._isBinded) {
|
||||||
this._isBinded = true;
|
this._isBinded = true;
|
||||||
this._mouseMoveFunction = this._mouseMoveEvent.bindWithEvent(this, point);
|
|
||||||
|
this._mouseMoveFunction = function(event) {
|
||||||
|
(this._mouseMoveEvent.bind(this))(event, point);
|
||||||
|
}.bind(this);
|
||||||
|
|
||||||
this._workspace.getScreenManager().addEvent('mousemove', this._mouseMoveFunction);
|
this._workspace.getScreenManager().addEvent('mousemove', this._mouseMoveFunction);
|
||||||
this._mouseUpFunction = this._mouseUp.bindWithEvent(this, point);
|
this._mouseUpFunction = function(event) {
|
||||||
|
(this._mouseUp.bind(this))(event, point);
|
||||||
|
}.bind(this);
|
||||||
this._workspace.getScreenManager().addEvent('mouseup', this._mouseUpFunction);
|
this._workspace.getScreenManager().addEvent('mouseup', this._mouseUpFunction);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -119,11 +138,7 @@ mindplot.ControlPoint = new Class({
|
|||||||
|
|
||||||
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
||||||
actionDispatcher.moveControlPoint(this, point);
|
actionDispatcher.moveControlPoint(this, point);
|
||||||
|
|
||||||
this._isBinded = false;
|
this._isBinded = false;
|
||||||
/*event.preventDefault();
|
|
||||||
event.stop();
|
|
||||||
return false;*/
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_mouseClick : function(event) {
|
_mouseClick : function(event) {
|
||||||
|
@ -120,7 +120,7 @@ mindplot.RelationshipLine = new Class({
|
|||||||
addToWorkspace : function(workspace) {
|
addToWorkspace : function(workspace) {
|
||||||
workspace.appendChild(this._focusShape);
|
workspace.appendChild(this._focusShape);
|
||||||
workspace.appendChild(this._controlPointsController);
|
workspace.appendChild(this._controlPointsController);
|
||||||
this._controlPointControllerListener = this._initializeControlPointController.bindWithEvent(this, workspace);
|
this._controlPointControllerListener = this._initializeControlPointController.bind(this);
|
||||||
this._line2d.addEvent('click', this._controlPointControllerListener);
|
this._line2d.addEvent('click', this._controlPointControllerListener);
|
||||||
this._isInWorkspace = true;
|
this._isInWorkspace = true;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ mindplot.RelationshipLine = new Class({
|
|||||||
this.parent(workspace);
|
this.parent(workspace);
|
||||||
},
|
},
|
||||||
|
|
||||||
_initializeControlPointController : function(event, workspace) {
|
_initializeControlPointController : function() {
|
||||||
this.setOnFocus(true);
|
this.setOnFocus(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ TestCase("Mindplot test",{
|
|||||||
buildMindmapDesigner();
|
buildMindmapDesigner();
|
||||||
|
|
||||||
// Register Events ...
|
// Register Events ...
|
||||||
$(document).addEvent('keydown', designer.keyEventHandler.bindWithEvent(designer));
|
// $(document).addEvent('keydown', designer.keyEventHandler.bindWithEvent(designer));
|
||||||
|
|
||||||
/*// Autosave ...
|
/*// Autosave ...
|
||||||
if (!isTryMode)
|
if (!isTryMode)
|
||||||
|
@ -321,12 +321,12 @@ editor.Help = {
|
|||||||
container.addEvent('mouseover', function() {
|
container.addEvent('mouseover', function() {
|
||||||
$(this).setStyle('border-top', '1px solid #BBB4D6');
|
$(this).setStyle('border-top', '1px solid #BBB4D6');
|
||||||
$(this).setStyle('border-bottom', '1px solid #BBB4D6');
|
$(this).setStyle('border-bottom', '1px solid #BBB4D6');
|
||||||
}.bindWithEvent(container));
|
}.bind(this));
|
||||||
container.addEvent('mouseout', function() {
|
container.addEvent('mouseout', function() {
|
||||||
$(this).setStyle('border-top', '1px solid transparent');
|
$(this).setStyle('border-top', '1px solid transparent');
|
||||||
$(this).setStyle('border-bottom', '1px solid transparent');
|
$(this).setStyle('border-bottom', '1px solid transparent');
|
||||||
|
|
||||||
}.bindWithEvent(container));
|
}.bind(this));
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user