0
在这个例子中:Undo/Redo如何克服端口分离问题?
- 拖放到画布上的开始节点。
- Mousedown在港口并拖动它。
- 现在拖动时按RIGHT CLICK。
现在的问题是,该端口成为从起始节点分离。它不应该发生。
请看下图以获得更好的理解。 请帮我解决这个问题。 在此先感谢。
在这个例子中:Undo/Redo如何克服端口分离问题?
现在的问题是,该端口成为从起始节点分离。它不应该发生。
请看下图以获得更好的理解。 请帮我解决这个问题。 在此先感谢。
这是一个错误,将被固定在未来的版本中的一个。
我已经仔细分析这个问题,得出的结论为:
然后,当鼠标右键上移,然后鼠标移动canvas.js调用并使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));
所以对于知道速战速决我已经ckecked如果鼠标右键弹起时,右鼠标下来,然后返回为:
在按下鼠标:
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));
在鼠标释放:
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));
感谢你这么多:)
请详细说明这一点,并附上可靠的来源参考。 –