claude-opencode-viewer 2.6.16 → 2.6.18
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 +10 -5
- package/package.json +1 -1
package/index.html
CHANGED
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
/* 参考 cc-viewer 的 App.jsx 行 1319: 移动端容器使用 100vw/100vh */
|
|
13
13
|
#layout {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
position: fixed;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
16
19
|
display: flex;
|
|
17
20
|
flex-direction: column;
|
|
18
21
|
background: #000;
|
|
@@ -1044,6 +1047,7 @@
|
|
|
1044
1047
|
}
|
|
1045
1048
|
|
|
1046
1049
|
// 触摸滚动实现 - 混合模式:alternate buffer 发鼠标滚轮,normal buffer 用 scrollLines
|
|
1050
|
+
var SCROLL_SENSITIVITY = 0.7; // 滚动灵敏度,越小每次滑动行数越少
|
|
1047
1051
|
var touchScreen = null;
|
|
1048
1052
|
var touchEventsBound = false;
|
|
1049
1053
|
|
|
@@ -1112,7 +1116,7 @@
|
|
|
1112
1116
|
scrollRaf = null;
|
|
1113
1117
|
if (pendingDy === 0) return;
|
|
1114
1118
|
|
|
1115
|
-
pixelAccum += pendingDy;
|
|
1119
|
+
pixelAccum += pendingDy * SCROLL_SENSITIVITY;
|
|
1116
1120
|
pendingDy = 0;
|
|
1117
1121
|
|
|
1118
1122
|
var lh = getLineHeight();
|
|
@@ -1164,7 +1168,7 @@
|
|
|
1164
1168
|
}
|
|
1165
1169
|
|
|
1166
1170
|
if (pendingDy !== 0) {
|
|
1167
|
-
pixelAccum += pendingDy;
|
|
1171
|
+
pixelAccum += pendingDy * SCROLL_SENSITIVITY;
|
|
1168
1172
|
pendingDy = 0;
|
|
1169
1173
|
var lh = getLineHeight();
|
|
1170
1174
|
var lines = Math.trunc(pixelAccum / lh);
|
|
@@ -1189,8 +1193,9 @@
|
|
|
1189
1193
|
}
|
|
1190
1194
|
velocitySamples = [];
|
|
1191
1195
|
|
|
1196
|
+
velocity *= SCROLL_SENSITIVITY;
|
|
1192
1197
|
console.log('[scroll] velocity:', velocity);
|
|
1193
|
-
if (Math.abs(velocity) < 0.
|
|
1198
|
+
if (Math.abs(velocity) < 0.3) return;
|
|
1194
1199
|
|
|
1195
1200
|
var friction = 0.95;
|
|
1196
1201
|
var mAccum = 0;
|