diff options
author | bob <bcz@cs.brown.edu> | 2019-06-24 13:23:28 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-06-24 13:23:28 -0400 |
commit | 6df09d7d646c16e6469b198e7d270b6a1e45b0c7 (patch) | |
tree | cb99be157e101408068f455d2846b10fa2f4aa08 /src/client/views/InkingControl.tsx | |
parent | e7da3532dea3f51ffbd432e7ea64f4a34f651e08 (diff) |
fixes for templates with annotations and more.
Diffstat (limited to 'src/client/views/InkingControl.tsx')
-rw-r--r-- | src/client/views/InkingControl.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/InkingControl.tsx b/src/client/views/InkingControl.tsx index 0837e07a9..6cde73933 100644 --- a/src/client/views/InkingControl.tsx +++ b/src/client/views/InkingControl.tsx @@ -8,6 +8,7 @@ import { faPen, faHighlighter, faEraser, faBan } from '@fortawesome/free-solid-s import { SelectionManager } from "../util/SelectionManager"; import { InkTool } from "../../new_fields/InkField"; import { Doc } from "../../new_fields/Doc"; +import { InkingCanvas } from "./InkingCanvas"; library.add(faPen, faHighlighter, faEraser, faBan); @@ -39,7 +40,7 @@ export class InkingControl extends React.Component { @action switchColor = (color: ColorResult): void => { this._selectedColor = color.hex + (color.rgb.a !== undefined ? this.decimalToHexString(Math.round(color.rgb.a * 255)) : "ff"); - SelectionManager.SelectedDocuments().forEach(doc => Doc.GetProto(doc.props.Document).backgroundColor = this._selectedColor); + if (InkingControl.Instance.selectedTool === InkTool.None) SelectionManager.SelectedDocuments().forEach(doc => Doc.GetProto(doc.props.Document).backgroundColor = this._selectedColor); } @action |