aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx8
-rw-r--r--src/client/views/collections/collectionFreeForm/FormatShapePane.tsx2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 533c8bffe..75a4bda14 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -793,10 +793,10 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
let scaling = 1;
if (!this.layoutDoc?._fitWidth && (!nativeW || !nativeH)) {
scaling = 1;
- } else if ((this.layoutDoc?._fitWidth) ||
- this._panelHeight / NumCast(this.layoutDoc!._nativeHeight) > this._panelWidth / NumCast(this.layoutDoc!._nativeWidth)) {
+ } else if (NumCast(this.layoutDoc!._nativeWidth) && ((this.layoutDoc?._fitWidth) ||
+ this._panelHeight / NumCast(this.layoutDoc!._nativeHeight) > this._panelWidth / NumCast(this.layoutDoc!._nativeWidth))) {
scaling = this._panelWidth / NumCast(this.layoutDoc!._nativeWidth);
- } else {
+ } else if (nativeW && nativeH) {
// if (this.layoutDoc!.type === DocumentType.PDF || this.layoutDoc!.type === DocumentType.WEB) {
// if ((this.layoutDoc?._fitWidth) ||
// this._panelHeight / NumCast(this.layoutDoc!._nativeHeight) > this._panelWidth / NumCast(this.layoutDoc!._nativeWidth)) {
@@ -807,7 +807,7 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
// }
const wscale = this.panelWidth() / nativeW;
scaling = wscale * nativeH > this._panelHeight ? this._panelHeight / nativeH : wscale;
- }
+ } else scaling = 1;
return scaling;
}
diff --git a/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx b/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx
index e805f9282..c53e4de0f 100644
--- a/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx
+++ b/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx
@@ -290,7 +290,6 @@ export default class FormatShapePane extends AntimodeMenu {
@undoBatch
@action
control = (xDiff: number, yDiff: number, controlNum: number) => {
- // console.log(controlNum, ink.length);
this.selectedInk?.forEach(action(inkView => {
if (this.selectedInk?.length === 1) {
const doc = Document(inkView.rootDoc);
@@ -298,7 +297,6 @@ export default class FormatShapePane extends AntimodeMenu {
const ink = Cast(doc.data, InkField)?.inkData;
if (ink) {
-
const newPoints: { X: number, Y: number }[] = [];
const order = controlNum % 4;
for (var i = 0; i < ink.length; i++) {