diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-28 16:27:34 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-28 21:55:16 +0200 |
commit | e7fa87bcc0052e1e99c6894e7e27a122374956b3 (patch) | |
tree | 56c243d08ae357533ebdb4fbf41211aa0fc914ce /src/chromeBadge.ts | |
parent | 08bd3dc0e8a3c2370e4e8abbaa241eaafc144f4c (diff) | |
download | wallet-core-e7fa87bcc0052e1e99c6894e7e27a122374956b3.tar.xz |
documentation and tslint settings to check for docs
Diffstat (limited to 'src/chromeBadge.ts')
-rw-r--r-- | src/chromeBadge.ts | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/chromeBadge.ts b/src/chromeBadge.ts index 13716a64a..702cefea8 100644 --- a/src/chromeBadge.ts +++ b/src/chromeBadge.ts @@ -30,33 +30,37 @@ function rAF(cb: (ts: number) => void) { } +/** + * Badge for Chrome that renders a Taler logo with a rotating ring if some + * background activity is happening. + */ export class ChromeBadge implements Badge { - canvas: HTMLCanvasElement; - ctx: CanvasRenderingContext2D; + private canvas: HTMLCanvasElement; + private ctx: CanvasRenderingContext2D; /** * True if animation running. The animation * might still be running even if we're not busy anymore, * just to transition to the "normal" state in a animated way. */ - animationRunning: boolean = false; + private animationRunning: boolean = false; /** * Is the wallet still busy? Note that we do not stop the * animation immediately when the wallet goes idle, but * instead slowly close the gap. */ - isBusy: boolean = false; + private isBusy: boolean = false; /** * Current rotation angle, ranges from 0 to rotationAngleMax. */ - rotationAngle: number = 0; + private rotationAngle: number = 0; /** * While animating, how wide is the current gap in the circle? * Ranges from 0 to openMax. */ - gapWidth: number = 0; + private gapWidth: number = 0; /** * Maximum value for our rotationAngle, corresponds to 2 Pi. @@ -207,14 +211,6 @@ export class ChromeBadge implements Badge { rAF(step); } - setText(s: string) { - chrome.browserAction.setBadgeText({text: s}); - } - - setColor(c: string) { - chrome.browserAction.setBadgeBackgroundColor({color: c}); - } - startBusy() { if (this.isBusy) { return; |