fix: Adjust merge logic to rely on CRDT timestamps #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π μμ λ΄μ©
closes #188
π‘ μμΈν μ€λͺ
1. λκΈ°ν λ‘μ§ μμ
#sortedStrokes
λ°°μ΄ μΆκ°: μκ°μμΌλ‘ μ λ ¬λ μ€νΈλ‘ν¬λ€ κ΄λ¦¬findSortedInsertIndex
: μ λ ¬λ λ°°μ΄μ μλ‘μ΄ μ€νΈλ‘ν¬λ₯Ό μ½μ ν μΈλ±μ€ μ°Ύλ ν¨μinsertSortedStroke
: μ λ ¬λ λ°°μ΄μ μλ‘μ΄ μ€νΈλ‘ν¬ μ½μ λ° ν΄λΉ κ²°κ³Ό λ°ν (middle
orend
)insertSortedStroke
κ° λ°νν μ€νΈλ‘ν¬ μ½μ μμΉmiddle
/end
μ λ°λΌ λλ‘μ λ‘μ§ λ³κ²½λ¨2. λλ‘μ λ‘μ§ μμ
middle
μΈ κ²½μ°: redraw μνλ΄κ° λ°©κΈ κ·Έλ¦° κ·Έλ¦Όλ³΄λ€ λ λ¨Όμ κ·Έλ €μ§ κ·Έλ¦Όμ΄λ―λ‘
middle
μμΉμ μ½μ λμ΄μΌ νκ³ , λ°©κΈ κ·Έλ¦° κ·Έλ¦Όλ³΄λ€ μλμ κΉλ €μΌν¨end
μΈ κ²½μ°:strokeData.points.length
κ° 2λ³΄λ€ ν° κ²½μ°λFILL
λͺ¨λμΈ κ²½μ°μ β‘οΈ μ±μ°κΈ° operation μνstrokeData.points.length
κ° 2μ κ°κ±°λ μμ κ²½μ°λPEN
λͺ¨λμΈ κ²½μ°μ β‘οΈ μ€νΈλ‘ν¬ κ·Έλ¦¬κΈ° operation μν3. 보쑰 ν¨μ μΆκ°
createDrawingData
: style, timestamp μμ± μΆκ°ν΄μ£Όλ ν¨μrenderStroke
: μ€νΈλ‘ν¬ λ λλ§ λ‘μ§ μ€μν (redrawCanvas
/applyFill
/drawStroke
)π μ°Έκ³ μλ£ & ꡬν κ²°κ³Ό (μ ν)
timestamp κΈ°λ° λ³ν© λ‘μ§ λ°μ
μ
2024-12-03.3.00.40.mov
timestamp κΈ°λ° λ³ν© λ‘μ§ λ°μ
ν
2024-12-03.3.19.10.mov
π’ 리뷰 μꡬ μ¬ν (μ ν)
π© νμ μμ (μ ν)
β μ ν 체ν¬λ¦¬μ€νΈ
main
μ΄ μλλλ€.)