From d4eaadfcb956bb90b0daf43a188481aa9b2aff93 Mon Sep 17 00:00:00 2001 From: Adriaan Wormgoor Date: Wed, 23 Oct 2013 18:10:45 +0200 Subject: [PATCH] closes issue https://github.com/Doodle3D/doodle3d-client/issues/7 --- js_src/Progressbar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js_src/Progressbar.js b/js_src/Progressbar.js index a148ea8..0a91a3e 100644 --- a/js_src/Progressbar.js +++ b/js_src/Progressbar.js @@ -12,6 +12,9 @@ function Progressbar() { this.quartPI = .5 * Math.PI; this.twoPI = 2 * Math.PI; + // To make the progressbar start with a minimal amount of 'progress' + // so that you can visually see that there is progress + this.progressPadding = Math.PI * .1; this.$canvas; this.canvas; @@ -73,7 +76,7 @@ function Progressbar() { this.context.beginPath(); this.context.moveTo(45, 45); this.context.lineTo(45, 0); - this.context.arc(45, 45, 45, -this.quartPI, -this.quartPI + (progress * (this.twoPI)), false); // circle bottom of thermometer + this.context.arc(45, 45, 45, -this.quartPI, -this.quartPI + this.progressPadding + (progress * (this.twoPI - this.progressPadding)), false); // circle bottom of thermometer this.context.lineTo(45, 45); this.context.clip();