| | |
| | | var that = this; |
| | | if(state != 14){ |
| | | that.state = state; |
| | | console.log(that.state); |
| | | // console.log(that.state); |
| | | } |
| | | that.getDomPosition();//获取dom位置 |
| | | that.getMapHeight();//获取地图高度 |
| | |
| | | var h = that.__yy - that.__sy//鼠标移动距离y |
| | | |
| | | if (that.state == 'down') {//两种模式 |
| | | console.log(that.state); |
| | | // console.log(that.state); |
| | | if (h >= 0 && h + that.__dy <= that.__wy - 20) { |
| | | that.changeDomPosition(0, h, h + that.__dy);//改变位置 |
| | | console.log(that.state,h + that.__dy,112); |
| | | // console.log(that.state,h + that.__dy,112); |
| | | } |
| | | } else if (that.state == 'up') { |
| | | if (h >= -that.__dy && h <= that.__wy - 20) { |
| | | that.changeDomPosition(0, h, h + that.__wy - 20);//改变位置 |
| | | console.log(that.state,h + that.__wy - 20,112); |
| | | // console.log(that.state,h + that.__wy - 20,112); |
| | | } |
| | | } |
| | | |