fix(sticky): fixed-size creation, shared presets module, live resize sync
Fixes three review findings: 1. Sticky creation no longer zoom-adapts — always creates at M preset (28px/260w) in world space. Consistent at any zoom level. 2. Preset definitions extracted to stickyPresets.ts (shared domain module). TextFormatToolbar and tools.ts both import from there — no more canvas→component dependency inversion. 3. TextEditor.onLiveResize callback syncs spatial index and transform box as sticky background grows during typing.
This commit is contained in:
@@ -130,6 +130,9 @@ export function useCanvasSetup(deps: CanvasSetupDeps) {
|
||||
}
|
||||
syncRef.current?.broadcastElements([item.id]);
|
||||
onCanvasChange();
|
||||
}, (resizedItem) => {
|
||||
scene.updateSpatialEntry(resizedItem);
|
||||
selection.transformBox.update([resizedItem]);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user