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 268243f commit 26cc780
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dann.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ class NetPlot {
noFill();
stroke(0);
rect(this.pos.x,this.pos.y,this.w,this.h);
if (draged == 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 Expand Up @@ -455,7 +458,7 @@ class Graph {
update() {
noFill();
rect(this.pos.x,this.pos.y,this.w,this.h);
if (drag == undefined) {
if (draged == 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) {
Expand Down

0 comments on commit 26cc780

Please sign in to comment.