From 0ea3c5b643a50de9cea673b769f5514fcef5d86b Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 23 Jul 2020 10:25:00 -0400 Subject: fixed very slow resize performance caused by fetchinProto when there are no acl's. made images not be natively draggable. --- src/client/views/nodes/ImageBox.tsx | 9 +++++---- src/fields/util.ts | 5 ----- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 4eba21eab..5f689624c 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -158,6 +158,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent this.layoutDoc.isBackground = true, icon: "expand-arrows-alt" }); if (!Doc.UserDoc().noviceMode) { funcs.push({ description: "Export to Google Photos", event: () => GooglePhotos.Transactions.UploadImages([this.props.Document]), icon: "caret-square-right" }); funcs.push({ description: "Copy path", event: () => Utils.CopyText(field.url.href), icon: "expand-arrows-alt" }); @@ -315,7 +316,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent { const remoteUrl = this.dataDoc.googlePhotosUrl; - return !remoteUrl ? (null) : ( { @@ -415,7 +416,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent @@ -423,7 +424,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent} diff --git a/src/fields/util.ts b/src/fields/util.ts index 81ccbf6d9..20b072786 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -130,11 +130,6 @@ export function setGroups(groups: string[]) { export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number): symbol { if (in_prop === UpdatingFromServer || target[UpdatingFromServer]) return AclEdit; - if (!target[AclSym] && target instanceof Doc) { - fetchProto(target); - } - - if (target[AclSym] && Object.keys(target[AclSym]).length) { if (target.__fields?.author === Doc.CurrentUserEmail || target.author === Doc.CurrentUserEmail || currentUserGroups.includes("admin")) return AclEdit; -- cgit v1.2.3-70-g09d2