aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkingControl.tsx
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-07-25 19:33:44 -0400
committeryipstanley <stanley_yip@brown.edu>2019-07-25 19:33:44 -0400
commit6c6c2a6c8e40b9f04942e65c416e16f1d3831385 (patch)
tree94c24a134e4a71bee473a93c59cfcf690f6a87e8 /src/client/views/InkingControl.tsx
parent0baefb4e0b133df60f42d894733113c961740af3 (diff)
parente1c7add158ce245ce6cb557177986b31fe107dd8 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into stackingSections_2
Diffstat (limited to 'src/client/views/InkingControl.tsx')
-rw-r--r--src/client/views/InkingControl.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/InkingControl.tsx b/src/client/views/InkingControl.tsx
index c7f7bdb66..da388e532 100644
--- a/src/client/views/InkingControl.tsx
+++ b/src/client/views/InkingControl.tsx
@@ -1,5 +1,5 @@
import { observable, action, computed, runInAction } from "mobx";
-import { ColorResult } from 'react-color';
+import { ColorState } from 'react-color';
import React = require("react");
import { observer } from "mobx-react";
import "./InkingControl.scss";
@@ -20,7 +20,7 @@ export class InkingControl extends React.Component {
static Instance: InkingControl = new InkingControl({});
@observable private _selectedTool: InkTool = InkTool.None;
@observable private _selectedColor: string = "rgb(244, 67, 54)";
- @observable private _selectedWidth: string = "25";
+ @observable private _selectedWidth: string = "5";
@observable public _open: boolean = false;
constructor(props: Readonly<{}>) {
@@ -41,7 +41,7 @@ export class InkingControl extends React.Component {
}
@undoBatch
- switchColor = action((color: ColorResult): void => {
+ switchColor = action((color: ColorState): void => {
this._selectedColor = color.hex + (color.rgb.a !== undefined ? this.decimalToHexString(Math.round(color.rgb.a * 255)) : "ff");
if (InkingControl.Instance.selectedTool === InkTool.None) {
if (MainOverlayTextBox.Instance.SetColor(color.hex)) return;