We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The possible reason is that the click judgment in the drawButton function uses this.mouse, which I think should be using this.graph_ mouse
There is also an associated 'this. last_click_position' that needs to be modified
By doing so, he can succeed in his work
I would like to ask if this change is correct
thank you
fix code:
LGraphCanvas.prototype.processMouseDown = function(e) { ... this.last_click_position = [this.graph_mouse[0],this.graph_mouse[1]]; ... } LGraphCanvas.prototype.drawButton = function( x,y,w,h, text, bgcolor, hovercolor, textcolor ) { ... var pos = this.graph_mouse; var hover = LiteGraph.isInsideRectangle( pos[0], pos[1], x,yFix,w,h ); pos = this.last_click_position; var clicked = pos && LiteGraph.isInsideRectangle( pos[0], pos[1], x,yFix,w,h ); ... }
The text was updated successfully, but these errors were encountered:
do a PR
Sorry, something went wrong.
No branches or pull requests
The possible reason is that the click judgment in the drawButton function uses this.mouse, which I think should be using this.graph_ mouse
There is also an associated 'this. last_click_position' that needs to be modified
By doing so, he can succeed in his work
I would like to ask if this change is correct
thank you
fix code:
The text was updated successfully, but these errors were encountered: