You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
594 B

var touch = 0;
function scroll1(e,ins){
if(touch==1){
var scrollTop = e.detail.scrollTop;
ins.callMethod("scroll2", { scrollTop2: scrollTop});
//console.log("scroll2");
}
}
function scroll2(e, ins) {
if(touch==2){
var scrollTop = e.detail.scrollTop;
ins.callMethod("scroll1", { scrollTop1: scrollTop });
//console.log("scroll1");
}
}
function touch1(e,ins){
//console.log("touch1");
touch = 1;
}
function touch2(e, ins) {
//console.log("touch2");
touch = 2;
}
module.exports = {
scroll1: scroll1,
scroll2: scroll2,
touch1:touch1,
touch2:touch2
}