Update extension logic to sync user's mouse movement with grid change amount
[🎨Component] Change logic in handleExtension to make grid change sync with user's mouse movement
Previously the grid change was based on incremental offset amount.
This approach made grid change happen even though the user's mouse is at the opposite direction of the current selected extension direction, eventually making the user's mouse movement and grid change amount not sync.
I updated the handleExtension callback to change grid amount according to the difference between grid size of data layer and interaction layer.
[🔗Other] Simplify code for handleExtension
I also simplified the code in handleExtension while changing the logic.
🚀 [Related Issue: #66 ]
Preview
Previous Version (the user's mouse movement and grid change does not sync)
https://github.com/hunkim98/dotting/assets/57612141/b619402b-f345-4982-acdb-14708f55a83b
Updated Version (the user's mouse movement and grid change sync)
https://github.com/hunkim98/dotting/assets/57612141/992d05fb-523b-4fb4-a87a-3f4bf7b23fca
Changes
Update extension logic to sync user's mouse movement with grid change amount
[🎨Component] Change logic in
handleExtension
to make grid change sync with user's mouse movementhandleExtension
callback to change grid amount according to the difference between grid size of data layer and interaction layer.[🔗Other] Simplify code for
handleExtension
handleExtension
while changing the logic.Notes
Next Up?