@mocanvas/store · function
declare function setIndexJitterEnabled(enabled: boolean | null): voidTurn jitter on or off for the rest of this process; null restores the
default resolution above.
Tests of the jitter *itself* have to force it on — under a test runner it is off, which is the whole point — so they call this and restore afterwards.
``ts
beforeAll(() => setIndexJitterEnabled(true))
afterAll(() => setIndexJitterEnabled(null))
``
Process-wide rather than per-call because the helpers are free functions
reached from everywhere, including inside Editor; threading an option
through every call site would leave the ones that matter untouched.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.