mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
fix(editor): error rotation of highlight element in frame (#10737)
This PR fixed frame rotation by converting degrees to radians
This commit is contained in:
@@ -121,7 +121,7 @@ export class FrameOverlay extends Overlay {
|
||||
this._innerElements.forEach(element => {
|
||||
const [x, y, w, h] = deserializeXYWH(element.xywh);
|
||||
ctx.translate(x + w / 2, y + h / 2);
|
||||
ctx.rotate(element.rotate);
|
||||
ctx.rotate((element.rotate * Math.PI) / 180);
|
||||
ctx.roundRect(-w / 2, -h / 2, w, h, radius);
|
||||
ctx.translate(-x - w / 2, -y - h / 2);
|
||||
ctx.stroke();
|
||||
|
||||
Reference in New Issue
Block a user