mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(draw): when first time transfer to board mode, use page width as editor shape's width
This commit is contained in:
@@ -26,3 +26,13 @@ export const useCurrentEditors = () => {
|
||||
setCurrentEditors,
|
||||
};
|
||||
};
|
||||
|
||||
// when first time transfer doc to board, need init the editor shape size to page size.
|
||||
const _pageClientWidth = atom<number>(1020);
|
||||
export const usePageClientWidth = () => {
|
||||
const [pageClientWidth, setPageClientWidth] = useAtom(_pageClientWidth);
|
||||
return {
|
||||
pageClientWidth,
|
||||
setPageClientWidth,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user