mirror of
https://github.com/fantasticit/think.git
synced 2026-10-31 07:09:04 +08:00
client: enable update in editor
This commit is contained in:
@@ -22,13 +22,15 @@ export const useEditor = (options: Partial<EditorOptions> = {}, deps: Dependency
|
||||
|
||||
setEditor(instance);
|
||||
|
||||
// instance.on('transaction', () => {
|
||||
// requestAnimationFrame(() => {
|
||||
// requestAnimationFrame(() => {
|
||||
// forceUpdate();
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
if (!options.editable) {
|
||||
instance.on('transaction', () => {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
forceUpdate();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return () => {
|
||||
instance.destroy();
|
||||
|
||||
Reference in New Issue
Block a user