|
on zen mode entry:
- start layout
- automatic centering mode: every tick adjust the scale and translation
to fit the visible nodes
if user drags or wheels out
cancel automatic centering mode
(layout keeps updating regardless)
implementation details: additional state 'zen_mode__auto_center' and
additional handlers for wheel and mousedown. Better to have a single
flow in the future:
{mouse wheel event, mouse down event) -> update zen_mode__auto_center (or have implicit
state via bacon) -> d3 zoom behavior
|