mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
refactor(editor): move export manager to surface block extensions (#10231)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { clamp } from '@blocksuite/global/utils';
|
||||
|
||||
import { GRID_GAP_MAX, GRID_GAP_MIN } from '../consts';
|
||||
|
||||
export function getBgGridGap(zoom: number) {
|
||||
const step = zoom < 0.5 ? 2 : 1 / (Math.floor(zoom) || 1);
|
||||
const gap = clamp(20 * step * zoom, GRID_GAP_MIN, GRID_GAP_MAX);
|
||||
|
||||
return gap;
|
||||
}
|
||||
@@ -34,6 +34,7 @@ export function normalizeWheelDeltaY(delta: number, zoom = 1) {
|
||||
}
|
||||
|
||||
export { addNote, addNoteAtPoint } from './add-note';
|
||||
export { getBgGridGap } from './get-bg-grip-gap';
|
||||
export { getLastPropsKey } from './get-last-props-key';
|
||||
export { getSurfaceBlock } from './get-surface-block';
|
||||
export * from './mindmap/style-svg.js';
|
||||
|
||||
Reference in New Issue
Block a user