diff options
author | bobzel <zzzman@gmail.com> | 2025-04-10 23:17:20 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-04-10 23:17:20 -0400 |
commit | fea8bcb6264946b29775394c554d47577bb5995b (patch) | |
tree | 822b81b6dc69d2386592367cf2334e888c572616 /src | |
parent | eef391dba5ee9f1588274f8719eb4047fe844e22 (diff) |
fixed instantiate from : menu to delgate templates instead of copying.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/documents/DocUtils.ts | 2 | ||||
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts index 0d15a91e9..5a8230847 100644 --- a/src/client/documents/DocUtils.ts +++ b/src/client/documents/DocUtils.ts @@ -380,7 +380,7 @@ export namespace DocUtils { .map(dragDoc => ({ description: ':' + StrCast(dragDoc.title).replace('Untitled ', ''), event: undoable(() => { - const newDoc = DocUtils.copyDragFactory(dragDoc); + const newDoc = (Doc.isTemplateDoc(dragDoc) ? DocUtils.delegateDragFactory : DocUtils.copyDragFactory)(dragDoc); if (newDoc) { newDoc._author = ClientUtils.CurrentUserEmail(); newDoc.x = x; diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 1c0f11c91..35dc5f1c7 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -278,7 +278,7 @@ export class CurrentUserUtils { MakeTemplate(Docs.Create.RTFDocument(new RichTextField(JSON.stringify(json), ""), { ...opts, title: "MetaNote", layout:`<HTMLdiv transformOrigin='top left' width='100%' height='100%'> <FormattedTextBox {...props} dontScale='true' fieldKey={'text'} height='calc(100% - ${metadataBtnHght}px - {this._header_height||0}px)' /> - <FormattedTextBox {...props} dontScale='true' fieldKey={'header'} dontSelectOnLoad='true' ignoreAutoHeight='true' fontSize='{this._header_fontSize||9}px' height='{(this._header_height||0)}px' backgroundColor='{this._header_color || "lightGray"}' /> + <FormattedTextBox {...props} noSidebar='true' dontScale='true' fieldKey={'header'} dontSelectOnLoad='true' ignoreAutoHeight='true' fontSize='{this._header_fontSize||9}px' height='{(this._header_height||0)}px' backgroundColor='{this._header_color || "lightGray"}' /> <HTMLdiv fontSize='${metadataBtnHght - 1}px' height='${metadataBtnHght}px' backgroundColor='yellow' onClick={‘(this._header_height=(this._header_height===0?50:0)) + (this._layout_autoHeightMargins=this._header_height ? this._header_height+${metadataBtnHght}:0)’} > Metadata </HTMLdiv> |