Skip to content

Commit

Permalink
fix(image): rect tool minWidth validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-Shen authored Jan 16, 2025
1 parent af945c2 commit aa1ffe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/image/src/tools/Rect.tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export class RectTool extends Tool<RectData, RectStyle, RectToolOptions> {
private _validate(data: RectData) {
const { config } = this;

const realWidth = data.width / axis!.scale;
const realHeight = data.height / axis!.scale;
const realWidth = data.width / axis!.initialBackgroundScale;
const realHeight = data.height / axis!.initialBackgroundScale;

if (realWidth < config.minWidth!) {
Tool.error({
Expand Down

0 comments on commit aa1ffe2

Please sign in to comment.