aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-04-05 14:29:03 -0400
committerbobzel <zzzman@gmail.com>2025-04-05 14:29:03 -0400
commita3d6fae1482c61ca725d0a103f13b621aa32b3e3 (patch)
tree10a7bff8274f36466a41c3303e9c6f682c823590 /src/client/documents/Documents.ts
parent031a607100700f818f96b7fbf478f1b75292be9b (diff)
fixed multitoggle behavior to only toggle submenu closed. switched to hard-light for masking ink. fixed to make menu toggle take effect immediately.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 8458699fa..f1655e3cf 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -4,7 +4,6 @@ import { basename } from 'path';
import { ClientUtils, OmitKeys } from '../../ClientUtils';
import { DateField } from '../../fields/DateField';
import { CreateLinkToActiveAudio, Doc, FieldType, Opt, updateCachedAcls } from '../../fields/Doc';
-import { Initializing } from '../../fields/DocSymbols';
import { Id } from '../../fields/FieldSymbols';
import { HtmlField } from '../../fields/HtmlField';
import { InkField } from '../../fields/InkField';
@@ -983,26 +982,22 @@ export namespace Docs {
export function InkDocument(points: PointData[], options: DocumentOptions = {}, strokeWidth: number, color: string, strokeBezier: string, fillColor: string, arrowStart: string, arrowEnd: string, dash: string, isInkMask: boolean) {
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 && fillColor !== 'transparent' ? fillColor : undefined;
- I.stroke = new InkField(points);
- I.stroke_width = strokeWidth;
- I.stroke_bezier = strokeBezier;
- I.stroke_startMarker = arrowStart;
- I.stroke_endMarker = arrowEnd;
- I.stroke_dash = dash;
- I.stroke_isInkMask = isInkMask;
- I.text_align = 'center';
- I.rotation = 0;
- I.width_min = 1;
- I.height_min = 1;
- I.defaultDoubleClick = 'ignore';
- I.author_date = new DateField();
- I.acl_Guest = Doc.defaultAclPrivate ? SharingPermissions.None : SharingPermissions.View;
- // I.acl_Override = SharingPermissions.Unset;
- I[Initializing] = false;
+ ink.$color = color;
+ ink.$fillColor = fillColor && fillColor !== 'transparent' ? fillColor : undefined;
+ ink.$stroke = new InkField(points);
+ ink.$stroke_width = strokeWidth;
+ ink.$stroke_bezier = strokeBezier;
+ ink.$stroke_startMarker = arrowStart;
+ ink.$stroke_endMarker = arrowEnd;
+ ink.$stroke_dash = dash;
+ ink.$stroke_isInkMask = isInkMask;
+ ink.$text_align = 'center';
+ ink.$rotation = 0;
+ ink.$width_min = 1;
+ ink.$height_min = 1;
+ ink.$defaultDoubleClick = 'ignore';
+ ink.$author_date = new DateField();
+ ink.$acl_Guest = Doc.defaultAclPrivate ? SharingPermissions.None : SharingPermissions.View;
return ink;
}