aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-09 16:59:09 -0400
committerbobzel <zzzman@gmail.com>2022-06-09 16:59:09 -0400
commit140e2f643f97057ba9c89c502cff7843bd738cd6 (patch)
tree033330390616fde7a6b3797f2a71153e28939e51 /src/client/views/collections/collectionFreeForm
parent8ef0c6c08bd9c2e3654477b039686bab6b0ff991 (diff)
fixed issues with taking dashboard snapshots to update dashboard view
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index f4d2d55d5..ef3a896e1 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1532,7 +1532,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
const htmlString = new XMLSerializer().serializeToString(newDiv);
const nativeWidth = width;
const nativeHeight = height;
- CreateImage(
+ return CreateImage(
Utils.prepend(""),
document.styleSheets,
htmlString,
@@ -1540,11 +1540,9 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
nativeWidth * panelHeight / panelWidth,
scrollTop
).then
- ((data_url: any) => {
- VideoBox.convertDataUri(data_url, filename).then(
- returnedfilename => setTimeout(() => {
- cb(returnedfilename as string, nativeWidth, nativeHeight);
- }, 500));
+ (async (data_url: any) => {
+ const returnedFilename = await VideoBox.convertDataUri(data_url, filename);
+ cb(returnedFilename as string, nativeWidth, nativeHeight);
})
.catch(function (error: any) {
console.error('oops, something went wrong!', error);