diff options
author | bobzel <zzzman@gmail.com> | 2022-07-05 12:33:28 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-07-05 12:33:28 -0400 |
commit | 0906eab4135db844dc45a20d33f84e7439461c9b (patch) | |
tree | 608deaa7b1bacca054501599ad76b3bc7b997533 /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 9f89d4d2bd166a189da0c6cce66ac4ebb5682ab5 (diff) |
fixed sidebar annos to be editable (with i-beam cursor) when selected and to be active when parent document is active. fixed previewing a sidebar annotation to not open up sidebar
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 8e1698eba..f83fdffc9 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1607,6 +1607,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp dataDoc={this.dataDoc} // usePanelWidth={true} nativeWidth={NumCast(this.layoutDoc._nativeWidth)} + whenChildContentsActiveChanged={this.whenChildContentsActiveChanged} showSidebar={this.SidebarShown} PanelWidth={this.sidebarWidth} setHeight={this.setSidebarHeight} @@ -1645,8 +1646,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } render() { TraceMobx(); - const selected = this.props.isSelected() || this.Document.forceActive; - const active = this.props.isContentActive(); + const active = this.props.isContentActive() || this.props.isSelected(); + const selected = active; const scale = (this.props.scaling?.() || 1) * NumCast(this.layoutDoc._viewScale, 1); const rounded = StrCast(this.layoutDoc.borderRounding) === "100%" ? "-rounded" : ""; const interactive = (CurrentUserUtils.ActiveTool === InkTool.None || SnappingManager.GetIsDragging()) && (this.layoutDoc.z || !this.layoutDoc._lockedPosition); |