claude-opencode-viewer 2.6.16 → 2.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +5 -1
- package/index.html +5 -3
- package/package.json +1 -1
package/index.html
CHANGED
|
@@ -1044,6 +1044,7 @@
|
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
1046
1046
|
// 触摸滚动实现 - 混合模式:alternate buffer 发鼠标滚轮,normal buffer 用 scrollLines
|
|
1047
|
+
var SCROLL_SENSITIVITY = 0.7; // 滚动灵敏度,越小每次滑动行数越少
|
|
1047
1048
|
var touchScreen = null;
|
|
1048
1049
|
var touchEventsBound = false;
|
|
1049
1050
|
|
|
@@ -1112,7 +1113,7 @@
|
|
|
1112
1113
|
scrollRaf = null;
|
|
1113
1114
|
if (pendingDy === 0) return;
|
|
1114
1115
|
|
|
1115
|
-
pixelAccum += pendingDy;
|
|
1116
|
+
pixelAccum += pendingDy * SCROLL_SENSITIVITY;
|
|
1116
1117
|
pendingDy = 0;
|
|
1117
1118
|
|
|
1118
1119
|
var lh = getLineHeight();
|
|
@@ -1164,7 +1165,7 @@
|
|
|
1164
1165
|
}
|
|
1165
1166
|
|
|
1166
1167
|
if (pendingDy !== 0) {
|
|
1167
|
-
pixelAccum += pendingDy;
|
|
1168
|
+
pixelAccum += pendingDy * SCROLL_SENSITIVITY;
|
|
1168
1169
|
pendingDy = 0;
|
|
1169
1170
|
var lh = getLineHeight();
|
|
1170
1171
|
var lines = Math.trunc(pixelAccum / lh);
|
|
@@ -1189,8 +1190,9 @@
|
|
|
1189
1190
|
}
|
|
1190
1191
|
velocitySamples = [];
|
|
1191
1192
|
|
|
1193
|
+
velocity *= SCROLL_SENSITIVITY;
|
|
1192
1194
|
console.log('[scroll] velocity:', velocity);
|
|
1193
|
-
if (Math.abs(velocity) < 0.
|
|
1195
|
+
if (Math.abs(velocity) < 0.3) return;
|
|
1194
1196
|
|
|
1195
1197
|
var friction = 0.95;
|
|
1196
1198
|
var mAccum = 0;
|