Skip to content

Commit

Permalink
Removed doubleClickedBool, substituted by pg = undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
iambiancafonseca committed May 22, 2024
1 parent 287e707 commit ba10c34
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/p5.Graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ p5.Graphics = class extends p5.Element {
* // Double-click to remove the p5.Graphics object.
*
* let pg;
* let doubleClickedBool = false;
*
* function setup() {
* createCanvas(100, 100);
Expand All @@ -351,7 +350,7 @@ p5.Graphics = class extends p5.Element {
*
* // Display the p5.Graphics object if
* // it's available.
* if (!doubleClickedBool) {
* if (pg) {
* image(pg, 20, 20);
* }
* }
Expand All @@ -360,7 +359,7 @@ p5.Graphics = class extends p5.Element {
* // the user double-clicks.
* function doubleClicked() {
* pg.remove();
* doubleClickedBool = true;
* pg = undefined;
* }
* </code>
* </div>
Expand Down

0 comments on commit ba10c34

Please sign in to comment.