mirror of https://github.com/fantasticit/think.git
client: enable update in editor
This commit is contained in:
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