aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-02 13:26:53 -0500
committerbobzel <zzzman@gmail.com>2024-01-02 13:26:53 -0500
commitfdc0bf7c54af252178f587709630d36726484b91 (patch)
tree9633a76e9bb386254f40894a13553dcba867cb37 /src/client/views/nodes/formattedText
parent9b9f54a43793ca6ffb26c56f962d11ba8325abd2 (diff)
fixing more .props => ._props refernces.
Diffstat (limited to 'src/client/views/nodes/formattedText')
-rw-r--r--src/client/views/nodes/formattedText/DashDocView.tsx16
-rw-r--r--src/client/views/nodes/formattedText/EquationView.tsx4
-rw-r--r--src/client/views/nodes/formattedText/RichTextMenu.tsx16
3 files changed, 18 insertions, 18 deletions
diff --git a/src/client/views/nodes/formattedText/DashDocView.tsx b/src/client/views/nodes/formattedText/DashDocView.tsx
index 1002ee403..5a13fa8b4 100644
--- a/src/client/views/nodes/formattedText/DashDocView.tsx
+++ b/src/client/views/nodes/formattedText/DashDocView.tsx
@@ -177,7 +177,7 @@ export class DashDocViewInternal extends React.Component<IDashDocViewInternal> {
};
componentWillUnmount = () => Object.values(this._disposers).forEach(disposer => disposer?.());
- isContentActive = () => this.props.tbox.props.isSelected() || this.props.tbox.isAnyChildContentActive?.();
+ isContentActive = () => this.props.tbox._props.isSelected() || this.props.tbox.isAnyChildContentActive?.();
render() {
return !this._dashDoc || !this._finalLayout || this.props.hidden ? null : (
@@ -205,21 +205,21 @@ export class DashDocViewInternal extends React.Component<IDashDocViewInternal> {
removeDocument={this.removeDoc}
isDocumentActive={returnFalse}
isContentActive={this.isContentActive}
- styleProvider={this._textBox.props.styleProvider}
- docViewPath={this._textBox.props.docViewPath}
+ styleProvider={this._textBox._props.styleProvider}
+ docViewPath={this._textBox._props.docViewPath}
ScreenToLocalTransform={this.getDocTransform}
- addDocTab={this._textBox.props.addDocTab}
+ addDocTab={this._textBox._props.addDocTab}
pinToPres={returnFalse}
- renderDepth={this._textBox.props.renderDepth + 1}
+ renderDepth={this._textBox._props.renderDepth + 1}
PanelWidth={this._finalLayout[Width]}
PanelHeight={this._finalLayout[Height]}
focus={this.outerFocus}
whenChildContentsActiveChanged={this.props.tbox.whenChildContentsActiveChanged}
bringToFront={emptyFunction}
dontRegisterView={false}
- childFilters={this.props.tbox?.props.childFilters}
- childFiltersByRanges={this.props.tbox?.props.childFiltersByRanges}
- searchFilterDocs={this.props.tbox?.props.searchFilterDocs}
+ childFilters={this.props.tbox?._props.childFilters}
+ childFiltersByRanges={this.props.tbox?._props.childFiltersByRanges}
+ searchFilterDocs={this.props.tbox?._props.searchFilterDocs}
/>
</div>
);
diff --git a/src/client/views/nodes/formattedText/EquationView.tsx b/src/client/views/nodes/formattedText/EquationView.tsx
index 7e655531e..b786c5ffb 100644
--- a/src/client/views/nodes/formattedText/EquationView.tsx
+++ b/src/client/views/nodes/formattedText/EquationView.tsx
@@ -65,8 +65,8 @@ export class EquationViewInternal extends React.Component<IEquationViewInternal>
constructor(props: any) {
super(props);
- this._fieldKey = this.props.fieldKey;
- this._textBoxDoc = this.props.tbox.props.Document;
+ this._fieldKey = props.fieldKey;
+ this._textBoxDoc = props.tbox.Document;
}
componentWillUnmount() {
diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx
index 3b31f2d17..5858c3b11 100644
--- a/src/client/views/nodes/formattedText/RichTextMenu.tsx
+++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx
@@ -186,7 +186,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
// finds font sizes and families in selection
getActiveAlignment() {
- if (this.view && this.TextView?.props.rootSelected?.()) {
+ if (this.view && this.TextView?._props.rootSelected?.()) {
const path = (this.view.state.selection.$from as any).path;
for (let i = path.length - 3; i < path.length && i >= 0; i -= 3) {
if (path[i]?.type === this.view.state.schema.nodes.paragraph || path[i]?.type === this.view.state.schema.nodes.heading) {
@@ -199,7 +199,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
// finds font sizes and families in selection
getActiveListStyle() {
- if (this.view && this.TextView?.props.rootSelected?.()) {
+ if (this.view && this.TextView?._props.rootSelected?.()) {
const path = (this.view.state.selection.$from as any).path;
for (let i = 0; i < path.length; i += 3) {
if (path[i].type === this.view.state.schema.nodes.ordered_list) {
@@ -219,7 +219,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
const activeSizes = new Set<string>();
const activeColors = new Set<string>();
const activeHighlights = new Set<string>();
- if (this.view && this.TextView?.props.rootSelected?.()) {
+ if (this.view && this.TextView?._props.rootSelected?.()) {
const state = this.view.state;
const pos = this.view.state.selection.$from;
const marks: Mark[] = [...(state.storedMarks ?? [])];
@@ -254,7 +254,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
//finds all active marks on selection in given group
getActiveMarksOnSelection() {
let activeMarks: MarkType[] = [];
- if (!this.view || !this.TextView?.props.rootSelected?.()) return activeMarks;
+ if (!this.view || !this.TextView?._props.rootSelected?.()) return activeMarks;
const markGroup = [schema.marks.noAutoLinkAnchor, schema.marks.strong, schema.marks.em, schema.marks.underline, schema.marks.strikethrough, schema.marks.superscript, schema.marks.subscript];
if (this.view.state.storedMarks) return this.view.state.storedMarks.map(mark => mark.type);
@@ -447,7 +447,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
this.layoutDoc && (this.layoutDoc.layout_centered = !this.layoutDoc.layout_centered);
};
align = (view: EditorView, dispatch: any, alignment: 'left' | 'right' | 'center') => {
- if (this.TextView?.props.rootSelected?.()) {
+ if (this.TextView?._props.rootSelected?.()) {
var tr = view.state.tr;
view.state.doc.nodesBetween(view.state.selection.from, view.state.selection.to, (node, pos, parent, index) => {
if ([schema.nodes.paragraph, schema.nodes.heading].includes(node.type)) {
@@ -581,7 +581,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
return (this.view as any)?.TextView as FormattedTextBox;
}
get TextViewFieldKey() {
- return this.TextView?.props.fieldKey;
+ return this.TextView?._props.fieldKey;
}
@action setActiveHighlight(color: string) {
@@ -774,11 +774,11 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
// <div className="collectionMenu-divider" key="divider 3" />
// {[this.createMarksDropdown(this.activeFontSize, this.fontSizeOptions, "font size", action((val: string) => {
// this.activeFontSize = val;
- // SelectionManager.Views.map(dv => dv.props.Document._text_fontSize = val);
+ // SelectionManager.Views.map(dv => dv.Document._text_fontSize = val);
// })),
// this.createMarksDropdown(this.activeFontFamily, this.fontFamilyOptions, "font family", action((val: string) => {
// this.activeFontFamily = val;
- // SelectionManager.Views.map(dv => dv.props.Document._text_fontFamily = val);
+ // SelectionManager.Views.map(dv => dv.Document._text_fontFamily = val);
// })),
// <div className="collectionMenu-divider" key="divider 4" />,
// this.createNodesDropdown(this.activeListType, this.listTypeOptions, "list type", () => ({})),