easy-three-utils 0.0.348 → 0.0.349
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cesium/components/index.ts +3 -1
- package/cesium/components/react/ProFileEcharts/index.module.less +11 -0
- package/cesium/components/react/ProFileEcharts/index.tsx +127 -0
- package/cesium/index.ts +7 -2
- package/cesium/utils/index.ts +2 -0
- package/cesium/utils/useCustomCollection.ts +2 -0
- package/cesium/utils/useProfileAnalysis.ts +270 -0
- package/package.json +1 -1
- package/cesium/js/lib/CreatePolygonOnGround.js +0 -191
- package/cesium/js/lib/ReminderTip.js +0 -71
- package/cesium/js/measure.js +0 -755
- package/cesium/js/measure1.ts +0 -208
- package/cesium/js/slope.js +0 -379
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
const CreateRemindertip = function (arr, position, show) {
|
|
2
|
-
let tooltip = document.getElementById("toolTip");
|
|
3
|
-
let style, _x, _y, _color;
|
|
4
|
-
if (arr && typeof arr === "object") {
|
|
5
|
-
style = arr;
|
|
6
|
-
}
|
|
7
|
-
if (style && style.origin) {
|
|
8
|
-
style.origin === "center" && ((_x = 15), (_y = -12));
|
|
9
|
-
style.origin === "top" && ((_x = 15), (_y = -44));
|
|
10
|
-
style.origin === "bottom" && ((_x = 15), (_y = 20));
|
|
11
|
-
} else {
|
|
12
|
-
(_x = 15), (_y = 20);
|
|
13
|
-
}
|
|
14
|
-
if (style && style.color) {
|
|
15
|
-
style.color === "white" &&
|
|
16
|
-
(_color = "background: rgba(255, 255, 255, 0.8);color: black;");
|
|
17
|
-
style.color === "black" &&
|
|
18
|
-
(_color = "background: rgba(0, 0, 0, 0.5);color: white;");
|
|
19
|
-
style.color === "yellow" &&
|
|
20
|
-
(_color =
|
|
21
|
-
"color: black;background-color: #ffcc33;border: 1px solid white;");
|
|
22
|
-
} else {
|
|
23
|
-
_color = "background: rgba(0, 0, 0, 0.5);color: white;";
|
|
24
|
-
}
|
|
25
|
-
if (!tooltip) {
|
|
26
|
-
const viewerDom = document.getElementsByClassName("cesium-viewer")[0];
|
|
27
|
-
let elementbottom = document.createElement("div");
|
|
28
|
-
viewerDom.append(elementbottom);
|
|
29
|
-
let html =
|
|
30
|
-
'<div id="toolTip" style="display: none;pointer-events: none;position: absolute;z-index: 1000;opacity: 0.8;border-radius: 4px;padding: 4px 8px;white-space: nowrap;font-family:黑体;color:white;font-weight: bolder;font-size: 14px;' +
|
|
31
|
-
_color +
|
|
32
|
-
'"></div>';
|
|
33
|
-
viewerDom.insertAdjacentHTML("beforeend", html);
|
|
34
|
-
tooltip = document.getElementById("toolTip");
|
|
35
|
-
}
|
|
36
|
-
if (show) {
|
|
37
|
-
tooltip.innerHTML = arr;
|
|
38
|
-
tooltip.style.left = position.x + _x + "px";
|
|
39
|
-
tooltip.style.top = position.y + _y + "px";
|
|
40
|
-
tooltip.style.display = "block";
|
|
41
|
-
} else {
|
|
42
|
-
tooltip.style.display = "none";
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
tooltip: tooltip,
|
|
46
|
-
style: style,
|
|
47
|
-
showAt: function (position, text) {
|
|
48
|
-
this.tooltip.innerHTML = text;
|
|
49
|
-
if (this.style && this.style.origin) {
|
|
50
|
-
this.style.origin === "center" &&
|
|
51
|
-
((_x = 15), (_y = -this.tooltip.offsetHeight / 2));
|
|
52
|
-
this.style.origin === "top" &&
|
|
53
|
-
((_x = 15), (_y = -this.tooltip.offsetHeight - 20));
|
|
54
|
-
this.style.origin === "bottom" && ((_x = 15), (_y = 20));
|
|
55
|
-
} else {
|
|
56
|
-
(_x = 15), (_y = -this.tooltip.offsetHeight / 2);
|
|
57
|
-
}
|
|
58
|
-
this.tooltip.style.left = position.x + _x + "px";
|
|
59
|
-
this.tooltip.style.top = position.y + _y + "px";
|
|
60
|
-
this.tooltip.style.display = "block";
|
|
61
|
-
},
|
|
62
|
-
show: function (show) {
|
|
63
|
-
if (show) {
|
|
64
|
-
this.tooltip.style.display = "block";
|
|
65
|
-
} else {
|
|
66
|
-
this.tooltip.style.display = "none";
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export default CreateRemindertip;
|