perf: v3.26.154 平移移动边线缓存,减少每帧 Canvas 重画

This commit is contained in:
qiqi committed 2026-12-01 07:38:45 +08:00
1 parent 04745b0b31
commit d874e028f4
10 files changed
+33 -14

No files matched your search

+2
View File
@@ -85,6 +85,8 @@
useEffect(() => {
const canvas = ref.current
if (!canvas) return
// 平移期间 applyViewportDom 会给 canvas 加 CSS translate;React 提交最终视口时清掉再画。
try { canvas.style.transform = '' } catch (e) { /* ignore */ }
draw(canvas, latest.current)
if (typeof props.onReady === 'function') {
props.onReady(function (x, y, scale) {