diff options
| author | eleanor-park <eleanor_park@brown.edu> | 2025-01-09 11:19:33 -0500 |
|---|---|---|
| committer | eleanor-park <eleanor_park@brown.edu> | 2025-01-09 11:19:33 -0500 |
| commit | 2a24d77845d6c1d4f0730a9427572033c506b14c (patch) | |
| tree | 3572df483114b7c381e699c5ad55935db586a923 /src/client | |
| parent | 51a9f85b4ddc38ac825efcefc0c6db23f3b9914e (diff) | |
| parent | dd0526a0a256fb3f1de9e0a2508566adcd6cd7e9 (diff) | |
Merge branch 'eleanor-gptdraw' of https://github.com/brown-dash/Dash-Web into eleanor-gptdraw
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/Network.ts | 2 | ||||
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 4 | ||||
| -rw-r--r-- | src/client/views/smartdraw/DrawingFillHandler.tsx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/client/Network.ts b/src/client/Network.ts index 9afdc844f..3b0406141 100644 --- a/src/client/Network.ts +++ b/src/client/Network.ts @@ -15,7 +15,7 @@ export namespace Networking { return (await fetch(relativeRoute)).text(); } - export async function PostToServer(relativeRoute: string, body?: unknown) { + export function PostToServer(relativeRoute: string, body?: unknown) { const options = { uri: ClientUtils.prepend(relativeRoute), method: 'POST', diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx index ddc50871d..5524fedb3 100644 --- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx +++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx @@ -586,7 +586,7 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps /** * When this is called, returns the list of documents that have been selected by the marquee box. */ - marqueeSelect(selectBackgrounds: boolean = false, docType: DocumentType | undefined = undefined) { + marqueeSelect = (selectBackgrounds: boolean = false, docType: DocumentType | undefined = undefined) => { const selection: Doc[] = []; const selectFunc = (doc: Doc) => { const layoutDoc = Doc.Layout(doc); @@ -619,7 +619,7 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps .filter(doc => doc.z !== undefined) .map(selectFunc); return selection; - } + }; @computed get marqueeDiv() { const cpt = this._lassoFreehand || !this._visible ? [0, 0] : [this._downX < this._lastX ? this._downX : this._lastX, this._downY < this._lastY ? this._downY : this._lastY]; diff --git a/src/client/views/smartdraw/DrawingFillHandler.tsx b/src/client/views/smartdraw/DrawingFillHandler.tsx index 43d16df89..423e3b2ac 100644 --- a/src/client/views/smartdraw/DrawingFillHandler.tsx +++ b/src/client/views/smartdraw/DrawingFillHandler.tsx @@ -38,8 +38,8 @@ export class DrawingFillHandler { { prompt: `${user_prompt}, ${prompt}`, width: dims.width, height: dims.height, structureUrl, strength, styles }) .then((info: Upload.ImageInformation) => DocumentViewInternal.addDocTabFunc(Docs.Create.ImageDocument(info.accessPaths.agnostic.client, - { ai: 'firefly', ai_firefly_prompt: user_prompt || prompt, nativeWidth: dims.width, nativeHeight: dims.height }), OpenWhere.addRight) - ); // prettier-ignore + { ai: 'firefly', ai_firefly_prompt: user_prompt || prompt, _width: 500, data_nativeWidth: info.nativeWidth, data_nativeHeight: info.nativeHeight }), OpenWhere.addRight) + ).catch(e => alert("create image failed: " + e.toString())); // prettier-ignore }); } return false; |
