Skip to content
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

feat(draw): support rotate resize #WIK-14735 #773

Merged
merged 14 commits into from
Mar 21, 2024
Merged

Conversation

MissLixf
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plait ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2024 3:58am
plait-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2024 3:58am

packages/common/src/core/image-base.component.ts Outdated Show resolved Hide resolved
packages/core/src/constants/cursor.ts Outdated Show resolved Hide resolved
packages/core/src/utils/element.ts Outdated Show resolved Hide resolved
packages/core/src/utils/element.ts Outdated Show resolved Hide resolved
packages/core/src/utils/element.ts Outdated Show resolved Hide resolved
packages/core/src/utils/element.ts Outdated Show resolved Hide resolved
packages/core/src/utils/element.ts Outdated Show resolved Hide resolved
packages/core/src/utils/element.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-geometry-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Outdated Show resolved Hide resolved
packages/draw/src/plugins/with-draw-resize.ts Show resolved Hide resolved
return movePointByZoomAndOriginPoint(p, originPoint, resizeAlignRef.xZoom, resizeAlignRef.yZoom);
}) as [Point, Point];
const adjustTargetPoints = points.map(p => [
p[0] + bulkRotationRef!.offsetX,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要加 ! 号,前面有 if 判断

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我也这么觉得,但是不加就会报错
image

packages/draw/src/plugins/with-draw-resize.ts Show resolved Hide resolved
const { originPoint, handlePoint } = getResizeOriginPointAndHandlePoint(board, resizeRef);
const angle = getSelectionAngle(resizeRef.element);
let bulkRotationRef: BulkRotationRef | undefined;
if (angle) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的三个判断可以写在一起

@pubuzhixing8 pubuzhixing8 merged commit 3c27329 into develop Mar 21, 2024
3 checks passed
@pubuzhixing8 pubuzhixing8 deleted the #WIK-14735 branch March 21, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants