diff options
author | bob <bcz@cs.brown.edu> | 2019-05-13 10:56:12 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-13 10:56:12 -0400 |
commit | 48b0f98ea2519d861a0eecee541dc0986a2c2f12 (patch) | |
tree | 80b6baeeb62989385c7d364639e52817aff93482 /src/client/views/InkingControl.tsx | |
parent | 762394f2d226501a95ba34edebcbea7ba9bf6a47 (diff) |
small fixes
Diffstat (limited to 'src/client/views/InkingControl.tsx')
-rw-r--r-- | src/client/views/InkingControl.tsx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/InkingControl.tsx b/src/client/views/InkingControl.tsx index 4b3dbd4e0..17d4a1e49 100644 --- a/src/client/views/InkingControl.tsx +++ b/src/client/views/InkingControl.tsx @@ -35,12 +35,9 @@ export class InkingControl extends React.Component { @action switchColor = (color: ColorResult): void => { this._selectedColor = color.hex; - if (SelectionManager.SelectedDocuments().length === 1) { - var sdoc = SelectionManager.SelectedDocuments()[0]; - if (sdoc.props.ContainingCollectionView) { - Doc.SetOnPrototype(sdoc.props.Document, "backgroundColor", color.hex); - } - } + SelectionManager.SelectedDocuments().forEach(doc => + doc.props.ContainingCollectionView && Doc.SetOnPrototype(doc.props.Document, "backgroundColor", color.hex) + ); } @action |