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

Commit

Permalink
fix(zoom slider drag lag): fix lag
Browse files Browse the repository at this point in the history
  • Loading branch information
DR-Univer committed Aug 17, 2020
1 parent 106f1fd commit 17ddd13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controllers/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export function zoomInitial(){

$("#luckysheet-zoom-cursor").mousedown(function(e){
let curentX = e.pageX,cursorLeft = parseFloat($("#luckysheet-zoom-cursor").css("left"));
$("#luckysheet-zoom-cursor").css("transition","none");
$(document).off("mousemove.zoomCursor").on("mousemove.zoomCursor",function(event){
let moveX = event.pageX;
let offsetX = moveX - curentX;
Expand Down Expand Up @@ -114,6 +115,7 @@ export function zoomInitial(){

$(document).off("mouseup.zoomCursor").on("mouseup.zoomCursor",function(event){
$(document).off(".zoomCursor");
$("#luckysheet-zoom-cursor").css("transition","all 0.3s");
});

e.stopPropagation();
Expand Down

0 comments on commit 17ddd13

Please sign in to comment.