diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx | 126 | ||||
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 5 |
2 files changed, 68 insertions, 63 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx index 8273f3e09..07d3c3e9c 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx @@ -793,8 +793,8 @@ export class DocCreatorMenu extends ObservableReactComponent<FieldViewProps> { _layout_borderRounding: `${template.opts.cornerRounding}px` ?? '0px', borderWidth: template.opts.borderWidth, borderColor: template.opts.borderColor, - x: 400, - y: 400, + x: 40000, + y: 40000, }); const mainCollection = this._dataViz?.DocumentView?.().containerViewPath?.().lastElement()?.ComponentView as CollectionFreeFormView; @@ -1670,8 +1670,8 @@ export class TemplateLayouts { return TemplateLayouts.FourField001; case 'fourfield2': return TemplateLayouts.FourField002; - case 'fourfield3': - return TemplateLayouts.FourField003; + // case 'fourfield3': + // return TemplateLayouts.FourField003; case 'fourfield4': return TemplateLayouts.FourField004; case 'threefield1': @@ -1838,65 +1838,65 @@ export class TemplateLayouts { ] }; - public static FourField003: TemplateDocInfos = { - title: 'fourfield3', - width: 477, - height: 662, - opts: { - backgroundColor: '#9E9C95' - }, - fields: [{ - tl: [-.875, -.9], - br: [.875, .7], - types: [TemplateFieldType.VISUAL], - sizes: [TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], - description: '', - opts: { - borderWidth: '15', - borderColor: '#E0E0DA', - } - }, { - tl: [-.95, .8], - br: [-.1, .95], - types: [TemplateFieldType.TEXT], - sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], - description: '', - opts: { - backgroundColor: 'transparent', - color: 'white', - contentXCentering: 'h-right', - } - }, { - tl: [.1, .8], - br: [.95, .95], - types: [TemplateFieldType.TEXT], - sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], - description: '', - opts: { - backgroundColor: 'transparent', - color: 'red', - fontTransform: 'uppercase', - contentXCentering: 'h-left' - } - }, { - tl: [0, -.9], - br: [.85, -.66], - types: [TemplateFieldType.TEXT, TemplateFieldType.VISUAL], - sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], - description: '', - opts: { - backgroundColor: 'transparent', - contentXCentering: 'h-right' - } - }], - decorations: [{ - tl: [-.025, .8], - br: [.025, .95], - opts: { - backgroundColor: '#E0E0DA', - } - }] - }; + // public static FourField003: TemplateDocInfos = { + // title: 'fourfield3', + // width: 477, + // height: 662, + // opts: { + // backgroundColor: '#9E9C95' + // }, + // fields: [{ + // tl: [-.875, -.9], + // br: [.875, .7], + // types: [TemplateFieldType.VISUAL], + // sizes: [TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], + // description: '', + // opts: { + // borderWidth: '15', + // borderColor: '#E0E0DA', + // } + // }, { + // tl: [-.95, .8], + // br: [-.1, .95], + // types: [TemplateFieldType.TEXT], + // sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], + // description: '', + // opts: { + // backgroundColor: 'transparent', + // color: 'white', + // contentXCentering: 'h-right', + // } + // }, { + // tl: [.1, .8], + // br: [.95, .95], + // types: [TemplateFieldType.TEXT], + // sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], + // description: '', + // opts: { + // backgroundColor: 'transparent', + // color: 'red', + // fontTransform: 'uppercase', + // contentXCentering: 'h-left' + // } + // }, { + // tl: [0, -.9], + // br: [.85, -.66], + // types: [TemplateFieldType.TEXT, TemplateFieldType.VISUAL], + // sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], + // description: '', + // opts: { + // backgroundColor: 'transparent', + // contentXCentering: 'h-right' + // } + // }], + // decorations: [{ + // tl: [-.025, .8], + // br: [.025, .95], + // opts: { + // backgroundColor: '#E0E0DA', + // } + // }] + // }; public static FourField004: TemplateDocInfos = { title: 'fourfield4', diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index e091657a8..5095da1c4 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1425,6 +1425,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB _didScroll = false; _scrollStopper: undefined | (() => void); setupEditor(config: any, fieldKey: string) { + try { const curText = Cast(this.dataDoc[this.fieldKey], RichTextField, null) || StrCast(this.dataDoc[this.fieldKey]); const rtfField = Cast((!curText && this.layoutDoc[this.fieldKey]) || this.dataDoc[fieldKey], RichTextField); if (this.ProseRef) { @@ -1520,6 +1521,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB pdfAnchorId && this.addPdfReference(pdfAnchorId); } if (this._props.autoFocus) setTimeout(() => this._editorView!.focus()); // not sure why setTimeout is needed but editing dashFieldView's doesn't work without it. + } catch (e) { + console.log(e); + } } // add user mark for any first character that was typed since the user mark that gets set in KeyPress won't have been called yet. @@ -2126,6 +2130,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB </div> </div> ); + } } |