update at 2026-03-03 22:07:05
This commit is contained in:
21
pxterm/fix_bracket.js
Normal file
21
pxterm/fix_bracket.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import fs from 'fs';
|
||||
let code = fs.readFileSync('src/components/TerminalPanel.vue', 'utf8');
|
||||
|
||||
// Find:
|
||||
// if (Math.abs(touchScrollVelocity) > 0.2) {
|
||||
// touchScrollVelocity *= 1.35;
|
||||
// runTouchScrollMomentum();
|
||||
// };
|
||||
// And replace with:
|
||||
// if (Math.abs(touchScrollVelocity) > 0.2) {
|
||||
// touchScrollVelocity *= 1.35;
|
||||
// runTouchScrollMomentum();
|
||||
// }
|
||||
// };
|
||||
|
||||
code = code.replace(/if \(Math\.abs\(touchScrollVelocity\) > 0\.2\) \{\s*touchScrollVelocity \*= 1\.35;\s*runTouchScrollMomentum\(\);\s*\};/g, 'if (Math.abs(touchScrollVelocity) > 0.2) {\n touchScrollVelocity *= 1.35;\n runTouchScrollMomentum();\n }\n };');
|
||||
|
||||
// Also check pointerUp
|
||||
code = code.replace(/if \(Math\.abs\(touchScrollVelocity\) > 0\.2 && touchGateScrollLike && !hasActiveNativeSelectionInTerminal\(\)\) \{\s*touchScrollVelocity \*= 1\.35;\s*runTouchScrollMomentum\(\);\s*const context = \{/g, 'if (Math.abs(touchScrollVelocity) > 0.2 && touchGateScrollLike && !hasActiveNativeSelectionInTerminal()) {\n touchScrollVelocity *= 1.35;\n runTouchScrollMomentum();\n }\n\n const context = {');
|
||||
|
||||
fs.writeFileSync('src/components/TerminalPanel.vue', code);
|
||||
Reference in New Issue
Block a user