Reputation: 158
In this example : Undo/Redo
Now the issue is that the port become detach from the start node. It should not be happen.
Please look in to the image below for better understanding. Please help me to overcome this issue. Thanks in advance.
Upvotes: 0
Views: 135
Reputation: 158
I have closely analyse the issue and come to the conclusion as :
Then when right mouse up then mouse up of canvas.js called and make mouseDown = false.
this.html.bind("mouseup touchend", $.proxy(function(event)
{
if (this.mouseDown === false)
return;
event = this._getEvent(event);
this.mouseDown = false;// it makes mouseDown false
this.onMouseUp();
}, this));
So for know quick fix I have ckecked if right mouse up and right mouse down then return as:
In Mouse Down :
this.html.bind("mousedown touchstart", $.proxy(function(event)
{
event.preventDefault();
if(event.which == 3)//added this in the mouse down
return;
event = this._getEvent(event);
this.mouseDownX = event.clientX;
this.mouseDownY = event.clientY;
var pos = this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY);
this.mouseDown = true;
this.onMouseDown(pos.x, pos.y);
}, this));
In Mouse Up :
this.html.bind("mouseup touchend", $.proxy(function(event)
{
//added extra condition for right click
if (this.mouseDown === false || event.which == 3)
return;
event = this._getEvent(event);
this.mouseDown = false;// it makes mouseDown false
this.onMouseUp();
}, this));
THANKS YOU SO MUCH:)
Upvotes: 1