fix: update crop tool max sizes - 2000x1200

This commit is contained in:
2026-09-18 18:00:52 +05:00
parent 393f1a6835
commit becf03f416
3 changed files with 39 additions and 33 deletions
+6 -6
View File
@@ -1,10 +1,10 @@
import { ToolError } from "../core/errors";
import {
rotateFreeImage,
skewImage,
transformImage,
zoomImage,
} from "../core/affine";
import { ToolError } from "../core/errors";
import {
centerByAlpha,
changeCanvasSize,
@@ -249,22 +249,22 @@ export const cropSchema = toolSchema<CropParams>(
{
x: field.number({
label: "fields.x",
min: -100000,
max: 100000,
min: 0,
max: 2000,
step: 1,
default: 0,
}),
y: field.number({
label: "fields.y",
min: -100000,
max: 100000,
min: 0,
max: 1200,
step: 1,
default: 0,
}),
size: field.dimension({
label: "fields.cropAreaSize",
min: 0,
max: 100000,
max: 2000,
width: 0,
height: 0,
}),
+26 -26
View File
@@ -1,27 +1,27 @@
import type { ToolEntry } from "../registry";
import { ToolError } from "../../core/errors";
import {
crop,
expandCanvas,
flip,
resize,
rotate90,
tile,
centerByAlpha,
changeCanvasSize,
cropToRatio,
forceOrientation,
padToRatio,
symmetricCopy,
trimToContent,
type Anchor9,
} from "../../core/geometry";
import {
rotateFreeImage,
skewImage,
transformImage,
zoomImage,
} from "../../core/affine";
import { ToolError } from "../../core/errors";
import {
centerByAlpha,
changeCanvasSize,
crop,
cropToRatio,
expandCanvas,
flip,
forceOrientation,
padToRatio,
resize,
rotate90,
symmetricCopy,
tile,
trimToContent,
type Anchor9,
} from "../../core/geometry";
import type { ToolEntry } from "../registry";
import { num, str } from "../registry-helpers";
export function geometryEntries(): ToolEntry[] {
@@ -90,8 +90,8 @@ export function geometryEntries(): ToolEntry[] {
id: "x",
label: "X (from left)",
type: "number",
min: -100000,
max: 100000,
min: -0,
max: 2000,
step: 1,
default: 0,
},
@@ -99,8 +99,8 @@ export function geometryEntries(): ToolEntry[] {
id: "y",
label: "Y (from top)",
type: "number",
min: -100000,
max: 100000,
min: 0,
max: 1200,
step: 1,
default: 0,
},
@@ -108,8 +108,8 @@ export function geometryEntries(): ToolEntry[] {
id: "width",
label: "Area width",
type: "number",
min: -100000,
max: 100000,
min: 0,
max: 2000,
step: 1,
default: 0,
},
@@ -117,8 +117,8 @@ export function geometryEntries(): ToolEntry[] {
id: "height",
label: "Area height",
type: "number",
min: -100000,
max: 100000,
min: 0,
max: 1200,
step: 1,
default: 0,
},