Commit 96f18a6
authored
refactor(editor): split text outline update into its own reactor (tldraw#8833)
In order to keep the camera position reactor focused on positioning the
HTML layer, this PR moves the text outline / LOD logic into a dedicated
`set text outline` quick reactor. The new reactor reads
`editor.getEfficientZoomLevel()` and only updates the
`--tl-text-outline` CSS custom property when the LOD bucket changes,
instead of recomputing the check on every camera tick alongside the
layer transform.
The `allowTextOutline` ref is renamed to `canUpdateTextOutline` to
better describe what the flag does — it gates future updates after
Safari's one-shot opt-out.
### Change type
- [x] `improvement`
### Test plan
1. Open the examples app and pan/zoom the canvas; text shapes should
still toggle outlines when crossing the `textShadowLod` threshold.
2. Open the examples app in Safari and verify that text outlines remain
disabled.
- [ ] Unit tests
- [ ] End to end tests
### Release notes
- Internal refactor: split text outline updates into their own reactor
on the canvas.
### Code changes
| Section | LOC change |
| --------- | ---------- |
| Core code | +34 / -26 |1 parent 8dccc2a commit 96f18a6
1 file changed
Lines changed: 34 additions & 26 deletions
Lines changed: 34 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
67 | 93 | | |
68 | 94 | | |
69 | 95 | | |
70 | 96 | | |
71 | 97 | | |
72 | 98 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
0 commit comments