Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor): error rotation of highlight element in frame (#10737)

L-Sunc45abb013aae
diff --git a/blocksuite/affine/blocks/block-frame/src/frame-manager.ts b/blocksuite/affine/blocks/block-frame/src/frame-manager.ts
index 817708760e..929f079cfb 100644
--- a/blocksuite/affine/blocks/block-frame/src/frame-manager.ts
+++ b/blocksuite/affine/blocks/block-frame/src/frame-manager.ts
@@ -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();