aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-01 12:55:59 -0400
committerbobzel <zzzman@gmail.com>2024-09-01 12:55:59 -0400
commita958577d4c27b276aa37484e3f895e196138b17c (patch)
tree6a9ca7b34ce3de02130b533dabc5f201f3527186 /src/client
parentb235e116167a06b6d36e2962dd3f610839f18974 (diff)
consolidated image resampling. fixed importing zipped workspace.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/views/PropertiesButtons.tsx20
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx4
-rw-r--r--src/client/views/nodes/PDFBox.tsx4
4 files changed, 3 insertions, 27 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index f346d4ba8..f96a4a255 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -246,26 +246,6 @@ export class PropertiesButtons extends React.Component {
// );
// }
- // @computed get freezeThumb() {
- // return this.propertyToggleBtn(
- // 'FreezeThumb',
- // '_thumb-frozen',
- // on => `${on ? 'Freeze' : 'Unfreeze'} thumbnail`,
- // on => 'snowflake',
- // (dv, doc) => {
- // if (doc['thumb-frozen']) doc['thumb-frozen'] = undefined;
- // else {
- // document.body.focus(); // so that we can access the clipboard without an error
- // setTimeout(() =>
- // pasteImageBitmap((data_url: any, error: any) => {
- // error && console.log(error);
- // data_url && Utils.convertDataUri(data_url, doc[Id] + '-thumb-frozen', true).then(returnedfilename => (doc['thumb-frozen'] = new ImageField(returnedfilename)));
- // })
- // );
- // }
- // }
- // );
- // }
@computed get snapButton() {
// THESE ARE NOT COMING
return this.propertyToggleBtn(
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index c4cf8dee7..dbf781e63 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1811,7 +1811,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
const contentDiv = this.DocumentView?.().ContentDiv;
contentDiv &&
UpdateIcon(
- this.layoutDoc[Id] + '-icon' + new Date().getTime(),
+ this.layoutDoc[Id] + '_icon_' + new Date().getTime(),
contentDiv,
NumCast(this.layoutDoc._width),
NumCast(this.layoutDoc._height),
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 6cc75aa4b..ccb6bc9be 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -160,8 +160,8 @@ export class MarqueeView extends ObservableReactComponent<SubCollectionViewProps
pasteImageBitmap((data: any, error: any) => {
error && console.log(error);
data &&
- ClientUtils.convertDataUri(data, this._props.Document[Id] + '-thumb-frozen').then(returnedfilename => {
- this._props.Document['thumb-frozen'] = new ImageField(returnedfilename);
+ ClientUtils.convertDataUri(data, this._props.Document[Id] + '_icon_' + new Date().getTime()).then(returnedfilename => {
+ this._props.Document[DocData].icon = new ImageField(returnedfilename);
});
})
);
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index b17275a1e..cb0b0d71f 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -56,10 +56,6 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
@computed get pdfUrl() {
return Cast(this.dataDoc[this._props.fieldKey], PdfField);
}
- @computed get pdfThumb() {
- return ImageCast(this.layoutDoc['thumb-frozen'], ImageCast(this.layoutDoc.thumb))?.url;
- }
-
constructor(props: FieldViewProps) {
super(props);
makeObservable(this);