diff options
| author | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-05-16 13:13:50 -0400 |
|---|---|---|
| committer | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-05-16 13:13:50 -0400 |
| commit | 4dacd1220e6a0ef73167f187f52f3b4c222c2586 (patch) | |
| tree | 12d481d4d421fda6bd4490af4d0b5d77c6c1131c /src/client/views/InkingControl.tsx | |
| parent | 3451ce40cbd488cede7d29b6e39594f740e366b5 (diff) | |
| parent | 53351f6c5b448b93f2865eb38868bddb95ec4c1d (diff) | |
pulled from master and resolved
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 |
