added Number widget

This commit is contained in:
tamat
2018-06-20 18:54:30 +02:00
parent 5a5e38b770
commit 77efe120f8
5 changed files with 830 additions and 446 deletions

View File

@@ -3764,6 +3764,8 @@ LGraphCanvas.prototype.processMouseUp = function(e)
document.removeEventListener("mouseup", this._mouseup_callback, true );
this.adjustMouseEvent(e);
var now = LiteGraph.getTime();
e.click_time = (now - this.last_mouseclick);
if (e.which == 1) //left button
{
@@ -3853,9 +3855,7 @@ LGraphCanvas.prototype.processMouseUp = function(e)
{
//get node over
var node = this.graph.getNodeOnPos( e.canvasX, e.canvasY, this.visible_nodes );
var now = LiteGraph.getTime();
if ( !node && (now - this.last_mouseclick) < 300 )
if ( !node && e.click_time < 300 )
this.deselectAllNodes();
this.dirty_canvas = true;