diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2017-04-30 19:38:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-30 19:38:42 -0400 |
| commit | dffd1beac4f5fa588efd324924c9e55a22e7d57d (patch) | |
| tree | ffece4968100e3e614d517f4c854c518f0795a37 /scripts/ccharter.js | |
| parent | 8e08e1b4eced2ce32b2f8b7896bd60d74950998d (diff) | |
| download | ccharter-c-dffd1beac4f5fa588efd324924c9e55a22e7d57d.tar.gz | |
- Fix empty bubble being drawn on cleared canvas.
ChordCharter.drawChord("chordy", 30, 25, "", "111111");
context.clearRect(0, 0, canvas.width, canvas.height);
ChordCharter.drawChord("chordy", 30, 25, "", "222222");
now no longer leaves weird empty bubble behind.Diffstat (limited to 'scripts/ccharter.js')
| -rw-r--r-- | scripts/ccharter.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/ccharter.js b/scripts/ccharter.js index 81c2dd4..353c081 100644 --- a/scripts/ccharter.js +++ b/scripts/ccharter.js @@ -13,7 +13,10 @@ var ChordCharter = { var origin = { x: originX, y: originY }; var props = { width: 50, height: 60 }; - + + // Reset previous path that may have been created. + ctx.beginPath(); + // horizontals for (counter in new Array(0, 1, 2, 3, 4)) { @@ -96,4 +99,4 @@ var ChordCharter = { ctx.fillText("3", origin.x - 10, origin.y + 41); } } -}; \ No newline at end of file +}; |
