Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Update dann.js
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed Sep 22, 2020
1 parent 42de253 commit ae45ab1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dann.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ class Graph {
update() {
noFill();
rect(this.pos.x,this.pos.y,this.w,this.h);
if (drag == undefined) {
let dragged = false;
}
if (dragged&&mouseX >= this.pos.x && mouseX<=this.pos.x+this.w&&mouseY >= this.pos.y&&mouseY<=this.pos.y+this.h) {
this.pos.x = mouseX-(this.w/2);
this.pos.y = mouseY-(this.h/2);
Expand Down

0 comments on commit ae45ab1

Please sign in to comment.