mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(editor): insertion and duplication actions for embed synced doc (#11852)
Close [BS-3068](https://linear.app/affine-design/issue/BS-3068/在edgeless-的embed-doc-block上,增加-insert-into-page的选项,类似frame) Close [BS-3069](https://linear.app/affine-design/issue/BS-3069/edgeless下的-embed,覆盖现在的edit行为-,暂定叫做duplicate-into-a-note,复制一个-note)
This commit is contained in:
@@ -1942,3 +1942,12 @@ export async function waitFontsLoaded(page: Page) {
|
||||
return edgelessBlock.fontLoader?.ready;
|
||||
});
|
||||
}
|
||||
|
||||
export function isIntersected(
|
||||
bound1: [number, number, number, number],
|
||||
bound2: [number, number, number, number]
|
||||
) {
|
||||
const [x1, y1, w1, h1] = bound1;
|
||||
const [x2, y2, w2, h2] = bound2;
|
||||
return x1 < x2 + w2 && x1 + w1 > x2 && y1 < y2 + h2 && y1 + h1 > y2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user