fuchengshen
2022-07-29 58b6c6918ebe148ae3e2a694b55691e174dd2198
select div move
2个文件已修改
116 ■■■■■ 已修改文件
public/hn3d/example/00_hn_new.html 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/hn3d/example/css/time_search.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/hn3d/example/00_hn_new.html
@@ -178,6 +178,80 @@
    var distance_half = 111319.5;
    var pointPrimitives = null;
    var time_mars = $('.mars-pannel')
    window.onload = function () {
      var drag = document.querySelectorAll('.search')
      for (var i = 0; i < drag.length; i++) {
        (function (j) {
          drag[j].onmousedown = function runs (e) {
            var e = e || window.event;
            var diffX = e.clientX - drag[j].offsetLeft;
            var diffY = e.clientY - drag[j].offsetTop;
            if (typeof drag.setCapture != 'undefined') {
              drag.setCapture();
            }
            // pauseEvent(e);
            // function pauseEvent (e) {
            //   if (e.stopPropagation) e.stopPropagation()
            //   if (e.preventDefault) e.preventDefault();
            //   e.cancelBubble = true;
            //   e.returnValue = false;
            //   return false;
            // }
            document.onmousemove = function (e) {
              var e = e || window.event;
              var left = e.clientX - diffX;
              var top = e.clientY - diffY;
              if (left < 0) {
                left = 0;
              } else if (left > window.innerWidth - drag[j].offsetWidth) {
                left = window.innerWidth - drag[j].offsetWidth;
              }
              if (top < 0) {
                top = 0;
              } else if (top > window.innerHeight - drag[j].offsetHeight) {
                top = window.innerHeight - drag[j].offsetHeight;
              }
              drag[j].style.left = left + 'px';
              drag[j].style.top = top + 'px';
              if (e.preventDefault) {
                e.preventDefault();
              }
            };
            document.onmouseup = function (e) { //当鼠标弹起来的时候不再移动
              this.onmousemove = null;
              this.onmouseup = null; //预防鼠标弹起来后还会循环(即预防鼠标放上去的时候还会移动)
              //修复低版本ie bug
              if (typeof drag[j].releaseCapture != 'undefined') {
                drag[j].releaseCapture();
              }
            };
          };
        })(i)
      }
    };
    // 页面初始执行的方法
    $(document).ready(function () {
      request = haoutil.system.getRequest();
@@ -288,6 +362,9 @@
    }
    // 测试socket.io
    socket_.on("comm", (data) => {
      console.log(data, "后端推送")
    })
@@ -636,43 +713,6 @@
      console.log(this.dou3, "dou3")
      var position_dou = new Cesium.CallbackProperty(function (time) {
        return dou3.position
      }, false)
      console.log(position_dou, "position_dou")
      var rectangularSensor = new mars3d.graphic.RectangularSensor({
        // position: [121.406729, 31.467183, 22],
        // position: new Cesium.CallbackProperty(function (time) {
        //   return dou3.position
        // }, false),
        position: position_dou,
        style: {
          heading: 29,
          pitch: 196,
          roll: 98,
          radius: 10, // 传感器的半径
          xHalfAngleDegree: 24, // 传感器水平半角
          yHalfAngleDegree: 55, // 传感器垂直半角
          color: "#00ffff",
          opacity: 0.4,
          lineColor: "#ffffff", // 线的颜色
          showSectorSegmentLines: false,
          showIntersection: false,
          showDomeSurfaces: false,
          showDomeLines: false,
          showLateralSurfaces: false,
          showScanPlane: true, // 是否显示扫描面
          scanPlaneColor: "#00ffff",
          scanPlaneOpacity: 0.9,
          scanPlaneMode: "vertical", // 扫描面模式 垂直vertical/水平horizontal
          scanPlaneRate: 3, // 扫描速率,
          depthTest: true
        }
      })
      graphicLayer.addGraphic(rectangularSensor)
public/hn3d/example/css/time_search.css
@@ -4,7 +4,7 @@
  width: 400px;
  height: 110px;
  right: 100px;
  top: 20px;
  bottom: 50px;
  border: 1px solid rgba(12, 99, 133,0.5);
  padding: 10px;
  background-color: rgba(15, 97, 83, 0.5);