| | |
| | | that.indexs = index; |
| | | |
| | | |
| | | var isclickD = true |
| | | , endx = null |
| | | , endy = null; |
| | | var isclickD = true, |
| | | endx = null, |
| | | endy = null; |
| | | layero[0].style.position = 'absolute'; |
| | | |
| | | downs = document.onmousedown = () => {//鼠标按下事件 |
| | | // console.log('down');//start |
| | | // downs = document.onmousedown = null; |
| | | var mx = window.event.clientX//鼠标初始位置 |
| | | , my = window.event.clientY |
| | | , cx = this.offset[1].replace("px", "")//初始位置 |
| | | , cy = this.offset[0].replace("px", ""); |
| | | , |
| | | my = window.event.clientY, |
| | | cx = this.offset[1].replace("px", "") //初始位置 |
| | | , |
| | | cy = this.offset[0].replace("px", ""); |
| | | if (endx != null && endy != null) { |
| | | cx = endx; |
| | | cy = endy; |
| | |
| | | // console.log('move');//move |
| | | // console.log(this.offset) |
| | | var ux = window.event.clientX//记录实时位置 |
| | | , uy = window.event.clientY; |
| | | , |
| | | uy = window.event.clientY; |
| | | endx = +cx + (ux - mx)// 初始位置+(鼠标初始位置-实时位置) |
| | | endy = +cy + (uy - my); |
| | | layero[0].style.left = endx + 'px'; |
| | |
| | | mySelf.onceTimeMethod = setTimeout(() => { |
| | | mySelf.onceTimeMethod = null; |
| | | }, mySelf.onceTime); |
| | | } else { |
| | | }; |
| | | } else {}; |
| | | |
| | | |
| | | |
| | |
| | | this.singles.push(single); |
| | | delete single.graphic; |
| | | var symbol; |
| | | console.log(single.onlineStatus, '移动事件'); |
| | | if (single.jtype == 1) { |
| | | symbol = new esri.symbol.PictureMarkerSymbol("./images/yj-jingbao.png", 40, 40); |
| | | } else { |
| | | if (single.onlineStatus == 1) { |
| | | symbol = new esri.symbol.PictureMarkerSymbol("./images/zx-jingbao.png", 40, 40); |
| | | } else { |
| | | symbol = new esri.symbol.PictureMarkerSymbol("./images/dx-jingbao.png", 40, 40); |
| | | } |
| | | } |
| | | |
| | | var point = new Point(single[this.xPropertyName], single[this.yPropertyName], this.spatialRef); |
| | | var attributes = lang.clone(single); |
| | | var graphic = new Graphic(point, symbol, attributes, null); |