合并
This commit is contained in:
@ -35,9 +35,20 @@ class CircleViewShed extends Tools {
|
||||
this.Dialog = _Dialog
|
||||
this._EventBinding = new EventBinding()
|
||||
this.html = null
|
||||
let tools = new Tools(sdk)
|
||||
YJ.Analysis.AnalysesResults.push(this)
|
||||
CircleViewShed.edit(this)
|
||||
// CircleViewShed.create(this)
|
||||
// CircleViewShed.edit(this)
|
||||
let terrainAvailability = this.viewer.terrainProvider.availability;
|
||||
if (!terrainAvailability) {
|
||||
tools.message({ type: 'warning', text: '未加载地形数据!' })
|
||||
// window.ELEMENT && window.ELEMENT.Message({
|
||||
// message: '未加载地形数据!',
|
||||
// type: 'warning',
|
||||
// duration: 1500
|
||||
// });
|
||||
return
|
||||
}
|
||||
CircleViewShed.create(this)
|
||||
}
|
||||
|
||||
get viewPointHeight() {
|
||||
@ -87,7 +98,7 @@ class CircleViewShed extends Tools {
|
||||
let Draw = new YJ.Draw.DrawCircle(that.sdk)
|
||||
Draw.start(async (a, options) => {
|
||||
// that.center = options.center
|
||||
if(!options) {
|
||||
if (!options) {
|
||||
return
|
||||
}
|
||||
that.radius = options.radius
|
||||
|
@ -48,7 +48,7 @@ class Profile extends Draw {
|
||||
})
|
||||
Profile.interPoints(that).then((points) => {
|
||||
if (this._currentId && this._currentId === id) {
|
||||
that._DialogObject ? Profile.initEcharts(that, points) : Profile.edit(that, points)
|
||||
that.clickCallBack(points)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -84,7 +84,9 @@ class Profile extends Draw {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
reDraw() {
|
||||
Profile.create(this)
|
||||
}
|
||||
static create_polyline(that) {
|
||||
that.entityHasCreated = true
|
||||
let id = that.randomString()
|
||||
@ -104,6 +106,16 @@ class Profile extends Draw {
|
||||
)
|
||||
return id
|
||||
}
|
||||
get onEnd() {
|
||||
return this.clickCallBack
|
||||
}
|
||||
set onEnd(val) {
|
||||
if (val && typeof val !== 'function') {
|
||||
console.error('val:', val, '不是一个function')
|
||||
} else {
|
||||
this.clickCallBack = val
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 线段插值点
|
||||
@ -159,6 +171,28 @@ class Profile extends Draw {
|
||||
}
|
||||
return positions_Inter
|
||||
}
|
||||
formatter(xy, tipData) {
|
||||
const pointOption = {
|
||||
show: true,
|
||||
pixelSize: 10,
|
||||
color: Cesium.Color.GREEN,
|
||||
outlineColor: Cesium.Color.SKYBLUE,
|
||||
outlineWidth: 3,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
}
|
||||
if (!this.tipEntity) {
|
||||
this.tipEntity = this.sdk.viewer.entities.add({
|
||||
position: Cesium.Cartesian3.fromDegrees(xy[0], xy[1], Number(tipData[1])),
|
||||
point: pointOption
|
||||
})
|
||||
} else {
|
||||
this.tipEntity.position = Cesium.Cartesian3.fromDegrees(
|
||||
xy[0],
|
||||
xy[1],
|
||||
Number(tipData[1])
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
static async edit(that, points) {
|
||||
if (that._DialogObject && that._DialogObject.close) {
|
||||
@ -218,7 +252,7 @@ class Profile extends Draw {
|
||||
outlineWidth: 3,
|
||||
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
||||
};
|
||||
const ele = that._DialogObject._element.content.getElementsByClassName("profile-echarts")[0];
|
||||
const ele = document.getElementsByClassName("profile-echarts")[0];
|
||||
that.echartsObject = echarts.init(ele);
|
||||
option = {
|
||||
tooltip: {
|
||||
@ -383,7 +417,7 @@ class Profile extends Draw {
|
||||
};
|
||||
}
|
||||
else {
|
||||
const ele = that._DialogObject._element.content.getElementsByClassName("profile-echarts")[0];
|
||||
const ele = document.getElementsByClassName("profile-echarts")[0];
|
||||
that.echartsObject = echarts.init(ele);
|
||||
option = {
|
||||
tooltip: {
|
||||
|
@ -2,7 +2,7 @@ import Dialog from '../../../BaseDialog';
|
||||
import { html } from "./_element";
|
||||
import DrawPolygon from "../../../Draw/drawPolygon"
|
||||
import Tools from "../../../Tools";
|
||||
import { closeRotateAround, closeViewFollow} from '../../../Global/global'
|
||||
import { closeRotateAround, closeViewFollow } from '../../../Global/global'
|
||||
class Submerge extends Tools {
|
||||
/**
|
||||
* @constructor
|
||||
@ -26,8 +26,9 @@ class Submerge extends Tools {
|
||||
this.status = true
|
||||
this.area = 0
|
||||
this._elms = {};
|
||||
this.tools = new Tools(this.sdk)
|
||||
YJ.Analysis.AnalysesResults.push(this)
|
||||
Submerge.EditBox(this)
|
||||
// Submerge.EditBox(this)
|
||||
// Submerge.create(this)
|
||||
}
|
||||
|
||||
@ -35,16 +36,13 @@ class Submerge extends Tools {
|
||||
that.Draw.start((a, positions) => {
|
||||
if (!positions || positions.length < 3) {
|
||||
let _error = '至少需要三个坐标!'
|
||||
console.warn(_error)
|
||||
window.ELEMENT &&
|
||||
window.ELEMENT.Message({
|
||||
message: _error,
|
||||
type: 'warning',
|
||||
duration: 1500
|
||||
})
|
||||
this.tools.message({
|
||||
message: _error,
|
||||
type: 'warning',
|
||||
});
|
||||
return
|
||||
}
|
||||
that.destroy()
|
||||
Submerge.destroy()
|
||||
if (!positions || positions.length == 0) {
|
||||
that.positions = []
|
||||
that._positions = []
|
||||
@ -95,6 +93,9 @@ class Submerge extends Tools {
|
||||
// Submerge.EditBox(that)
|
||||
})
|
||||
}
|
||||
draw() {
|
||||
Submerge.create(this)
|
||||
}
|
||||
|
||||
static async EditBox(that) {
|
||||
if (that._DialogObject && that._DialogObject.close) {
|
||||
@ -104,7 +105,7 @@ class Submerge extends Tools {
|
||||
that._DialogObject = await new Dialog(that.sdk.viewer._container, {
|
||||
title: '淹没分析', left: '180px', top: '100px',
|
||||
closeCallBack: () => {
|
||||
that.destroy()
|
||||
Submerge.destroy()
|
||||
that.Dialog.closeCallBack && that.Dialog.closeCallBack()
|
||||
},
|
||||
})
|
||||
@ -315,6 +316,39 @@ class Submerge extends Tools {
|
||||
})
|
||||
}
|
||||
|
||||
get waterVolume() {
|
||||
return this.options.waterVolume
|
||||
}
|
||||
set waterVolume(val) {
|
||||
this.options.waterVolume = val
|
||||
}
|
||||
get minWaterLevel() {
|
||||
return this.options.minWaterLevel
|
||||
}
|
||||
set minWaterLevel(val) {
|
||||
this.options.minWaterLevel = val
|
||||
}
|
||||
get maxWaterLevel() {
|
||||
return this.options.maxWaterLevel
|
||||
}
|
||||
set maxWaterLevel(val) {
|
||||
this.options.maxWaterLevel = val
|
||||
}
|
||||
get risingSpeed() {
|
||||
return this.options.risingSpeed
|
||||
}
|
||||
set risingSpeed(val) {
|
||||
this.options.risingSpeed = val
|
||||
}
|
||||
get area() {
|
||||
return this.area
|
||||
}
|
||||
set area(val) {
|
||||
this.area = val
|
||||
}
|
||||
|
||||
|
||||
|
||||
move() {
|
||||
if (this.TweenAnimate) {
|
||||
TWEEN.remove(this.TweenAnimate)
|
||||
@ -369,7 +403,7 @@ class Submerge extends Tools {
|
||||
return
|
||||
}
|
||||
closeRotateAround(this.sdk)
|
||||
closeViewFollow(this.sdk)
|
||||
closeViewFollow(this.sdk)
|
||||
|
||||
let positionArray = []
|
||||
for (let i = 0; i < this.positions.length; i++) {
|
||||
@ -386,7 +420,7 @@ class Submerge extends Tools {
|
||||
})
|
||||
}
|
||||
|
||||
destroy() {
|
||||
static destroy() {
|
||||
if (this.TweenAnimate) {
|
||||
TWEEN.remove(this.TweenAnimate)
|
||||
}
|
||||
|
@ -28,7 +28,8 @@ class VisibilityAnalysis extends Tools {
|
||||
this.Dialog = _Dialog
|
||||
this._EventBinding = new EventBinding()
|
||||
YJ.Analysis.AnalysesResults.push(this)
|
||||
VisibilityAnalysis.edit(this)
|
||||
// VisibilityAnalysis.edit(this)
|
||||
VisibilityAnalysis.create(this)
|
||||
}
|
||||
|
||||
get viewPointHeight() {
|
||||
@ -64,8 +65,7 @@ class VisibilityAnalysis extends Tools {
|
||||
if (!that.resultObject.viewPoint) {
|
||||
let pos84 = that.cartesian3Towgs84(cartesian, that.viewer)
|
||||
let positions
|
||||
if(that.sdk.viewer.terrainProvider.availability)
|
||||
{
|
||||
if (that.sdk.viewer.terrainProvider.availability) {
|
||||
positions = await Cesium.sampleTerrainMostDetailed(
|
||||
that.sdk.viewer.terrainProvider,
|
||||
[Cesium.Cartographic.fromDegrees(pos84.lng, pos84.lat)]
|
||||
|
@ -755,10 +755,17 @@
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content input[type=number] {
|
||||
padding: 0 16px 0 10px;
|
||||
/* padding: 0 16px 0 10px;
|
||||
font-weight: 700;
|
||||
font-family: 'D-Din-Bold';
|
||||
font-size: 18px;
|
||||
font-size: 18px; */
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0px;
|
||||
line-height: 24px;
|
||||
color: rgba(204, 204, 204, 1);
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content input[type=number]::-webkit-outer-spin-button,
|
||||
|
Reference in New Issue
Block a user