Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(mobile touch): moubile touch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DR-Univer committed Aug 3, 2020
1 parent 64f7d0e commit 04e2b8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/controllers/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default function mobileinit(){
$(document).on("touchstart", ".luckysheet-cs-touchhandle", function(event){
luckysheet_touchhandle_status = true;
luckysheet_touchmove_status = false;
console.log(1111111111);
// console.log(1111111111);
event.stopPropagation();
})

Expand Down
23 changes: 11 additions & 12 deletions src/global/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export default function luckysheetscrollevent(isadjust) {
let scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft(),
scrollTop = $("#luckysheet-scrollbar-y").scrollTop();

clearTimeout(scrollTimeOutCancel);
// clearTimeout(scrollTimeOutCancel);

scrollTimeOutCancel = setTimeout(() => {
scrollRequestAnimationFrameIni = true;
window.cancelAnimationFrame(scrollRequestAnimationFrame);
}, 500);
// scrollTimeOutCancel = setTimeout(() => {
// scrollRequestAnimationFrameIni = true;
// window.cancelAnimationFrame(scrollRequestAnimationFrame);
// }, 500);

// if (!!isadjust) {
// let scrollHeight = $t.get(0).scrollHeight;
Expand Down Expand Up @@ -92,13 +92,12 @@ export default function luckysheetscrollevent(isadjust) {
"z-index": $("#luckysheet-input-box").css("z-index")
}).show();

if(scrollRequestAnimationFrameIni && Store.scrollRefreshSwitch){
execScroll();
scrollRequestAnimationFrameIni = false;
}
// window.requestAnimationFrame(()=>{
// luckysheetrefreshgrid(scrollLeft, scrollTop);
// });
// if(scrollRequestAnimationFrameIni && Store.scrollRefreshSwitch){
// execScroll();
// scrollRequestAnimationFrameIni = false;
// }

luckysheetrefreshgrid(scrollLeft, scrollTop);


$("#luckysheet-bottom-controll-row").css("left", scrollLeft + 10);
Expand Down

0 comments on commit 04e2b8e

Please sign in to comment.