From 58b6c6918ebe148ae3e2a694b55691e174dd2198 Mon Sep 17 00:00:00 2001
From: fuchengshen <men883234@gmail.com>
Date: 星期五, 29 七月 2022 09:23:23 +0800
Subject: [PATCH] select div move
---
public/hn3d/example/00_hn_new.html | 114 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 77 insertions(+), 37 deletions(-)
diff --git a/public/hn3d/example/00_hn_new.html b/public/hn3d/example/00_hn_new.html
index 5e387ae..8872be3 100644
--- a/public/hn3d/example/00_hn_new.html
+++ b/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; //棰勯槻榧犳爣寮硅捣鏉ュ悗杩樹細寰幆锛堝嵆棰勯槻榧犳爣鏀句笂鍘荤殑鏃跺�欒繕浼氱Щ鍔級
+
+ //淇浣庣増鏈琲e 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)
--
Gitblit v1.9.1