aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/CollectionBaseView.tsx14
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx
index 73eb1fbbc..2da8c4e40 100644
--- a/src/client/views/collections/CollectionBaseView.tsx
+++ b/src/client/views/collections/CollectionBaseView.tsx
@@ -16,7 +16,7 @@ export enum CollectionViewType {
Schema,
Docking,
Tree,
- RealFreeform
+ // RealFreeform
}
export interface CollectionRenderProps {
@@ -40,12 +40,12 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> {
get collectionViewType(): CollectionViewType | undefined {
let Document = this.props.Document;
let viewField = Cast(Document.viewType, "number");
- if (viewField === CollectionViewType.Freeform) {
- return CollectionViewType.Tree;
- }
- if (viewField === CollectionViewType.RealFreeform) {
- return CollectionViewType.Freeform;
- }
+ // if (viewField === CollectionViewType.Freeform) {
+ // return CollectionViewType.Tree;
+ // }
+ // if (viewField === CollectionViewType.RealFreeform) {
+ // return CollectionViewType.Freeform;
+ // }
if (viewField !== undefined) {
return viewField;
} else {
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 264c89d67..956a5668a 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -211,7 +211,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
let [x, y] = this.getTransform().transformPoint(e.clientX, e.clientY);
let localTransform = this.getLocalTransform().inverse().scaleAbout(deltaScale, x, y);
- let safeScale = Math.abs(localTransform.Scale);
+ let safeScale = Math.max(0.002, localTransform.Scale);
this.props.Document.scale = Math.abs(safeScale);
this.setPan(-localTransform.TranslateX / safeScale, -localTransform.TranslateY / safeScale);
e.stopPropagation();