@jorgmoritz/gis-manager 0.1.34 → 0.1.36
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/dist/index.cjs +75 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +75 -44
- package/dist/index.js.map +1 -1
- package/dist/vue/index.cjs +19 -6
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +19 -6
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
package/dist/vue/index.cjs
CHANGED
|
@@ -2772,6 +2772,8 @@ var AirplaneCursor = class {
|
|
|
2772
2772
|
__publicField(this, "angleStep");
|
|
2773
2773
|
/** 加速倍率(按住 Shift 生效) */
|
|
2774
2774
|
__publicField(this, "fastFactor");
|
|
2775
|
+
/** 最小高度(米) */
|
|
2776
|
+
__publicField(this, "minHeight");
|
|
2775
2777
|
/** 外部传入的行为配置与回调 */
|
|
2776
2778
|
__publicField(this, "opts");
|
|
2777
2779
|
// 使用内联的 _FrustumPyramid
|
|
@@ -2799,6 +2801,7 @@ var AirplaneCursor = class {
|
|
|
2799
2801
|
this.step = opts.stepMeters ?? 2;
|
|
2800
2802
|
this.angleStep = opts.angleStepDeg ?? 1;
|
|
2801
2803
|
this.fastFactor = opts.fastFactor ?? 5;
|
|
2804
|
+
this.minHeight = opts.minHeight ?? 0;
|
|
2802
2805
|
this.currentFOV = opts.fovDeg ?? 50;
|
|
2803
2806
|
this.ensureEntity(opts.color ?? C.Color.CYAN.withAlpha(0.9));
|
|
2804
2807
|
this.attachKeyboard(opts);
|
|
@@ -3022,8 +3025,12 @@ var AirplaneCursor = class {
|
|
|
3022
3025
|
moved = true;
|
|
3023
3026
|
}
|
|
3024
3027
|
if (this.keysPressed.has("z")) {
|
|
3025
|
-
|
|
3026
|
-
|
|
3028
|
+
const newPos = addVec(pose.position, C.Cartesian3.multiplyByScalar(u3, -step, new C.Cartesian3()));
|
|
3029
|
+
const newCarto = C.Cartographic.fromCartesian(newPos);
|
|
3030
|
+
if (newCarto && newCarto.height >= this.minHeight) {
|
|
3031
|
+
setPos(newPos);
|
|
3032
|
+
moved = true;
|
|
3033
|
+
}
|
|
3027
3034
|
}
|
|
3028
3035
|
if (this.keysPressed.has("q")) {
|
|
3029
3036
|
pose.heading = clampDeg(pose.heading - ang);
|
|
@@ -3896,6 +3903,7 @@ var VertexDragHandler = class {
|
|
|
3896
3903
|
__publicField(this, "CesiumNS");
|
|
3897
3904
|
__publicField(this, "viewer");
|
|
3898
3905
|
__publicField(this, "hiddenClimbIndex");
|
|
3906
|
+
__publicField(this, "minHeight");
|
|
3899
3907
|
__publicField(this, "callbacks");
|
|
3900
3908
|
__publicField(this, "dragState", null);
|
|
3901
3909
|
__publicField(this, "canvas");
|
|
@@ -3904,6 +3912,7 @@ var VertexDragHandler = class {
|
|
|
3904
3912
|
this.CesiumNS = options.CesiumNS;
|
|
3905
3913
|
this.viewer = options.viewer;
|
|
3906
3914
|
this.hiddenClimbIndex = options.hiddenClimbIndex;
|
|
3915
|
+
this.minHeight = options.minHeight ?? 0;
|
|
3907
3916
|
this.callbacks = callbacks;
|
|
3908
3917
|
this.canvas = this.viewer.scene.canvas;
|
|
3909
3918
|
this.setupKeyboardListeners();
|
|
@@ -4079,7 +4088,7 @@ var VertexDragHandler = class {
|
|
|
4079
4088
|
const cameraHeight = this.viewer.camera.positionCartographic.height;
|
|
4080
4089
|
const scaleFactor = Math.max(cameraHeight / 1e3, 0.5);
|
|
4081
4090
|
const heightDelta = -deltaY * scaleFactor;
|
|
4082
|
-
const newHeight = Math.max(
|
|
4091
|
+
const newHeight = Math.max(this.minHeight, this.dragState.startHeight + heightDelta);
|
|
4083
4092
|
const newPosition = C.Cartesian3.fromDegrees(
|
|
4084
4093
|
this.dragState.startLonLat.lon,
|
|
4085
4094
|
this.dragState.startLonLat.lat,
|
|
@@ -4186,7 +4195,8 @@ var PathEditingEventHandler = class {
|
|
|
4186
4195
|
{
|
|
4187
4196
|
CesiumNS: this.CesiumNS,
|
|
4188
4197
|
viewer: this.viewer,
|
|
4189
|
-
hiddenClimbIndex: this.hiddenClimbIndex
|
|
4198
|
+
hiddenClimbIndex: this.hiddenClimbIndex,
|
|
4199
|
+
minHeight: options.minHeight
|
|
4190
4200
|
},
|
|
4191
4201
|
{
|
|
4192
4202
|
onDragStart: (index) => {
|
|
@@ -5237,7 +5247,9 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5237
5247
|
}
|
|
5238
5248
|
},
|
|
5239
5249
|
// frustumLengthFactor: options?.preview?.lengthFactor ?? 0.3,
|
|
5240
|
-
fovDeg: options?.preview?.fov ?? 50
|
|
5250
|
+
fovDeg: options?.preview?.fov ?? 50,
|
|
5251
|
+
minHeight: options?.minHeight
|
|
5252
|
+
// 传递最小高度限制
|
|
5241
5253
|
});
|
|
5242
5254
|
if (options?.preview?.enabled !== false && airplaneCursor) {
|
|
5243
5255
|
preview = new PathPreview(CesiumNS, viewer, {
|
|
@@ -5281,7 +5293,8 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5281
5293
|
{
|
|
5282
5294
|
CesiumNS,
|
|
5283
5295
|
viewer,
|
|
5284
|
-
hiddenClimbIndex
|
|
5296
|
+
hiddenClimbIndex,
|
|
5297
|
+
minHeight: options?.minHeight
|
|
5285
5298
|
},
|
|
5286
5299
|
{
|
|
5287
5300
|
onVertexSelect: (index) => setActiveIndex(index),
|