-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify Snapshot Event to publish updated local changes (#923)
This commit improves snapshot event handling to maintain cursor position integrity. Previously, the cursor would briefly jump to the top of the document during snapshot events, particularly noticeable with backend-snapshot-threshold=1. Key changes: - Updated Snapshot Event to include most recent local changes - Modified CodeMirror example to preserve cursor position during snapshots - Improved synchronization between local state and snapshot data --------- Co-authored-by: Youngteac Hong <[email protected]> Co-authored-by: Yourim Cha <[email protected]>
- Loading branch information
1 parent
9a6ab62
commit 924ba4c
Showing
9 changed files
with
149 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import { type Text } from 'yorkie-js-sdk'; | ||
import { TextPosStructRange, type Text } from 'yorkie-js-sdk'; | ||
|
||
export type YorkieDoc = { | ||
content: Text; | ||
}; | ||
|
||
export type YorkiePresence = { | ||
selection?: TextPosStructRange; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.