aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkingControl.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-14 16:33:40 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-14 16:33:40 -0400
commitf6a55c0d613787f60e4a40b728a1acbc6c39c552 (patch)
tree38121dcadfc8db9bb29ebf3168cb3acb6eaabdbf /src/client/views/InkingControl.tsx
parentbfeb50130f9fff635fb317a0b4bc0b2d2590c5df (diff)
added setter scripts for fields. fixed color selection
Diffstat (limited to 'src/client/views/InkingControl.tsx')
-rw-r--r--src/client/views/InkingControl.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/InkingControl.tsx b/src/client/views/InkingControl.tsx
index 81d99e009..7bea69fb1 100644
--- a/src/client/views/InkingControl.tsx
+++ b/src/client/views/InkingControl.tsx
@@ -35,7 +35,7 @@ export class InkingControl {
@undoBatch
switchColor = action((color: ColorState): void => {
Doc.UserDoc().backgroundColor = color.hex.startsWith("#") ?
- color.hex + (color.rgb.a !== undefined ? this.decimalToHexString(Math.round(color.rgb.a * 255)) : "ff") : color.hex;
+ color.hex + (color.rgb.a ? this.decimalToHexString(Math.round(color.rgb.a * 255)) : "ff") : color.hex;
if (InkingControl.Instance.selectedTool === InkTool.None) {
const selected = SelectionManager.SelectedDocuments();