aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PreviewCursor.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-09-21 15:50:22 -0400
committerbobzel <zzzman@gmail.com>2022-09-21 15:50:22 -0400
commit4ae8a40f4c80025ded7696a03d9c3348b55bcbc5 (patch)
tree563c504a9dd373d4a9392b68ddf7fa7d87ea8aa8 /src/client/views/PreviewCursor.tsx
parent27d5a777eea8505319b4e6b41efbd7d2d5e75b3a (diff)
parentdc47762c9da3c867c5d76e23e32293fd0abeb5f4 (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
-rw-r--r--src/client/views/PreviewCursor.tsx21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx
index d56d2a310..119476210 100644
--- a/src/client/views/PreviewCursor.tsx
+++ b/src/client/views/PreviewCursor.tsx
@@ -6,6 +6,7 @@ import { Cast, NumCast, StrCast } from '../../fields/Types';
import { returnFalse } from '../../Utils';
import { DocServer } from '../DocServer';
import { Docs, DocumentOptions, DocUtils } from '../documents/Documents';
+import { ImageUtils } from '../util/Import & Export/ImageUtils';
import { Transform } from '../util/Transform';
import { undoBatch, UndoManager } from '../util/UndoManager';
import { FormattedTextBox } from './nodes/formattedText/FormattedTextBox';
@@ -109,16 +110,16 @@ export class PreviewCursor extends React.Component<{}> {
const re: any = /<img src="(.*?)"/g;
const arr: any[] = re.exec(e.clipboardData.getData('text/html'));
- undoBatch(() =>
- PreviewCursor._addDocument(
- Docs.Create.ImageDocument(arr[1], {
- _width: 300,
- title: arr[1],
- x: newPoint[0],
- y: newPoint[1],
- })
- )
- )();
+ undoBatch(() => {
+ const doc = Docs.Create.ImageDocument(arr[1], {
+ _width: 300,
+ title: arr[1],
+ x: newPoint[0],
+ y: newPoint[1],
+ });
+ ImageUtils.ExtractExif(doc);
+ PreviewCursor._addDocument(doc);
+ })();
} else if (e.clipboardData.items.length) {
const batch = UndoManager.StartBatch('collection view drop');
const files: File[] = [];