-
Notifications
You must be signed in to change notification settings - Fork 1
Imagekit Editor improvements #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Imagekit Editor improvements #5
Conversation
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7663b96035
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if (focus === "coordinates") { | ||
| // Handle coordinate-based focus | ||
| // x/y are top-left coordinates, xc/yc are center coordinates | ||
| if (x) transforms.x = x | ||
| if (y) transforms.y = y | ||
| if (xc) transforms.xc = xc | ||
| if (yc) transforms.yc = yc | ||
| if (coordinateMethod === "topleft") { | ||
| if (x) transforms.x = x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve focus coordinates when coordinateMethod is absent
This new gating on coordinateMethod means existing transformations saved before this change (which only stored focus: "coordinates" plus x/y or xc/yc) will no longer emit any coordinates unless coordinateMethod is set. In that case the formatter will silently drop the stored coordinates and the resulting crop will fall back to default positioning. Consider defaulting the branch when coordinateMethod is undefined (e.g., use x/y if present, otherwise xc/yc) to keep backward compatibility. The same pattern appears again in the imageLayer formatter.
Useful? React with 👍 / 👎.
No description provided.