Commit e4e02d1a by doszhang

dos

parent b17bc9f6
...@@ -86,6 +86,7 @@ let oldRandFlag = []; ...@@ -86,6 +86,7 @@ let oldRandFlag = [];
let first = true; let first = true;
let startX; let startX;
let timer; let timer;
const fontSize = $('html').css('fontSize');
let flagTemplate = $('.flag-page .flag-frame').find('.flag-block').clone(); let flagTemplate = $('.flag-page .flag-frame').find('.flag-block').clone();
$('.flag-frame').html('').addClass('clearfix'); $('.flag-frame').html('').addClass('clearfix');
...@@ -121,7 +122,7 @@ $(document).ready(function () { ...@@ -121,7 +122,7 @@ $(document).ready(function () {
function chooseColorStart(e) { function chooseColorStart(e) {
let touch = e.originalEvent.targetTouches[0]; let touch = e.originalEvent.targetTouches[0];
startX = touch.pageX; startX = touch.pageX / fontSize;
} }
function chooseColorMove(e) { function chooseColorMove(e) {
...@@ -130,7 +131,7 @@ function chooseColorMove(e) { ...@@ -130,7 +131,7 @@ function chooseColorMove(e) {
} }
timer = setTimeout(() => { timer = setTimeout(() => {
let touch = e.originalEvent.targetTouches[0]; let touch = e.originalEvent.targetTouches[0];
moveX = touch.pageX; moveX = touch.pageX / fontSize;
console.log(moveX); console.log(moveX);
let left = parseInt($('.personal-page .btn-choose-color').css('left')); let left = parseInt($('.personal-page .btn-choose-color').css('left'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment