diff options
author | Eric <ericmabr@gmail.com> | 2023-08-26 16:23:19 -0400 |
---|---|---|
committer | Eric <ericmabr@gmail.com> | 2023-08-26 16:23:19 -0400 |
commit | 1ef04d7deab76558e69fa251ff71d37d4033d567 (patch) | |
tree | d7bd88f2c2d44e7eb6d9f1b102923b47617cb169 /src/client/views/nodes/ImageBox.tsx | |
parent | 5c6eaeffb93af172ca9e33b76fd2301d29366578 (diff) | |
parent | 8f43a98c363ff541070b100a2d4e10e505df6969 (diff) |
Merge branch 'UI_Update_Eric_Ma' of https://github.com/brown-dash/Dash-Web into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 2c8e97512..f5c6a9273 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -59,8 +59,12 @@ export class ImageBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp @observable public static imageEditorOpen: boolean = false; @observable public static imageEditorSource: string = ''; @observable public static addDoc: ((doc: Doc | Doc[], annotationKey?: string) => boolean) | undefined; - @action public static setImageEditorOpen(open: boolean) {ImageBox.imageEditorOpen = open;} - @action public static setImageEditorSource(source: string) {ImageBox.imageEditorSource = source;} + @action public static setImageEditorOpen(open: boolean) { + ImageBox.imageEditorOpen = open; + } + @action public static setImageEditorSource(source: string) { + ImageBox.imageEditorSource = source; + } private _ignoreScroll = false; private _forcedScroll = false; private _dropDisposer?: DragManager.DragDropDisposer; @@ -307,7 +311,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp } choosePath(url: URL) { - if (!url?.href) return ""; + if (!url?.href) return ''; const lower = url.href.toLowerCase(); if (url.protocol === 'data') return url.href; if (url.href.indexOf(window.location.origin) === -1 && url.href.indexOf('dashblobstore') === -1) return Utils.CorsProxy(url.href); |