We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description:
Simultaneously record and pass the tree change and selection within the update () function.
doc.update((root) => { root.tree.edit(0, 0, ...); root.selection = root.tree.createRange(0, 0); // TreeRange (CRDT) }); doc.subscribe('$.tree', (event) => { if (event.type === 'remote-change') { const { actor, ops, presence } = event.value; const root = doc.getRoot(); root.tree.rangeToIndex(root.selection); // [0, 0] root.tree.rangeToPath(root.selection); // [[0, 0], [0, 1]] } });
Why:
It will be possible to synchronize tree selection information without any special implementation.
The text was updated successfully, but these errors were encountered:
easylogic
Successfully merging a pull request may close this issue.
Description:
Simultaneously record and pass the tree change and selection within the update () function.
Why:
It will be possible to synchronize tree selection information without any special implementation.
The text was updated successfully, but these errors were encountered: