This website requires JavaScript.
Explore
Drone CI
Help
Register
Sign In
akkartik
/
snap.love
Watch
1
Star
0
Fork
You've already forked snap.love
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
4bd3075a10
snap.love
/
0009-on.code_change
4 lines
91 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Merge template-live-editor
2022-12-24 04:39:54 +00:00
on.code_change = function()
reorg: be much more deliberate about mutable state on.draw no longer mutates anything but the screen. We now have levels of recomputation: * A: convert hierarchies of text (Page) into a flat array of shapes (Surface) * B: convert surface coordinates to viewport coordinates. * ..and lots of room to grow. Importantly, these levels are decoupled from on.* events. The level at which we start using viewport settings (B) is also responsible for updating the default font, a global setting used all over the place inside the editor widget. Hopefully we won't see bad box heights any more. We still have text rendering differently at different zoom levels, though.
2022-12-23 22:56:20 +00:00
print('code changed')
A() -- just in case we edited Page
end