diff options
-rw-r--r-- | src/client/views/InkingStroke.tsx | 14 |
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; |