南昌市物联网技防平台-前端
liuyg
2021-05-11 8411a416f18eb548e9780b1b0bbc9cef93b9a6d1
dom移动事件更改
1 files modified
8 ■■■■ changed files
public/xcxh5map/js/move.js 8 ●●●● patch | view | raw | blame | history
public/xcxh5map/js/move.js
@@ -50,7 +50,7 @@
        var that = this;
        if(state != 14){
            that.state = state;
            console.log(that.state);
            // console.log(that.state);
        }
        that.getDomPosition();//获取dom位置
        that.getMapHeight();//获取地图高度
@@ -67,15 +67,15 @@
            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);
                }
            }