Merge branch 'master' of http://xny.yj-3d.com:3000/zh/sdk4.0 into develop

This commit is contained in:
zh
2025-07-03 18:18:43 +08:00
15 changed files with 37 additions and 22 deletions

View File

@ -3,7 +3,7 @@ class BaseDialog {
this.container = container this.container = container
this.options = { ...options } this.options = { ...options }
this.options.ismove = true this.options.ismove = true
if(options.ismove === false) { if (options.ismove === false) {
this.options.ismove = options.ismove this.options.ismove = options.ismove
} }
this.closeCallBack = options.closeCallBack this.closeCallBack = options.closeCallBack
@ -12,7 +12,6 @@ class BaseDialog {
} }
async init() { async init() {
this.closeAll() this.closeAll()
DialogAll.push(this) DialogAll.push(this)
this.isDestroy = false this.isDestroy = false
@ -62,7 +61,7 @@ class BaseDialog {
}); });
} }
if(this.options.ismove) { if (this.options.ismove) {
this.moveDiv() this.moveDiv()
} }
} }
@ -92,7 +91,7 @@ class BaseDialog {
} }
closeAll() { closeAll() {
for(let i=DialogAll.length-1;i>=0;i--) { for (let i = DialogAll.length - 1; i >= 0; i--) {
DialogAll[i].close() DialogAll[i].close()
DialogAll.splice(i, 1) DialogAll.splice(i, 1)
} }
@ -187,6 +186,14 @@ class BaseDialog {
_this._element.body.style.bottom = 'unset' _this._element.body.style.bottom = 'unset'
_this._element.body.style.right = 'unset' _this._element.body.style.right = 'unset'
} }
//鼠标抬起事件
document.onmouseup = function (e) {
window.onmousemove = null
}
window.ondragend = function (e) {
window.onmousemove = null
}
} }
//鼠标抬起事件 //鼠标抬起事件

View File

@ -73,7 +73,7 @@ import { dialog as ContourDialog } from '../Global/Contour'
import { on as SplitScreenOn, off as SplitScreenOff, setActiveId as SplitScreenSetActiveId, getSdk } from '../Global/SplitScreen' import { on as SplitScreenOn, off as SplitScreenOff, setActiveId as SplitScreenSetActiveId, getSdk } from '../Global/SplitScreen'
import LocateCurrent from '../Obj/Base/LocateCurrent' import LocateCurrent from '../Obj/Base/LocateCurrent'
import { Clear as AnalysisClear } from '../Obj/Analysis/clear' import { AnalysisClear, SectionClear } from '../Obj/Analysis/clear'
import CutFillAnalysis from '../Obj/Analysis/CutFill' import CutFillAnalysis from '../Obj/Analysis/CutFill'
import Submerge from '../Obj/Analysis/Submerge' import Submerge from '../Obj/Analysis/Submerge'
import ViewShed from '../Obj/Analysis/ViewShed' import ViewShed from '../Obj/Analysis/ViewShed'
@ -390,7 +390,9 @@ if (!window.YJ) {
Section, Section,
TerrainExcavation, TerrainExcavation,
Flat, Flat,
Analyses: [] AnalysesResults: [],
SectionResults: [],
ClearSection: SectionClear
}, },
CoordTransform, CoordTransform,
RoutePlanningArrays: [], RoutePlanningArrays: [],

View File

@ -35,7 +35,7 @@ class CircleViewShed extends Tools {
this.Dialog = _Dialog this.Dialog = _Dialog
this._EventBinding = new EventBinding() this._EventBinding = new EventBinding()
this.html = null this.html = null
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
CircleViewShed.edit(this) CircleViewShed.edit(this)
// CircleViewShed.create(this) // CircleViewShed.create(this)
} }

View File

@ -44,7 +44,7 @@ class ContourAnalysis {
"#2F0000", "#2F0000",
]; //等高线赋值颜色内含default值 ]; //等高线赋值颜色内含default值
this.countorLineList = Cesium.defaultValue(options.countorLineList, []); this.countorLineList = Cesium.defaultValue(options.countorLineList, []);
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
this.createNewLine(); this.createNewLine();
} }
createNewLine() { createNewLine() {

View File

@ -27,7 +27,7 @@ class CutFillAnalysis {
} }
this.entities = [] this.entities = []
this.Draw = new DrawPolygon(this.sdk) this.Draw = new DrawPolygon(this.sdk)
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
CutFillAnalysis.EditBox(this) CutFillAnalysis.EditBox(this)
} }

View File

@ -15,7 +15,7 @@ class Profile extends Draw {
super(sdk) super(sdk)
this.viewer = sdk.viewer; this.viewer = sdk.viewer;
this.Dialog = _Dialog this.Dialog = _Dialog
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
Profile.create(this) Profile.create(this)
} }
static create(that) { static create(that) {

View File

@ -15,7 +15,7 @@ class Section extends Tools {
this.tiles3d = tiles3d this.tiles3d = tiles3d
this.options = { ...options } this.options = { ...options }
this.options.regionsType = this.options.regionsType || false this.options.regionsType = this.options.regionsType || false
// YJ.Analysis.Analyses.push(this) YJ.Analysis.SectionResults.push(this)
this.Planes = [] this.Planes = []
Section.start(this) Section.start(this)
} }

View File

@ -24,7 +24,7 @@ class SlopeAspect extends Tools {
this.result = []; //存储创建的坡度分析结果primitive集合 this.result = []; //存储创建的坡度分析结果primitive集合
this.handler = undefined; this.handler = undefined;
this.toolTip = ""; this.toolTip = "";
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
this.Draw = new DrawPolygon(this.sdk) this.Draw = new DrawPolygon(this.sdk)
// this.createNew4Distance() // this.createNew4Distance()
this.createNew4Num(50) this.createNew4Num(50)

View File

@ -26,7 +26,7 @@ class Submerge extends Tools {
this.status = true this.status = true
this.area = 0 this.area = 0
this._elms = {}; this._elms = {};
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
Submerge.EditBox(this) Submerge.EditBox(this)
// Submerge.create(this) // Submerge.create(this)
} }

View File

@ -56,7 +56,7 @@ class ViewShedStage extends Tools {
this.Dialog = _Dialog this.Dialog = _Dialog
this._EventBinding = new EventBinding() this._EventBinding = new EventBinding()
this.html = null this.html = null
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
ViewShedStage.edit(this) ViewShedStage.edit(this)
// ViewShedStage.edit(this) // ViewShedStage.edit(this)
// this.update(); // this.update();

View File

@ -50,7 +50,7 @@ class ViewShedStage extends Tools {
this.ids = [] this.ids = []
this.Dialog = _Dialog this.Dialog = _Dialog
this.html = null this.html = null
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
ViewShedStage.create(this) ViewShedStage.create(this)
// ViewShedStage.edit(this) // ViewShedStage.edit(this)
// this.update(); // this.update();

View File

@ -38,7 +38,7 @@ class ViewShedStage extends Tools {
this.viewpointPrimitive = null this.viewpointPrimitive = null
this.Dialog = _Dialog this.Dialog = _Dialog
this.html = null this.html = null
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
ViewShedStage.create(this) ViewShedStage.create(this)
} }

View File

@ -27,7 +27,7 @@ class VisibilityAnalysis extends Tools {
this.viewPointHeight = options.viewPointHeight this.viewPointHeight = options.viewPointHeight
this.Dialog = _Dialog this.Dialog = _Dialog
this._EventBinding = new EventBinding() this._EventBinding = new EventBinding()
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
VisibilityAnalysis.edit(this) VisibilityAnalysis.edit(this)
} }

View File

@ -1,8 +1,14 @@
function Clear() { function AnalysisClear() {
YJ.Analysis.Analyses.forEach(m => { YJ.Analysis.AnalysesResults.forEach(m => {
m.destroy() m.destroy()
}) })
// YJ.Analysis.Analyses = [] // YJ.Analysis.AnalysesResults = []
} }
export {Clear} function SectionClear() {
YJ.Analysis.SectionResults.forEach(m => {
m.destroy()
})
}
export {AnalysisClear, SectionClear}

View File

@ -50,7 +50,7 @@ class Test extends Tools {
this.ids = [] this.ids = []
this.Dialog = _Dialog this.Dialog = _Dialog
this.html = null this.html = null
YJ.Analysis.Analyses.push(this) YJ.Analysis.AnalysesResults.push(this)
Test.create(this) Test.create(this)
// Test.edit(this) // Test.edit(this)
// this.update(); // this.update();