Commit a19cda2
committed
fix(pdf-server): no blank flash on pinch commit; clamp Ctrl+mousewheel; basic-host observer cleanup
Three review follow-ups:
1) Snap on pinch release: setting canvasEl.width clears the backing
store, so between the resize and page.render() completing the
page was blank. Snapshot the old bitmap first and drawImage it
scaled as a placeholder; the real render paints over it. Gated
on a transform being present so page-nav renders aren't affected.
2) Ctrl + physical mouse wheel sent deltaY≈±100 → exp(±1)≈2.7× per
notch, slamming straight to ZOOM_MIN/MAX. Clamp per-event delta
to ±25 (≈±28% per notch); trackpad pinch deltas are ~±1-10 so
the clamp is a no-op there.
3) basic-host's iframe ResizeObserver had no disposal path. Chained
disconnect() into appBridge.onclose (Protocol base class hook).1 parent 6c910a4 commit a19cda2
2 files changed
Lines changed: 31 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
324 | 330 | | |
325 | 331 | | |
326 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3041 | 3041 | | |
3042 | 3042 | | |
3043 | 3043 | | |
3044 | | - | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
3045 | 3057 | | |
3046 | 3058 | | |
3047 | 3059 | | |
3048 | 3060 | | |
3049 | 3061 | | |
3050 | 3062 | | |
3051 | | - | |
3052 | | - | |
3053 | | - | |
3054 | | - | |
| 3063 | + | |
| 3064 | + | |
3055 | 3065 | | |
3056 | 3066 | | |
3057 | 3067 | | |
3058 | 3068 | | |
3059 | 3069 | | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
3060 | 3075 | | |
3061 | 3076 | | |
3062 | 3077 | | |
| |||
3812 | 3827 | | |
3813 | 3828 | | |
3814 | 3829 | | |
3815 | | - | |
3816 | | - | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
3817 | 3835 | | |
3818 | 3836 | | |
3819 | 3837 | | |
| |||
0 commit comments