找到148个回复 (用户: 旧人)
@嚻,在view.php和editor.php的script里面加这几行
editor.renderer.setOption("animatedScroll", true);
editor.renderer.setOption('scrollSpeed', 10.0);let startScrollTop;
let startY;
editor.container.addEventListener("touchstart", function(event) {
startScrollTop = editor.session.getScrollTop();
startY = event.touches[0].pageY;
}, { passive: true });editor.container.addEventListener("touchmove", function(event) {
const speed = 3; // 调整滚动速度
const deltaY = event.touches[0].pageY - startY;
editor.session.setScrollTop(startScrollTop - deltaY * speed);
event.preventDefault();
}, { passive: false });