| | |
| | | }); |
| | | that.div.on('touchend', function() { //抬起重置 |
| | | console.log("触摸停止") |
| | | console.log(that.__yy, 123) |
| | | console.log(that.__sy, 124) |
| | | once = true; //抬起重置鼠标点击位置 |
| | | var chous = null; |
| | | if (that.state == 'down') { //两种模式 |
| | | var chous = Math.abs(that.__yy - that.__sy) < that.__wy / 4; |
| | | // var chous = Math.abs(that.__yy - that.__sy) < that.__wy / 4; |
| | | chous = (that.__sy - that.__yy) < 0; |
| | | } else if (that.state == 'up') { |
| | | var chous = Math.abs(that.__yy - that.__sy) > that.__wy / 4; |
| | | // var chous = Math.abs(that.__yy - that.__sy) > that.__wy / 4; |
| | | chous = (that.__sy - that.__yy) < 0; |
| | | } |
| | | if (chous) { |
| | | if (!chous) { |
| | | //改变dom位置 |
| | | that.changeDomPosition(0, 0, (parseFloat(that.__wy / 10) * 3.999)); |
| | | // that.getDomPosition();//抬起获取dom位置/持续停留使用 |
| | | that.state = 'down'; |
| | | if (this.tab == 1) { |
| | | $('#map').css("height", (index, value) => { //改变地图高度 |
| | | return '80%'; |
| | | }) |
| | | } |
| | | if (this.tab == 2) { |
| | | $('#map').css("height", (index, value) => { //改变地图高度 |
| | | return '80%'; |
| | | }) |
| | | } |
| | | |
| | | $('#map').css("height", (index, value) => { //改变地图高度 |
| | | return '80%'; |
| | | }) |
| | | map.invalidateSize(true); //应用地图高度 |
| | | } else { |
| | | // that.changeDomPosition(0, 0, that.__wy - 50); //改变位置 |