aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvkalev <vjk1883@gmail.com>2021-07-29 09:51:50 -0400
committervkalev <vjk1883@gmail.com>2021-07-29 09:51:50 -0400
commit09e5f2c58ca87ded318627cbc5dea436989fcff2 (patch)
treecf1d38df9b494ed2753b962f258a3aa49691d1d7 /src
parentea6000690022d43b6bc8e1a546d28729a59faf7b (diff)
deselecting an ink stroke properly exits edit view
Diffstat (limited to 'src')
-rw-r--r--src/client/views/InkingStroke.tsx14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index a8f32118c..21059b330 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -65,11 +65,19 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume
}
}
+ /**
+ * Ensures the ink controls and handles aren't rendered when the current ink stroke is reselected.
+ */
+ @action
+ toggleControlButton = () => {
+ if (!this.props.isSelected() && this._properties) {
+ this._properties._controlButton = false;
+ }
+ }
+
render() {
TraceMobx();
- // if (!this.props.isSelected() && this._properties) {
- // this._properties._controlButton = false;
- // }
+ this.toggleControlButton();
// Extracting the ink data and formatting information of the current ink stroke.
const data: InkData = Cast(this.dataDoc[this.fieldKey], InkField)?.inkData ?? [];
const inkDoc: Doc = this.layoutDoc;