fix: use 1-based numbering for id

current id is 2-based
This commit is contained in:
NateScarlet
2019-04-28 17:24:11 +08:00
parent be609f4053
commit d185e18b72

View File

@@ -472,8 +472,8 @@
this.stop();
this.status = LGraph.STATUS_STOPPED;
this.last_node_id = 1;
this.last_link_id = 1;
this.last_node_id = 0;
this.last_link_id = 0;
this._version = -1; //used to detect changes
@@ -9178,4 +9178,4 @@ LGraphNode.prototype.executeAction = function(action)
}
})(this);
if (typeof exports != "undefined") exports.LiteGraph = this.LiteGraph;
if (typeof exports != "undefined") exports.LiteGraph = this.LiteGraph;