aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-30 13:10:54 -0400
committerbobzel <zzzman@gmail.com>2020-08-30 13:10:54 -0400
commit561a8d0bd130ea5c1fd68a4dd2344f0333d388cc (patch)
treed9b932529c86c26661967f573b26cbf9c2177f60 /src/client/views/DocumentDecorations.tsx
parente8856332c19abe12fe43c940e35b49ab77aae612 (diff)
fixed importBox upload to give feedback, share code. fixed stacking autoHeight to happen immediately. fixed images to not need to request image information. changed doc decorations to change image native width. changed alert() when dropping on impermissibale doc. fixed allow dropping over images,etc. changed default image nativeSize to 900
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 6db5186ba..de87b8aa5 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -475,10 +475,10 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
doc[DataSym][fieldKey + "-nativeHeight"] = doc._nativeHeight = nheight = doc._height || 0;
}
const anno = Cast(doc.annotationOn, Doc, null);
- if (e.ctrlKey && anno) {
+ if (e.ctrlKey && (anno || doc.type === DocumentType.IMG)) {
dW !== 0 && runInAction(() => {
- const dataDoc = anno[DataSym];
- const annoFieldKey = Doc.LayoutFieldKey(anno);
+ const dataDoc = (anno ?? doc)[DataSym];
+ const annoFieldKey = Doc.LayoutFieldKey(anno ?? doc);
const nw = NumCast(dataDoc[annoFieldKey + "-nativeWidth"]);
const nh = NumCast(dataDoc[annoFieldKey + "-nativeHeight"]);
dataDoc[annoFieldKey + "-nativeWidth"] = nw + (dW > 0 ? 10 : -10);