termites 1.0.27 → 1.0.28
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/package.json +1 -1
- package/server.js +24 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -1182,6 +1182,30 @@ class TermitesServer {
|
|
|
1182
1182
|
|
|
1183
1183
|
setupDraggable(startMarker, true);
|
|
1184
1184
|
setupDraggable(endMarker, false);
|
|
1185
|
+
|
|
1186
|
+
// Touch scrolling for terminal
|
|
1187
|
+
let touchScrollY = null;
|
|
1188
|
+
const termEl = document.getElementById('terminal-container');
|
|
1189
|
+
termEl.addEventListener('touchstart', (e) => {
|
|
1190
|
+
if (e.touches.length === 1 && !selMode) {
|
|
1191
|
+
touchScrollY = e.touches[0].clientY;
|
|
1192
|
+
}
|
|
1193
|
+
}, { passive: true });
|
|
1194
|
+
|
|
1195
|
+
termEl.addEventListener('touchmove', (e) => {
|
|
1196
|
+
if (touchScrollY !== null && e.touches.length === 1 && !selMode) {
|
|
1197
|
+
const deltaY = touchScrollY - e.touches[0].clientY;
|
|
1198
|
+
const lines = Math.round(deltaY / 20); // ~20px per line
|
|
1199
|
+
if (lines !== 0) {
|
|
1200
|
+
term.scrollLines(lines);
|
|
1201
|
+
touchScrollY = e.touches[0].clientY;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}, { passive: true });
|
|
1205
|
+
|
|
1206
|
+
termEl.addEventListener('touchend', () => {
|
|
1207
|
+
touchScrollY = null;
|
|
1208
|
+
}, { passive: true });
|
|
1185
1209
|
}
|
|
1186
1210
|
|
|
1187
1211
|
function updateClientList() {
|