diff options
author | bobzel <zzzman@gmail.com> | 2023-10-31 14:21:51 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-10-31 14:21:51 -0400 |
commit | cf95923feebb274249283c7bb82de5849060a9a8 (patch) | |
tree | b4aafffb6ae32d4386f6a4ddfc6b6b01c6e309ff /src/client/documents/Documents.ts | |
parent | a091c6142db5c1da94807abf14e78ed69e62f794 (diff) |
fixed keyframe animation of ink and links. fixed getDocumentview with preferred collection
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 5c913513a..4086ede20 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -670,7 +670,15 @@ export namespace Docs { { // NOTE: this is unused!! ink fields are filled in directly within the InkDocument() method layout: { view: InkingStroke, dataField: 'stroke' }, - options: { systemIcon: 'BsFillPencilFill', nativeDimModifiable: true, nativeHeightUnfrozen: true, layout_isSvg: true, layout_forceReflow: true }, + options: { + systemIcon: 'BsFillPencilFill', // + nativeDimModifiable: true, + nativeHeightUnfrozen: true, + layout_hideDecorationTitle: true, // don't show title when selected + fitWidth: false, + layout_isSvg: true, + layout_forceReflow: true, + }, }, ], [ @@ -1035,16 +1043,8 @@ export namespace Docs { } export function InkDocument(color: string, strokeWidth: number, stroke_bezier: string, fillColor: string, arrowStart: string, arrowEnd: string, dash: string, points: PointData[], isInkMask: boolean, options: DocumentOptions = {}) { - const I = new Doc(); - I[Initializing] = true; - I.type = DocumentType.INK; - I.layout = InkingStroke.LayoutString('stroke'); - I.nativeDimModifiable = true; - I.nativeHeightUnfrozen = true; - I.layout_isSvg = true; - I.layout_forceReflow = true; - I.layout_fitWidth = false; - I.layout_hideDecorationTitle = true; // don't show title when selected + const ink = InstanceFromProto(Prototypes.get(DocumentType.INK), '', { title: 'ink', ...options }); + const I = Doc.GetProto(ink); // I.layout_hideOpenButton = true; // don't show open full screen button when selected I.color = color; I.fillColor = fillColor; @@ -1056,8 +1056,6 @@ export namespace Docs { I.stroke_dash = dash; I.stroke_isInkMask = isInkMask; I.text_align = 'center'; - I.title = 'ink'; - I.author = Doc.CurrentUserEmail; I.rotation = 0; I.defaultDoubleClick = 'click'; I.author_date = new DateField(); @@ -1065,7 +1063,7 @@ export namespace Docs { //I['acl-Override'] = SharingPermissions.Unset; I[Initializing] = false; - return InstanceFromProto(I, '', options); + return ink; } export function PdfDocument(url: string, options: DocumentOptions = {}, overwriteDoc?: Doc) { |