mirror of https://github.com/fantasticit/think.git
client: enable update in editor
parent
e395897cc9
commit
9fd00a2d55
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue