Compare commits
	
		
			35 Commits
		
	
	
		
			project
			...
			8f41d5907a
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8f41d5907a | |||
| 9866588986 | |||
| 5ab4a3b925 | |||
| 2604512f47 | |||
| 0bb1e5bd54 | |||
| 5d6679d919 | |||
| 41c132e506 | |||
| 09f760b10a | |||
| b0619e1b31 | |||
| 43a4fca804 | |||
| 53e692f6ca | |||
| dd1855002f | |||
| d1dd920fd2 | |||
| a69034a18e | |||
| 7fc4f14756 | |||
| feff8c3a76 | |||
| 58b8c6a897 | |||
| 349c91f8df | |||
| 92ef4a68fd | |||
| 623a220cbf | |||
| e8258d96d0 | |||
| d0a682f233 | |||
| 65441ddff4 | |||
| 7f3b04eb08 | |||
| 9289d08f24 | |||
| f9a3ffb359 | |||
| f5d915bd58 | |||
| 91cc200917 | |||
| 0c4c956868 | |||
| 838f39ba40 | |||
| 077170f2d4 | |||
| a1e33d907d | |||
| 57a9ccacbd | |||
| 0eef08ce45 | |||
| 0f9ad0a0f0 | 
| @ -101,6 +101,7 @@ function getFlagFromKeyboard(key) { | |||||||
|  */ |  */ | ||||||
| function keyDown(event) { | function keyDown(event) { | ||||||
|   let _viewer = this |   let _viewer = this | ||||||
|  |  | ||||||
|   // 判断是否有输入框聚焦 |   // 判断是否有输入框聚焦 | ||||||
|   function isInputFocused() { |   function isInputFocused() { | ||||||
|     const activeElement = document.activeElement; |     const activeElement = document.activeElement; | ||||||
| @ -164,33 +165,52 @@ function keyUp(event) { | |||||||
|  * @return {*} |  * @return {*} | ||||||
|  */ |  */ | ||||||
| function keyboardMapRoamingRender(_viewer) { | function keyboardMapRoamingRender(_viewer) { | ||||||
|   if(!_viewer.scene.screenSpaceCameraController.enableTilt) { |   if(!_viewer || !_viewer.scene || !_viewer.scene.screenSpaceCameraController.enableTilt) { | ||||||
|     return |     return | ||||||
|   } |   } | ||||||
|   let camera = _viewer.camera; |   let camera = _viewer.camera; | ||||||
|   let ellipsoid = _viewer.scene.globe.ellipsoid; |   let ellipsoid = _viewer.scene.globe.ellipsoid; | ||||||
|   let cameraHeight = ellipsoid.cartesianToCartographic(camera.position).height; |   let cameraHeight = ellipsoid.cartesianToCartographic(camera.position).height; | ||||||
|  |   let cameraHeight2 = camera.positionCartographic.height; | ||||||
|  |  | ||||||
|  |  | ||||||
|   // 根据相机高度设置移动距离,比默认距离移动效果更好 |   // 根据相机高度设置移动距离,比默认距离移动效果更好 | ||||||
|   let moveRate = cameraHeight / 20.0; |   let moveRate = cameraHeight / 20.0; | ||||||
|   let rotationRate = moveRate / 500000 / Cesium.Math.toDegrees(camera.pitch); |   let rotationRate = moveRate / 500000 / Cesium.Math.toDegrees(camera.pitch); | ||||||
|  |   let moveRate2 = cameraHeight2 / 100.0; | ||||||
|  |  | ||||||
|   if (flags.moveForward) { |   if (flags.moveForward) { | ||||||
|     // camera.moveForward(moveRate); |     if(_viewer.scene.mode == 2) { | ||||||
|  |       camera.moveUp(moveRate2); | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|       camera.rotate(camera.right, -rotationRate); |       camera.rotate(camera.right, -rotationRate); | ||||||
|     } |     } | ||||||
|  |   } | ||||||
|   if (flags.moveBackward) { |   if (flags.moveBackward) { | ||||||
|     // camera.moveBackward(moveRate); |     if(_viewer.scene.mode == 2) { | ||||||
|  |       camera.moveDown(moveRate2); | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|       camera.rotate(camera.right, rotationRate); |       camera.rotate(camera.right, rotationRate); | ||||||
|     } |     } | ||||||
|  |   } | ||||||
|   if (flags.moveLeft) { |   if (flags.moveLeft) { | ||||||
|     // camera.moveLeft(moveRate); |     if(_viewer.scene.mode == 2) { | ||||||
|  |       camera.moveLeft(moveRate2); | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|       camera.rotate(camera.up, -rotationRate); |       camera.rotate(camera.up, -rotationRate); | ||||||
|     } |     } | ||||||
|  |   } | ||||||
|   if (flags.moveRight) { |   if (flags.moveRight) { | ||||||
|     // camera.moveRight(moveRate); |     if(_viewer.scene.mode == 2) { | ||||||
|  |       camera.moveRight(moveRate2); | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|       camera.rotate(camera.up, rotationRate); |       camera.rotate(camera.up, rotationRate); | ||||||
|     } |     } | ||||||
|  |   } | ||||||
|   if (flags.moveUp) { |   if (flags.moveUp) { | ||||||
|     camera.moveUp(moveRate); |     camera.moveUp(moveRate); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -157,7 +157,12 @@ async function syncData2(sdk, id, entityId) { | |||||||
|         if (that.showView == 3) { |         if (that.showView == 3) { | ||||||
|           options.show = false |           options.show = false | ||||||
|         } |         } | ||||||
|         let newObject = await new that.constructor(sdk2D, options) |         let callback | ||||||
|  |         if(that.type === 'TextBox') { | ||||||
|  |           callback = that.callback | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         let newObject = await new that.constructor(sdk2D, options, callback) | ||||||
|         newObject.onClick = that.onClick |         newObject.onClick = that.onClick | ||||||
|         newObject.onRightClick = that.onRightClick |         newObject.onRightClick = that.onRightClick | ||||||
|         newObject.onMouseMove = that.onMouseMove |         newObject.onMouseMove = that.onMouseMove | ||||||
| @ -252,7 +257,11 @@ async function syncData2(sdk, id, entityId) { | |||||||
|         if(target) { |         if(target) { | ||||||
|           await target.remove() |           await target.remove() | ||||||
|         } |         } | ||||||
|         target = await new obj.constructor(sdk2D, options) |         let callback | ||||||
|  |         if(obj.type === 'TextBox') { | ||||||
|  |           callback = obj.callback | ||||||
|  |         } | ||||||
|  |         target = await new obj.constructor(sdk2D, options, callback) | ||||||
|         target.onClick = obj.onClick |         target.onClick = obj.onClick | ||||||
|         target.onRightClick = obj.onRightClick |         target.onRightClick = obj.onRightClick | ||||||
|         target.onMouseMove = obj.onMouseMove |         target.onMouseMove = obj.onMouseMove | ||||||
|  | |||||||
| @ -102,11 +102,20 @@ function off() { | |||||||
|   let leftCanvas = leftBox.getElementsByTagName('canvas')[0] |   let leftCanvas = leftBox.getElementsByTagName('canvas')[0] | ||||||
|   leftBox.style.width = '100%' |   leftBox.style.width = '100%' | ||||||
|   leftCanvas.style.width = '100%' |   leftCanvas.style.width = '100%' | ||||||
|  |   let billboardAttributeBoxs = sdkP.viewer._element.getElementsByClassName('billboard-attribute-box') | ||||||
|  |   for (let i = 0; i < billboardAttributeBoxs.length; i++) { | ||||||
|  |     billboardAttributeBoxs[i].style.display = 'block' | ||||||
|  |   } | ||||||
|   sdkP = null |   sdkP = null | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| async function init(sdk) { | async function init(sdk) { | ||||||
|  |   let billboardAttributeBoxs = sdk.viewer._element.getElementsByClassName('billboard-attribute-box') | ||||||
|  |   for (let i = 0; i < billboardAttributeBoxs.length; i++) { | ||||||
|  |     billboardAttributeBoxs[i].style.display = 'none' | ||||||
|  |   } | ||||||
|  |  | ||||||
|   sdk.entityMap.forEach((item, key) => { |   sdk.entityMap.forEach((item, key) => { | ||||||
|     if (item.type && item.type == 'TrajectoryMotion' && item.viewFollow) { |     if (item.type && item.type == 'TrajectoryMotion' && item.viewFollow) { | ||||||
|       item.viewFollow = false |       item.viewFollow = false | ||||||
| @ -137,10 +146,8 @@ async function init(sdk) { | |||||||
|   rightElm.style.position = 'absolute' |   rightElm.style.position = 'absolute' | ||||||
|   rightElm.style.right = 'calc(50% - 50px)' |   rightElm.style.right = 'calc(50% - 50px)' | ||||||
|  |  | ||||||
|   if (!activeIds || activeIds.length == 0) { |  | ||||||
|   leftElm.style.display = 'none' |   leftElm.style.display = 'none' | ||||||
|   rightElm.style.display = 'none' |   rightElm.style.display = 'none' | ||||||
|   } |  | ||||||
|  |  | ||||||
|   sdk.viewer._element.appendChild(leftElm) |   sdk.viewer._element.appendChild(leftElm) | ||||||
|   sdk.viewer._element.appendChild(rightElm) |   sdk.viewer._element.appendChild(rightElm) | ||||||
| @ -149,6 +156,12 @@ async function init(sdk) { | |||||||
|   let right = 0 |   let right = 0 | ||||||
|   if (activeIds) { |   if (activeIds) { | ||||||
|     for (let i = 0; i < activeIds.length; i++) { |     for (let i = 0; i < activeIds.length; i++) { | ||||||
|  |       let thatP = sdk.entityMap.get(activeIds[i]) | ||||||
|  |       if (!thatP || (thatP.type === 'terrain' || !thatP.show) || thatP.type === 'TextBox') { | ||||||
|  |         continue | ||||||
|  |       } | ||||||
|  |       leftElm.style.display = 'unset' | ||||||
|  |       rightElm.style.display = 'unset' | ||||||
|       let status = statusMap.get(activeIds[i]) |       let status = statusMap.get(activeIds[i]) | ||||||
|       if (status) { |       if (status) { | ||||||
|         if (status.P) { |         if (status.P) { | ||||||
| @ -911,7 +924,7 @@ async function setSplitDirection(v, id, isoff = false, entityId) { | |||||||
|           } |           } | ||||||
|           if (thatP.type === 'GroundSvg' && thatP.text) { |           if (thatP.type === 'GroundSvg' && thatP.text) { | ||||||
|             thatP.text.show = thatP.textShow |             thatP.text.show = thatP.textShow | ||||||
|             target.textShow = false |             target && (target.textShow = false) | ||||||
|           } |           } | ||||||
|           if (thatP.label && thatP.labelShow) { |           if (thatP.label && thatP.labelShow) { | ||||||
|             thatP.label.entity.show = true |             thatP.label.entity.show = true | ||||||
| @ -1281,6 +1294,8 @@ function setActiveId(ids = []) { | |||||||
|   } |   } | ||||||
|   else { |   else { | ||||||
|     if (leftElm && rightElm) { |     if (leftElm && rightElm) { | ||||||
|  |       leftElm.style.display = 'none' | ||||||
|  |       rightElm.style.display = 'none' | ||||||
|       let left = 0 |       let left = 0 | ||||||
|       let right = 0 |       let right = 0 | ||||||
|       for (let i = 0; i < activeIds.length; i++) { |       for (let i = 0; i < activeIds.length; i++) { | ||||||
| @ -1298,10 +1313,8 @@ function setActiveId(ids = []) { | |||||||
|  |  | ||||||
|  |  | ||||||
|         let thatP = sdkP.entityMap.get(activeIds[i]) |         let thatP = sdkP.entityMap.get(activeIds[i]) | ||||||
|         let thatD = sdkD.entityMap.get(activeIds[i]) |         // let thatD = sdkD.entityMap.get(activeIds[i]) | ||||||
|         if (!thatP || (thatP.type === 'terrain' || !thatP.show)) { |         if (!thatP || (thatP.type === 'terrain' || !thatP.show) || thatP.type === 'TextBox') { | ||||||
|           leftElm.style.display = 'none' |  | ||||||
|           rightElm.style.display = 'none' |  | ||||||
|           continue |           continue | ||||||
|         } |         } | ||||||
|         leftElm.style.display = 'unset' |         leftElm.style.display = 'unset' | ||||||
|  | |||||||
| @ -100,14 +100,14 @@ function MouseRightMenu(sdk, status, callBack) { | |||||||
|           that = sdk.entityMap.get(entityId) |           that = sdk.entityMap.get(entityId) | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // if (that && that.picking) { |         if (that && that.picking) { | ||||||
|         //   addedMenu = ` |           addedMenu = ` | ||||||
|         // <span class="divider" style="display: block;border-top: 1px solid #ddd;margin: 5px;"></span> |         <span class="divider" style="display: block;border-top: 1px solid #ddd;margin: 5px;"></span> | ||||||
|         // <ul class="added" style="list-style: none;padding: 0;margin: 0;font-size: 12px;"> |         <ul class="added" style="list-style: none;padding: 0;margin: 0;font-size: 12px;"> | ||||||
|         //   <li style="padding: 3px 10px;cursor: pointer;">属性</li> |           <li style="padding: 3px 10px;cursor: pointer;">属性</li> | ||||||
|         // </ul> |         </ul> | ||||||
|         // ` |         ` | ||||||
|         // } |         } | ||||||
|         let position = tools.cartesian3Towgs84(cartesian, sdk.viewer) |         let position = tools.cartesian3Towgs84(cartesian, sdk.viewer) | ||||||
|         menuElm = document.createElement('div') |         menuElm = document.createElement('div') | ||||||
|         menuElm.id = 'custom-menu' |         menuElm.id = 'custom-menu' | ||||||
| @ -121,6 +121,9 @@ function MouseRightMenu(sdk, status, callBack) { | |||||||
|         <ul class="base" style="list-style: none;padding: 0;margin: 0;font-size: 12px;"> |         <ul class="base" style="list-style: none;padding: 0;margin: 0;font-size: 12px;"> | ||||||
|           <li style="padding: 3px 10px;cursor: pointer;">绕鼠标点旋转</li> |           <li style="padding: 3px 10px;cursor: pointer;">绕鼠标点旋转</li> | ||||||
|         </ul> |         </ul> | ||||||
|  |         <ul class="base" style="list-style: none;padding: 0;margin: 0;font-size: 12px;"> | ||||||
|  |           <li style="padding: 3px 10px;cursor: pointer;">文本框</li> | ||||||
|  |         </ul> | ||||||
|         ${addedMenu} |         ${addedMenu} | ||||||
|       ` |       ` | ||||||
|         _element.appendChild(menuElm) |         _element.appendChild(menuElm) | ||||||
|  | |||||||
| @ -186,8 +186,8 @@ import Frustum from '../Obj/AirLine/frustum' | |||||||
| import DrawTakeOff from '../Obj/AirLine/DrawTakeOff' | import DrawTakeOff from '../Obj/AirLine/DrawTakeOff' | ||||||
| import FlowLine from '../Obj/Base/FlowLine' | import FlowLine from '../Obj/Base/FlowLine' | ||||||
| import Sunshine from '../Global/efflect/Sunshine' | import Sunshine from '../Global/efflect/Sunshine' | ||||||
| // import Road2 from '../Obj/Base/RoadObject' | import Road2 from '../Obj/Base/RoadObject' | ||||||
| // import TextBox from '../Obj/Base/TextBox' | import TextBox from '../Obj/Base/TextBox' | ||||||
| import BatchModel from '../Obj/Base/BatchModel' | import BatchModel from '../Obj/Base/BatchModel' | ||||||
|  |  | ||||||
| const YJEarthismeasuring = Symbol('测量状态') | const YJEarthismeasuring = Symbol('测量状态') | ||||||
| @ -261,8 +261,8 @@ if (!window.YJ) { | |||||||
|       // GenerateRoute |       // GenerateRoute | ||||||
|       Dialog, |       Dialog, | ||||||
|       FlowLine, |       FlowLine, | ||||||
|       // Road2, |       Road2, | ||||||
|       // TextBox, |       TextBox, | ||||||
|       BatchModel |       BatchModel | ||||||
|     }, |     }, | ||||||
|     YJEarth, |     YJEarth, | ||||||
|  | |||||||
| @ -550,7 +550,7 @@ class Model2 extends BaseModel { | |||||||
|  |  | ||||||
|   set labelShow(v) { |   set labelShow(v) { | ||||||
|     this.options.label.show = v |     this.options.label.show = v | ||||||
|     if (this.show && !this.showView || this.showView == 3) { |     if (this.show) { | ||||||
|       this.label.show = v |       this.label.show = v | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|  | |||||||
| @ -5,6 +5,7 @@ import Dialog from '../../Element/Dialog'; | |||||||
| import { html } from "./_element"; | import { html } from "./_element"; | ||||||
| import EventBinding from '../../Element/Dialog/eventBinding'; | import EventBinding from '../../Element/Dialog/eventBinding'; | ||||||
| import Base from "../index"; | import Base from "../index"; | ||||||
|  | import Tools from "../../../Tools"; | ||||||
| import { syncData } from '../../../Global/MultiViewportMode' | import { syncData } from '../../../Global/MultiViewportMode' | ||||||
| import Model from '../BaseSource/BaseModel/Model' | import Model from '../BaseSource/BaseModel/Model' | ||||||
| import { legp } from '../../Element/datalist' | import { legp } from '../../Element/datalist' | ||||||
| @ -13,7 +14,7 @@ import DrawPolyline from '../../../Draw/drawPolyline' | |||||||
| import DrawPolygon from '../../../Draw/drawPolygon' | import DrawPolygon from '../../../Draw/drawPolygon' | ||||||
| import DrawThreeRect from '../../../Draw/drawThreeRect' | import DrawThreeRect from '../../../Draw/drawThreeRect' | ||||||
| import DrawPoint from '../../../Draw/drawPoint' | import DrawPoint from '../../../Draw/drawPoint' | ||||||
| import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global' | import { setActiveViewer, closeRotateAround, closeViewFollow, CesiumContainer } from '../../../Global/global' | ||||||
|  |  | ||||||
| import { setSplitDirection, syncSplitData, setActiveId } from '../../../Global/SplitScreen' | import { setSplitDirection, syncSplitData, setActiveId } from '../../../Global/SplitScreen' | ||||||
|  |  | ||||||
| @ -37,7 +38,7 @@ class BatchModel extends Base { | |||||||
|     this.options.name = options.name || '批量模型' |     this.options.name = options.name || '批量模型' | ||||||
|     this.options.type = options.type || '面' |     this.options.type = options.type || '面' | ||||||
|     this.options.url = options.url || '' |     this.options.url = options.url || '' | ||||||
|     this.options.spacing = options.spacing || 50 |     this.options.spacing = options.spacing * 1 || 50 | ||||||
|     this.options.positions = options.positions || [] |     this.options.positions = options.positions || [] | ||||||
|     this.options.show = (options.show || options.show === false) ? options.show : true |     this.options.show = (options.show || options.show === false) ? options.show : true | ||||||
|     this.callback = callback |     this.callback = callback | ||||||
| @ -45,13 +46,19 @@ class BatchModel extends Base { | |||||||
|     this._EventBinding = new EventBinding() |     this._EventBinding = new EventBinding() | ||||||
|     this._elms = {}; |     this._elms = {}; | ||||||
|     this.pointArr = [] |     this.pointArr = [] | ||||||
|     this.sdk.addIncetance(this.options.id, this) |     // this.sdk.addIncetance(this.options.id, this) | ||||||
|  |     let tools = new Tools(sdk) | ||||||
|     // BatchModel.computeDis(this) |     // BatchModel.computeDis(this) | ||||||
|     // if (this.options.positions.length > 0 || this.options.positions.lng) { |     // if (this.options.positions.length > 0 || this.options.positions.lng) { | ||||||
|  |     if (this.options.spacing < 0 || options.spacing * 1 === 0) { | ||||||
|  |       tools.message({ type: 'warning', text: '请输入正确的间距!' }) | ||||||
|  |       return; | ||||||
|  |     } | ||||||
|     if ((options.type && options.spacing != undefined) || options.type == '点') { |     if ((options.type && options.spacing != undefined) || options.type == '点') { | ||||||
|       // BatchModel.computeDis(this) |       // BatchModel.computeDis(this) | ||||||
|  |  | ||||||
|       let Draw |       let Draw | ||||||
|  |       console.log('kkkkk') | ||||||
|       switch (options.type) { |       switch (options.type) { | ||||||
|         case '点': |         case '点': | ||||||
|           Draw = new DrawPoint(this.sdk) |           Draw = new DrawPoint(this.sdk) | ||||||
| @ -67,8 +74,37 @@ class BatchModel extends Base { | |||||||
|       } |       } | ||||||
|       Draw && Draw.start((a, positions) => { |       Draw && Draw.start((a, positions) => { | ||||||
|         this.options.positions = positions; |         this.options.positions = positions; | ||||||
|  |         console.log('uuuuuu') | ||||||
|  |         //判断范围是否过大 | ||||||
|  |         if (positions.length != 0 || positions.lng) { | ||||||
|  |           if (options.type == '面') { | ||||||
|  |             let posi = positions.map(v => { | ||||||
|  |               return Cesium.Cartesian3.fromDegrees(v.lng, v.lat) | ||||||
|  |             }) | ||||||
|  |             let dis1 = Cesium.Cartesian3.distance(posi[0], posi[1]) | ||||||
|  |             let dis2 = Cesium.Cartesian3.distance(posi[1], posi[2]) | ||||||
|  |             let num1 = dis1 / this.options.spacing | ||||||
|  |             let num2 = dis2 / this.options.spacing | ||||||
|  |             if (num1 * num2 > 100) { | ||||||
|  |               tools.message({ type: 'warning', text: '数量大于100,请重新绘制' }) | ||||||
|  |               return; | ||||||
|  |             } | ||||||
|  |           } else if (options.type == '线') { | ||||||
|  |             let posi = positions.map(v => { | ||||||
|  |               return Cesium.Cartesian3.fromDegrees(v.lng, v.lat) | ||||||
|  |             }) | ||||||
|  |             let dis = 0 | ||||||
|  |             for (let i = 0; i < posi.length - 2; i++) { | ||||||
|  |               dis += Cesium.Cartesian3.distance(posi[i], posi[i + 1]) | ||||||
|  |             } | ||||||
|  |             if (dis / this.options.spacing > 100) { | ||||||
|  |               tools.message({ type: 'warning', text: '数量大于100,请重新绘制' }) | ||||||
|  |               return; | ||||||
|  |             } | ||||||
|  |           } | ||||||
|           // this.callback(this.options); |           // this.callback(this.options); | ||||||
|           (this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this) |           (this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this) | ||||||
|  |         } | ||||||
|       }) |       }) | ||||||
|  |  | ||||||
|     } else { |     } else { | ||||||
| @ -83,6 +119,7 @@ class BatchModel extends Base { | |||||||
|     let posiArr = [] |     let posiArr = [] | ||||||
|     let array = [] |     let array = [] | ||||||
|     if (that.options.type == '面') { |     if (that.options.type == '面') { | ||||||
|  |       if (that.options.positions.length != 0) { | ||||||
|         that.options.positions.forEach(item => { |         that.options.positions.forEach(item => { | ||||||
|           fromDegreesArray.push(item.lng, item.lat) |           fromDegreesArray.push(item.lng, item.lat) | ||||||
|         }) |         }) | ||||||
| @ -103,7 +140,9 @@ class BatchModel extends Base { | |||||||
|             alt: height |             alt: height | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|  |       } | ||||||
|     } else if (that.options.type == '线') { |     } else if (that.options.type == '线') { | ||||||
|  |       if (that.options.positions.length != 0) { | ||||||
|         that.options.positions.forEach(item => { |         that.options.positions.forEach(item => { | ||||||
|           fromDegreesArray.push(item.lng, item.lat) |           fromDegreesArray.push(item.lng, item.lat) | ||||||
|         }) |         }) | ||||||
| @ -123,12 +162,17 @@ class BatchModel extends Base { | |||||||
|             alt: height |             alt: height | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|  |       } | ||||||
|  |  | ||||||
|     } else if (that.options.type == '点') { |     } else if (that.options.type == '点') { | ||||||
|  |       if (that.options.positions.lng) { | ||||||
|         let height = await that.getClampToHeight({ lng: that.options.positions.lng, lat: that.options.positions.lat }) |         let height = await that.getClampToHeight({ lng: that.options.positions.lng, lat: that.options.positions.lat }) | ||||||
|         posiArr = [{ lng: that.options.positions.lng, lat: that.options.positions.lat, alt: height }] |         posiArr = [{ lng: that.options.positions.lng, lat: that.options.positions.lat, alt: height }] | ||||||
|         // posiArr = [that.options.positions] |         // posiArr = [that.options.positions] | ||||||
|         that.pointArr = posiArr |         that.pointArr = posiArr | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  |     } | ||||||
|     let params = { |     let params = { | ||||||
|       type: that.options.type, |       type: that.options.type, | ||||||
|       positions: posiArr, |       positions: posiArr, | ||||||
|  | |||||||
| @ -29,7 +29,8 @@ import MouseTip from '../../../MouseTip' | |||||||
| import { | import { | ||||||
|   setSplitDirection, |   setSplitDirection, | ||||||
|   syncSplitData, |   syncSplitData, | ||||||
|   setActiveId |   setActiveId, | ||||||
|  |   getState | ||||||
| } from '../../../Global/SplitScreen' | } from '../../../Global/SplitScreen' | ||||||
| import { | import { | ||||||
|   setActiveViewer, |   setActiveViewer, | ||||||
| @ -40,6 +41,11 @@ import { | |||||||
| import { getGoodsList } from '../../../Tools/getGoodsList' | import { getGoodsList } from '../../../Tools/getGoodsList' | ||||||
|  |  | ||||||
| class BillboardObject extends Base { | class BillboardObject extends Base { | ||||||
|  |   #_postRenderEvent = null | ||||||
|  |   #_destroyMouseEvent = null | ||||||
|  |   #_billboardHeight = 0 | ||||||
|  |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * @constructor |    * @constructor | ||||||
|    * @description 创建点标注 |    * @description 创建点标注 | ||||||
| @ -118,6 +124,7 @@ class BillboardObject extends Base { | |||||||
|     this.options.positions.alt = Number( |     this.options.positions.alt = Number( | ||||||
|       Number(options.positions.alt || 0).toFixed(2) |       Number(options.positions.alt || 0).toFixed(2) | ||||||
|     ) |     ) | ||||||
|  |     this.#_billboardHeight = this.options.positions.alt | ||||||
|     // this.options.diffuseShow = options.diffuseShow || false |     // this.options.diffuseShow = options.diffuseShow || false | ||||||
|     // this.options.diffuseRadius = (options.diffuseRadius || options.diffuseRadius === 0) ? options.diffuseRadius : 10 |     // this.options.diffuseRadius = (options.diffuseRadius || options.diffuseRadius === 0) ? options.diffuseRadius : 10 | ||||||
|     // this.options.diffuseDuration = (options.diffuseDuration || options.diffuseDuration === 0) ? options.diffuseDuration : 2000 |     // this.options.diffuseDuration = (options.diffuseDuration || options.diffuseDuration === 0) ? options.diffuseDuration : 2000 | ||||||
| @ -145,11 +152,18 @@ class BillboardObject extends Base { | |||||||
|       this.options.attribute.goods.content || [] |       this.options.attribute.goods.content || [] | ||||||
|     this.options.attributeType = options.attributeType || 'richText' |     this.options.attributeType = options.attributeType || 'richText' | ||||||
|     this.options.coordinate = options.coordinate || '' |     this.options.coordinate = options.coordinate || '' | ||||||
|  |     this.options.attributeBoxState = options.attributeBoxState || false | ||||||
|     this.operate = {} |     this.operate = {} | ||||||
|     this._elms = {} |     this._elms = {} | ||||||
|     this.previous = { |     this.previous = { | ||||||
|       positions: { ...this.options.positions } |       positions: { ...this.options.positions } | ||||||
|     } |     } | ||||||
|  |     this.options.attributePos = options.attributePos || { | ||||||
|  |       x: 60, | ||||||
|  |       y: 60, | ||||||
|  |       width: 200, | ||||||
|  |       height: 120 | ||||||
|  |     } | ||||||
|     this.entity |     this.entity | ||||||
|     this._proj = this.sdk.proj |     this._proj = this.sdk.proj | ||||||
|  |  | ||||||
| @ -182,7 +196,111 @@ class BillboardObject extends Base { | |||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     this.#_destroyMouseEvent = () => { | ||||||
|  |       this.attributeElm && (this.attributeElm.style.pointerEvents = 'unset') | ||||||
|  |       if(this.sdk && this.sdk.viewer && this.sdk.viewer._element) { | ||||||
|  |         this.sdk.viewer._element.onmousemove = null | ||||||
|  |       } | ||||||
|  |       document.removeEventListener('mouseup', this.#_destroyMouseEvent) | ||||||
|  |       document.removeEventListener('mouseleave', this.#_destroyMouseEvent) | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     this.#_postRenderEvent = () => { | ||||||
|  |       let siteInfoPosition = Cesium.Cartesian3.fromDegrees( | ||||||
|  |         this.options.positions.lng, | ||||||
|  |         this.options.positions.lat, | ||||||
|  |         this.#_billboardHeight | ||||||
|  |       ) | ||||||
|  |       if (this.attributeElm && this.entity) { | ||||||
|  |         let winpos = this.sdk.viewer.scene.cartesianToCanvasCoordinates( | ||||||
|  |           siteInfoPosition | ||||||
|  |         ) | ||||||
|  |         let pixelOffset = this.entity.label.pixelOffset.getValue() | ||||||
|  |         if (winpos) { | ||||||
|  |           let scale = getCurrentBillboardScale(this.entity, this.sdk.viewer.scene) | ||||||
|  |           let height = ((this.entity.billboard.height.getValue() * (this.options.billboard.scale || 0)) + this.options.label.fontSize) * (1 - (scale * scale)) | ||||||
|  |           let flag = false | ||||||
|  |           let lineElm = this.attributeElm.getElementsByClassName('billboard-attribute-box-line')[0] | ||||||
|  |           let leftTopElm = this.attributeElm.getElementsByClassName('left-top')[0] | ||||||
|  |           let rightTopElm = this.attributeElm.getElementsByClassName('right-top')[0] | ||||||
|  |           this.attributeElm.style.left = (winpos.x + this.options.attributePos.x).toFixed(0) + 'px' | ||||||
|  |           this.attributeElm.style.top = (winpos.y + pixelOffset.y - (this.options.label.show ? (this.options.label.fontSize / 2) : -(this.options.label.fontSize / 2)) - this.attributeElm.offsetHeight - this.options.attributePos.y + height).toFixed(0) + 'px' | ||||||
|  |           this.attributeElm.style.width = this.options.attributePos.width + 'px' | ||||||
|  |           this.attributeElm.style.height = this.options.attributePos.height + 'px' | ||||||
|  |           lineElm.style.zIndex = '-1' | ||||||
|  |           if (this.options.attributePos.x < -this.options.attributePos.width / 2) { | ||||||
|  |             flag = true | ||||||
|  |             lineElm.style.left = 'unset' | ||||||
|  |             lineElm.style.right = '0' | ||||||
|  |             leftTopElm.style.display = 'block' | ||||||
|  |             rightTopElm.style.display = 'none' | ||||||
|  |           } | ||||||
|  |           else { | ||||||
|  |             lineElm.style.left = '0' | ||||||
|  |             lineElm.style.right = 'unset' | ||||||
|  |             leftTopElm.style.display = 'none' | ||||||
|  |             rightTopElm.style.display = 'block' | ||||||
|  |           } | ||||||
|  |  | ||||||
|  |           let lineLength | ||||||
|  |           let lineAngleRad | ||||||
|  |           let lineAngle | ||||||
|  |           let x | ||||||
|  |           let y | ||||||
|  |           if (flag) { | ||||||
|  |             x = this.attributeElm.offsetWidth + this.options.attributePos.x | ||||||
|  |             y = this.options.attributePos.y ? this.options.attributePos.y : 0 | ||||||
|  |           } | ||||||
|  |           else { | ||||||
|  |             x = this.options.attributePos.x | ||||||
|  |             y = this.options.attributePos.y ? this.options.attributePos.y : 0 | ||||||
|  |           } | ||||||
|  |           lineLength = Math.sqrt((x * x) + (y * y)).toFixed(2); | ||||||
|  |           lineAngleRad = Math.atan(x / y); | ||||||
|  |           lineAngle = parseFloat((lineAngleRad * 180 / Math.PI).toFixed(2)); | ||||||
|  |           if (this.options.attributePos.y < 0) { | ||||||
|  |             lineAngle = lineAngle + 180 | ||||||
|  |           } | ||||||
|  |           // if(this.options.attributePos.y<-this.options.attributePos.height/2) { | ||||||
|  |           //   lineElm.style.bottom = 'unset' | ||||||
|  |           //   lineElm.style.top = '0' | ||||||
|  |           // } | ||||||
|  |           // else { | ||||||
|  |           //   lineElm.style.bottom = -lineLength + 'px' | ||||||
|  |           //   lineElm.style.top = 'unset' | ||||||
|  |           // } | ||||||
|  |           lineElm.style.height = lineLength + 'px' | ||||||
|  |           lineElm.style.transform = 'rotate(' + lineAngle + 'deg)' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     function getCurrentBillboardScale(entity, scene) { | ||||||
|  |       // 获取相机到Billboard的距离 | ||||||
|  |       const distance = Cesium.Cartesian3.distance( | ||||||
|  |         scene.camera.positionWC, | ||||||
|  |         entity.position.getValue() | ||||||
|  |       ); | ||||||
|  |       // 获取缩放距离配置 | ||||||
|  |       const scaleByDistance = entity.billboard.scaleByDistance ? entity.billboard.scaleByDistance.getValue() : undefined; | ||||||
|  |  | ||||||
|  |       if (!scaleByDistance) { | ||||||
|  |         // 如果没有设置距离缩放,则使用基础缩放值 | ||||||
|  |         return 1.0; | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       // 解析缩放距离参数 [near, nearScale, far, farScale] | ||||||
|  |       const { near, nearValue, far, farValue } = scaleByDistance; | ||||||
|  |       if (distance <= near) { | ||||||
|  |         return nearValue; | ||||||
|  |       } else if (distance >= far) { | ||||||
|  |         return farValue; | ||||||
|  |       } else { | ||||||
|  |         // 计算中间距离的缩放值(线性插值) | ||||||
|  |         const t = (distance - near) / (far - near); | ||||||
|  |         return Cesium.Math.lerp(nearValue, farValue, t); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     this.sdk.addIncetance(this.options.id, this) |     this.sdk.addIncetance(this.options.id, this) | ||||||
| @ -243,6 +361,7 @@ class BillboardObject extends Base { | |||||||
|             that.entity.billboard.imgHeight = 0 |             that.entity.billboard.imgHeight = 0 | ||||||
|             that.entity.billboard.image = canvas |             that.entity.billboard.image = canvas | ||||||
|             addCluster(that.sdk, that.entity) |             addCluster(that.sdk, that.entity) | ||||||
|  |             that.attributeBoxState && (that.attributeBoxState = true) | ||||||
|           } |           } | ||||||
|           return |           return | ||||||
|         } |         } | ||||||
| @ -267,6 +386,7 @@ class BillboardObject extends Base { | |||||||
|             return img |             return img | ||||||
|           }, false) |           }, false) | ||||||
|           addCluster(that.sdk, that.entity) |           addCluster(that.sdk, that.entity) | ||||||
|  |           that.attributeBoxState && (that.attributeBoxState = true) | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     } |     } | ||||||
| @ -298,6 +418,7 @@ class BillboardObject extends Base { | |||||||
|           that.entity.billboard.imgHeight = height |           that.entity.billboard.imgHeight = height | ||||||
|           that.entity.billboard.image = canvas |           that.entity.billboard.image = canvas | ||||||
|           addCluster(that.sdk, that.entity) |           addCluster(that.sdk, that.entity) | ||||||
|  |           that.attributeBoxState && (that.attributeBoxState = true) | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       image.onerror = function (err) { |       image.onerror = function (err) { | ||||||
| @ -309,6 +430,7 @@ class BillboardObject extends Base { | |||||||
|           that.entity.billboard.imgHeight = 0 |           that.entity.billboard.imgHeight = 0 | ||||||
|           that.entity.billboard.image = canvas |           that.entity.billboard.image = canvas | ||||||
|           addCluster(that.sdk, that.entity) |           addCluster(that.sdk, that.entity) | ||||||
|  |           that.attributeBoxState && (that.attributeBoxState = true) | ||||||
|         } |         } | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
| @ -433,11 +555,11 @@ class BillboardObject extends Base { | |||||||
|         value: '链接', |         value: '链接', | ||||||
|         key: 'link' |         key: 'link' | ||||||
|       }, |       }, | ||||||
|       // { |       { | ||||||
|       //   name: 'IP摄像头', |         name: 'IP摄像头', | ||||||
|       //   value: 'IP摄像头', |         value: 'IP摄像头', | ||||||
|       //   key: 'camera' |         key: 'camera' | ||||||
|       // }, |       }, | ||||||
|       // { |       // { | ||||||
|       //   name: 'ISC摄像头', |       //   name: 'ISC摄像头', | ||||||
|       //   value: 'ISC摄像头', |       //   value: 'ISC摄像头', | ||||||
| @ -448,16 +570,16 @@ class BillboardObject extends Base { | |||||||
|       //   value: '传感器', |       //   value: '传感器', | ||||||
|       //   key: 'sensor' |       //   key: 'sensor' | ||||||
|       // }, |       // }, | ||||||
|       // { |       { | ||||||
|       //   name: '全景图', |         name: '全景图', | ||||||
|       //   value: '全景图', |         value: '全景图', | ||||||
|       //   key: 'vr' |         key: 'vr' | ||||||
|       // }, |       }, | ||||||
|       // { |       { | ||||||
|       //   name: '物资', |         name: '物资', | ||||||
|       //   value: '物资', |         value: '物资', | ||||||
|       //   key: 'goods' |         key: 'goods' | ||||||
|       // } |       } | ||||||
|     ] |     ] | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -471,9 +593,30 @@ class BillboardObject extends Base { | |||||||
|     } |     } | ||||||
|     if (!this.showView || this.showView == 3) { |     if (!this.showView || this.showView == 3) { | ||||||
|       this.entity && (this.entity.show = this.options.show) |       this.entity && (this.entity.show = this.options.show) | ||||||
|  |       if (this.attributeBoxState && this.options.show) { | ||||||
|  |         this.attributeBoxState = this.options.show | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         // 关闭属性框 | ||||||
|  |         document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |         document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |         if (this.attributeElm) { | ||||||
|  |           this.sdk.viewer._element.removeChild(this.attributeElm) | ||||||
|  |           this.attributeElm = null | ||||||
|  |         } | ||||||
|  |         this.sdk.viewer.scene.postRender.removeEventListener(this.#_postRenderEvent) | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|       this.entity && (this.entity.show = false) |       this.entity && (this.entity.show = false) | ||||||
|  |       // 关闭属性框 | ||||||
|  |       document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |       document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |       if (this.attributeElm) { | ||||||
|  |         this.sdk.viewer._element.removeChild(this.attributeElm) | ||||||
|  |         this.attributeElm = null | ||||||
|  |       } | ||||||
|  |       this.sdk.viewer.scene.postRender.removeEventListener(this.#_postRenderEvent) | ||||||
|     } |     } | ||||||
|     syncData(this.sdk, this.options.id) |     syncData(this.sdk, this.options.id) | ||||||
|     syncSplitData(this.sdk, this.options.id) |     syncSplitData(this.sdk, this.options.id) | ||||||
| @ -562,6 +705,26 @@ class BillboardObject extends Base { | |||||||
|     if (this.entity) { |     if (this.entity) { | ||||||
|       this.entity.billboard.heightReference = heightMode |       this.entity.billboard.heightReference = heightMode | ||||||
|       this.entity.label.heightReference = heightMode |       this.entity.label.heightReference = heightMode | ||||||
|  |       if(heightMode == Cesium.HeightReference.CLAMP_TO_GROUND) { | ||||||
|  |         if (this.sdk.viewer.scene.terrainProvider.availability) { | ||||||
|  |           Cesium.sampleTerrainMostDetailed( | ||||||
|  |             this.sdk.viewer.scene.terrainProvider, | ||||||
|  |             [ | ||||||
|  |               Cesium.Cartographic.fromDegrees( | ||||||
|  |                 this.options.positions.lng, | ||||||
|  |                 this.options.positions.lat | ||||||
|  |               ) | ||||||
|  |             ] | ||||||
|  |           ).then(position => { | ||||||
|  |             this.#_billboardHeight = position[0].height | ||||||
|  |           }) | ||||||
|  |         } else { | ||||||
|  |           this.#_billboardHeight = 0 | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         this.#_billboardHeight = this.options.positions.alt | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|     this._elms.heightMode && (this._elms.heightMode.value = heightModeName) |     this._elms.heightMode && (this._elms.heightMode.value = heightModeName) | ||||||
|   } |   } | ||||||
| @ -616,6 +779,7 @@ class BillboardObject extends Base { | |||||||
|   } |   } | ||||||
|   set alt(v) { |   set alt(v) { | ||||||
|     this.options.positions.alt = Number(Number(v).toFixed(2)) |     this.options.positions.alt = Number(Number(v).toFixed(2)) | ||||||
|  |     this.#_billboardHeight = this.options.positions.alt | ||||||
|     // this.scan && (this.scan.alt = v) |     // this.scan && (this.scan.alt = v) | ||||||
|     // this.diffuse && (this.diffuse.alt = v) |     // this.diffuse && (this.diffuse.alt = v) | ||||||
|     this.renewPoint() |     this.renewPoint() | ||||||
| @ -1716,6 +1880,22 @@ class BillboardObject extends Base { | |||||||
|         this.cameraSelect && this.cameraSelect() |         this.cameraSelect && this.cameraSelect() | ||||||
|         this.ISCSelect && this.ISCSelect() |         this.ISCSelect && this.ISCSelect() | ||||||
|         this.goodsSelect && this.goodsSelect() |         this.goodsSelect && this.goodsSelect() | ||||||
|  |  | ||||||
|  |         let col = document.createElement('div') | ||||||
|  |         col.className = 'col' | ||||||
|  |         col.style.flex = '0 0 110px' | ||||||
|  |         col.innerHTML = ` | ||||||
|  |           <span class="label">属性框</span> | ||||||
|  |           <input class="btn-switch" type="checkbox"> | ||||||
|  |         ` | ||||||
|  |  | ||||||
|  |         let row = this._DialogObject._element.content.getElementsByClassName('attribute')[0].getElementsByClassName('row')[0] | ||||||
|  |         row.appendChild(col) | ||||||
|  |         let boxSwitch = col.getElementsByClassName('btn-switch')[0] | ||||||
|  |         boxSwitch.checked = this.attributeBoxState | ||||||
|  |         boxSwitch.addEventListener('change', (e) => { | ||||||
|  |           this.attributeBoxState = boxSwitch.checked | ||||||
|  |         }) | ||||||
|         let tagData = this.attributeSelect |         let tagData = this.attributeSelect | ||||||
|         let attributeElm = this._DialogObject._element.content.getElementsByClassName( |         let attributeElm = this._DialogObject._element.content.getElementsByClassName( | ||||||
|           'attribute-select-box' |           'attribute-select-box' | ||||||
| @ -2227,6 +2407,7 @@ class BillboardObject extends Base { | |||||||
|     this.attributeCamera = this.options.attribute.camera.content |     this.attributeCamera = this.options.attribute.camera.content | ||||||
|     this.attributeGoods = this.options.attribute.goods.content |     this.attributeGoods = this.options.attribute.goods.content | ||||||
|     this.attributeISC = this.options.attribute.ISC.content |     this.attributeISC = this.options.attribute.ISC.content | ||||||
|  |     this.attributeBoxState = this.options.attributeBoxState | ||||||
|     this.cameraSelect && this.cameraSelect() |     this.cameraSelect && this.cameraSelect() | ||||||
|     this.goodsSelect && this.goodsSelect() |     this.goodsSelect && this.goodsSelect() | ||||||
|   } |   } | ||||||
| @ -2234,6 +2415,7 @@ class BillboardObject extends Base { | |||||||
|   async remove() { |   async remove() { | ||||||
|     await remove_entity_from_cluster(this.sdk.viewer, this.entity) |     await remove_entity_from_cluster(this.sdk.viewer, this.entity) | ||||||
|     this.entity = null |     this.entity = null | ||||||
|  |     this.attributeBoxState = false | ||||||
|     if (!this.sdk.viewer || !this.sdk.viewer.entities) { |     if (!this.sdk.viewer || !this.sdk.viewer.entities) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
| @ -2424,6 +2606,7 @@ class BillboardObject extends Base { | |||||||
|     } |     } | ||||||
|     if (height !== undefined) { |     if (height !== undefined) { | ||||||
|       this.options.positions.alt = Number(Number(height).toFixed(2)) |       this.options.positions.alt = Number(Number(height).toFixed(2)) | ||||||
|  |       this.#_billboardHeight = this.options.positions.alt | ||||||
|       this._elms.alt && |       this._elms.alt && | ||||||
|         this._elms.alt.forEach(item => { |         this._elms.alt.forEach(item => { | ||||||
|           item.value = this.options.positions.alt |           item.value = this.options.positions.alt | ||||||
| @ -2439,6 +2622,7 @@ class BillboardObject extends Base { | |||||||
|           switch (this._elms.heightMode.value) { |           switch (this._elms.heightMode.value) { | ||||||
|             case '海拔高度': |             case '海拔高度': | ||||||
|               heightElm.value = this.options.positions.alt |               heightElm.value = this.options.positions.alt | ||||||
|  |               this.#_billboardHeight = this.options.positions.alt | ||||||
|               break |               break | ||||||
|             case '相对地表': |             case '相对地表': | ||||||
|               if (this.sdk.viewer.scene.terrainProvider.availability) { |               if (this.sdk.viewer.scene.terrainProvider.availability) { | ||||||
| @ -2454,15 +2638,18 @@ class BillboardObject extends Base { | |||||||
|                   heightElm.value = Number( |                   heightElm.value = Number( | ||||||
|                     (this.options.positions.alt - position[0].height).toFixed(2) |                     (this.options.positions.alt - position[0].height).toFixed(2) | ||||||
|                   ) |                   ) | ||||||
|  |                   this.#_billboardHeight = this.options.positions.alt | ||||||
|                 }) |                 }) | ||||||
|               } else { |               } else { | ||||||
|                 heightElm.value = this.options.positions.alt |                 heightElm.value = this.options.positions.alt | ||||||
|  |                 this.#_billboardHeight = this.options.positions.alt | ||||||
|               } |               } | ||||||
|               break |               break | ||||||
|             case '依附地表': |             case '依附地表': | ||||||
|               break |               break | ||||||
|             case '依附模型': |             case '依附模型': | ||||||
|               heightElm.value = this.options.positions.alt |               heightElm.value = this.options.positions.alt | ||||||
|  |               this.#_billboardHeight = this.options.positions.alt | ||||||
|               break |               break | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| @ -2736,6 +2923,219 @@ class BillboardObject extends Base { | |||||||
|         (this.originalOptions.customView = this.options.customView) |         (this.originalOptions.customView = this.options.customView) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   get attributeBoxState() { | ||||||
|  |     return this.options.attributeBoxState | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   set attributeBoxState(state) { | ||||||
|  |     state = state ? true : false | ||||||
|  |     this.options.attributeBoxState = state | ||||||
|  |     document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |     document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |     if (this.attributeElm) { | ||||||
|  |       this.sdk.viewer._element.removeChild(this.attributeElm) | ||||||
|  |       this.attributeElm = null | ||||||
|  |     } | ||||||
|  |     this.sdk.viewer.scene.postRender.removeEventListener(this.#_postRenderEvent) | ||||||
|  |     if (state && this.sdk && this.sdk.viewer && this.sdk.viewer._element && this.show) { | ||||||
|  |       let attributeElm = document.createElement('div') | ||||||
|  |       this.attributeElm = attributeElm | ||||||
|  |       attributeElm.className = 'billboard-attribute-box' | ||||||
|  |       attributeElm.style.top = '0px' | ||||||
|  |       attributeElm.style.left = '0px' | ||||||
|  |       attributeElm.style.width = 0 | ||||||
|  |       attributeElm.style.height = 0 | ||||||
|  |       if(getState()) { | ||||||
|  |         attributeElm.style.display = 'none' | ||||||
|  |       } | ||||||
|  |       // attributeElm.innerHTML = this.options.richTextContent | ||||||
|  |       this.sdk.viewer._element.appendChild(attributeElm) | ||||||
|  |       let linkHtml = '' | ||||||
|  |       let goodsHtml = '' | ||||||
|  |       let richTextHtml = '' | ||||||
|  |       for (let i = 0; i < this.options.attribute.link.content.length; i++) { | ||||||
|  |         linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><iframe width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" ></iframe></DIV-cy-tab-pane>` | ||||||
|  |       } | ||||||
|  |       if (this.options.attribute.goods && this.options.attribute.goods.content && this.options.attribute.goods.content.length > 0) { | ||||||
|  |         goodsHtml += `<DIV-cy-tab-pane label="物资"> | ||||||
|  |         <div class="table"> | ||||||
|  |           <div class="table-head"> | ||||||
|  |             <div class="tr"> | ||||||
|  |               <div class="th" style="width: 20%; flex: 0 20%;">序号</div> | ||||||
|  |               <div class="th" style="width: 40%; flex: 0 40%;">名称</div> | ||||||
|  |               <div class="th" style="width: 40%; flex: 0 40%;">数量</div> | ||||||
|  |             </div> | ||||||
|  |           </div> | ||||||
|  |           <div class="table-body"> | ||||||
|  |         ` | ||||||
|  |         for (let i = 0; i < this.options.attribute.goods.content.length; i++) { | ||||||
|  |           goodsHtml += `<div class="tr"> | ||||||
|  |             <div class="td" style="width: 20%; flex: 0 20%;">${i + 1}</div> | ||||||
|  |             <div class="td" style="width: 40%; flex: 0 40%;">${this.options.attribute.goods.content[i].name}</div> | ||||||
|  |             <div class="td" style="width: 40%; flex: 0 40%;">${this.options.attribute.goods.content[i].cnt}</div> | ||||||
|  |           </div>` | ||||||
|  |         } | ||||||
|  |         goodsHtml += `</div></div></DIV-cy-tab-pane>` | ||||||
|  |       } | ||||||
|  |       if (this.options.richTextContent) { | ||||||
|  |         richTextHtml = `<DIV-cy-tab-pane label="富文本"> | ||||||
|  |           ${this.options.richTextContent} | ||||||
|  |         </DIV-cy-tab-pane>` | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       let boxHtml = ` | ||||||
|  |         <span class="drag-nook left-top"></span> | ||||||
|  |         <span class="drag-nook right-top"></span> | ||||||
|  |         ` | ||||||
|  |  | ||||||
|  |       if (!linkHtml && !goodsHtml && !richTextHtml) { | ||||||
|  |         boxHtml = boxHtml + '<p style="margin: 0;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;backdrop-filter: blur(2px);">暂无属性信息</p><div class="billboard-attribute-box-line"></div>' | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         boxHtml = boxHtml + ` | ||||||
|  |         <DIV-cy-tabs class="tabs"> | ||||||
|  |           ${richTextHtml} | ||||||
|  |           ${goodsHtml} | ||||||
|  |           ${linkHtml} | ||||||
|  |         </DIV-cy-tabs> | ||||||
|  |         <div class="billboard-attribute-box-line"></div>` | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       attributeElm.innerHTML = boxHtml | ||||||
|  |  | ||||||
|  |       if (attributeElm.getElementsByClassName('tabs')[0]) { | ||||||
|  |         let tabsElm = new cy_tabs(attributeElm.getElementsByClassName('tabs')[0], undefined, this.sdk) | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       let imgElm = attributeElm.getElementsByTagName('img') | ||||||
|  |       for (let i = 0; i < imgElm.length; i++) { | ||||||
|  |         if (!imgElm[i].style.width) { | ||||||
|  |           imgElm[i].style.width = '100%' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       this.sdk.viewer.scene.postRender.addEventListener(this.#_postRenderEvent) | ||||||
|  |       let leftOnmousedown = (e) => { | ||||||
|  |         if (this.options.attributePos.width < 200) { | ||||||
|  |           this.options.attributePos.width = 200 | ||||||
|  |         } | ||||||
|  |         if (this.options.attributePos.height < 120) { | ||||||
|  |           this.options.attributePos.height = 120 | ||||||
|  |         } | ||||||
|  |         let x = e.x | ||||||
|  |         let y = e.y | ||||||
|  |         let width = this.options.attributePos.width | ||||||
|  |         let height = this.options.attributePos.height | ||||||
|  |         let positionx = this.options.attributePos.x | ||||||
|  |         this.sdk.viewer._element.onmousemove = (e2) => { | ||||||
|  |           this.options.attributePos.width = width + (x - e2.x) | ||||||
|  |           this.options.attributePos.height = height + (y - e2.y) | ||||||
|  |           if (this.options.attributePos.width < 200) { | ||||||
|  |             this.options.attributePos.width = 200 | ||||||
|  |           } | ||||||
|  |           else { | ||||||
|  |             this.options.attributePos.x = positionx - (x - e2.x) | ||||||
|  |           } | ||||||
|  |           if (this.options.attributePos.height < 120) { | ||||||
|  |             this.options.attributePos.height = 120 | ||||||
|  |           } | ||||||
|  |           // this.options.attributePos.y = positiony + (y - e2.y) | ||||||
|  |         } | ||||||
|  |         document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |         document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |       } | ||||||
|  |       let rightOnmousedown = (e) => { | ||||||
|  |         let x = e.x | ||||||
|  |         let y = e.y | ||||||
|  |         if (this.options.attributePos.width < 200) { | ||||||
|  |           this.options.attributePos.width = 200 | ||||||
|  |         } | ||||||
|  |         if (this.options.attributePos.height < 120) { | ||||||
|  |           this.options.attributePos.height = 120 | ||||||
|  |         } | ||||||
|  |         let width = this.options.attributePos.width | ||||||
|  |         let height = this.options.attributePos.height | ||||||
|  |         this.sdk.viewer._element.onmousemove = (e2) => { | ||||||
|  |           this.options.attributePos.width = width + (e2.x - x) | ||||||
|  |           this.options.attributePos.height = height + (y - e2.y) | ||||||
|  |         } | ||||||
|  |         document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |         document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |       } | ||||||
|  |       // leftTopElm.onmousedown = (e) => { | ||||||
|  |       //   console.log(1111111111) | ||||||
|  |       //   if (this.options.attributePos.width < 200) { | ||||||
|  |       //     this.options.attributePos.width = 200 | ||||||
|  |       //   } | ||||||
|  |       //   if (this.options.attributePos.height < 120) { | ||||||
|  |       //     this.options.attributePos.height = 120 | ||||||
|  |       //   } | ||||||
|  |       //   let x = e.x | ||||||
|  |       //   let y = e.y | ||||||
|  |       //   let width = this.options.attributePos.width | ||||||
|  |       //   let height = this.options.attributePos.height | ||||||
|  |       //   let positionx = this.options.attributePos.x | ||||||
|  |       //   this.sdk.viewer._element.onmousemove = (e2) => { | ||||||
|  |       //     this.options.attributePos.width = width + (x - e2.x) | ||||||
|  |       //     this.options.attributePos.height = height + (y - e2.y) | ||||||
|  |       //     if (this.options.attributePos.width < 200) { | ||||||
|  |       //       this.options.attributePos.width = 200 | ||||||
|  |       //     } | ||||||
|  |       //     else { | ||||||
|  |       //       this.options.attributePos.x = positionx - (x - e2.x) | ||||||
|  |       //     } | ||||||
|  |       //     if (this.options.attributePos.height < 120) { | ||||||
|  |       //       this.options.attributePos.height = 120 | ||||||
|  |       //     } | ||||||
|  |       //     // this.options.attributePos.y = positiony + (y - e2.y) | ||||||
|  |       //   } | ||||||
|  |       //   document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |       //   document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |       // } | ||||||
|  |       // rightTopElm.onmousedown = (e) => { | ||||||
|  |       //   let x = e.x | ||||||
|  |       //   let y = e.y | ||||||
|  |       //   if (this.options.attributePos.width < 200) { | ||||||
|  |       //     this.options.attributePos.width = 200 | ||||||
|  |       //   } | ||||||
|  |       //   if (this.options.attributePos.height < 120) { | ||||||
|  |       //     this.options.attributePos.height = 120 | ||||||
|  |       //   } | ||||||
|  |       //   let width = this.options.attributePos.width | ||||||
|  |       //   let height = this.options.attributePos.height | ||||||
|  |       //   this.sdk.viewer._element.onmousemove = (e2) => { | ||||||
|  |       //     this.options.attributePos.width = width + (e2.x - x) | ||||||
|  |       //     this.options.attributePos.height = height + (y - e2.y) | ||||||
|  |       //   } | ||||||
|  |       //   document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |       //   document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |       // } | ||||||
|  |  | ||||||
|  |       attributeElm.onmousedown = (e) => { | ||||||
|  |         attributeElm.style.pointerEvents = 'none' | ||||||
|  |         if (e.target.className.indexOf('left-top') != -1) { | ||||||
|  |           leftOnmousedown(e) | ||||||
|  |         } | ||||||
|  |         else if (e.target.className.indexOf('right-top') != -1) { | ||||||
|  |           rightOnmousedown(e) | ||||||
|  |         } | ||||||
|  |         else { | ||||||
|  |           let x = e.x | ||||||
|  |           let y = e.y | ||||||
|  |           let oldX = this.options.attributePos.x | ||||||
|  |           let oldXY = this.options.attributePos.y | ||||||
|  |           let height = this.options.attributePos.height | ||||||
|  |           this.sdk.viewer._element.onmousemove = (e2) => { | ||||||
|  |             this.options.attributePos.x = oldX + (e2.x - x) | ||||||
|  |             this.options.attributePos.y = oldXY - (e2.y - y) | ||||||
|  |           } | ||||||
|  |           document.addEventListener('mouseup', this.#_destroyMouseEvent); | ||||||
|  |           document.addEventListener('mouseleave', this.#_destroyMouseEvent); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| export default BillboardObject | export default BillboardObject | ||||||
|  | |||||||
| @ -333,7 +333,7 @@ class CircleObject extends Base { | |||||||
|   } |   } | ||||||
|   set labelShow(v) { |   set labelShow(v) { | ||||||
|     this.options.label.show = v |     this.options.label.show = v | ||||||
|     if (this.show && !this.showView || this.showView == 3) { |     if (this.show && (!this.showView || this.showView == 3)) { | ||||||
|       this.label.show = v |       this.label.show = v | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|  | |||||||
| @ -17,18 +17,6 @@ function html(that) { | |||||||
|     </div> |     </div> | ||||||
|     <span class="custom-divider"></span> |     <span class="custom-divider"></span> | ||||||
|     <div class="div-item"> |     <div class="div-item"> | ||||||
|         <div class="row"> |  | ||||||
|             <div class="col" mode="0"> |  | ||||||
|                 <button class="anchor btn">调整锚点</button> |  | ||||||
|             </div> |  | ||||||
|             <div class="col mode-box"> |  | ||||||
|                 <span class="label" style="flex: unset;">军标模式</span> |  | ||||||
|                 <div class="mode"></div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     </div> |  | ||||||
|     <span class="custom-divider" mode="0"></span> |  | ||||||
|     <div class="div-item" mode="0"> |  | ||||||
|         <div class="row"> |         <div class="row"> | ||||||
|             <div class="col"> |             <div class="col"> | ||||||
|                 <span class="label">旋转角度</span> |                 <span class="label">旋转角度</span> | ||||||
| @ -62,11 +50,11 @@ function html(that) { | |||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|     <span class="custom-divider"></span> |     <span class="custom-divider"></span> | ||||||
|     <div class="div-item" mode="0"> |     <div class="div-item"> | ||||||
|         <div class="row"> |         <div class="row"> | ||||||
|             <div class="col" style="flex: 5;"> |             <div class="col" style="flex: 5;"> | ||||||
|                 <span class="label">文字内容</span> |                 <span class="label">文字内容</span> | ||||||
|                 <input class="input" type="text" @model="textValue"> |                 <input class="input" type="text" @model="textValue" maxlength="30"> | ||||||
|             </div> |             </div> | ||||||
|             <div class="col"> |             <div class="col"> | ||||||
|                 <button class="btn" @click="textPosPick">设置位置</span> |                 <button class="btn" @click="textPosPick">设置位置</span> | ||||||
| @ -82,9 +70,9 @@ function html(that) { | |||||||
|                 <div class="textColor"></div> |                 <div class="textColor"></div> | ||||||
|             </div> |             </div> | ||||||
|             <div class="col"> |             <div class="col"> | ||||||
|                 <span class="label">文字大小</span> |                 <span class="label">字体大小</span> | ||||||
|                 <div class="input-number input-number-unit-2"> |                 <div class="input-number input-number-unit-2"> | ||||||
|                     <input class="input" type="number" title="" min="1" max="99" step="1" @model="textFontSize"> |                     <input class="input" type="number" title="" min="1" max="99" @model="textFontSize"> | ||||||
|                     <span class="unit">px</span> |                     <span class="unit">px</span> | ||||||
|                     <span class="arrow"></span> |                     <span class="arrow"></span> | ||||||
|                 </div> |                 </div> | ||||||
| @ -113,98 +101,6 @@ function html(that) { | |||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|     <div class="div-item" mode="1"> |  | ||||||
|         <div class="row"> |  | ||||||
|             <div class="col height-mode-box" style="flex: 0 0 155px;margin-right: 10px;"> |  | ||||||
|                 <span class="label" style="flex: 0 0 56px;">高度模式</span> |  | ||||||
|                 <div class="height-mode"></div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin: 0 10px;"> |  | ||||||
|                 <div class="height-box" style="display: flex; align-items: center;"> |  | ||||||
|                     <span class="label" style="flex: 0 0 56px;">高度</span> |  | ||||||
|                     <div class="input-number input-number-unit-1"> |  | ||||||
|                         <input class="input height" type="number" title="" min="-9999999" max="999999999"> |  | ||||||
|                         <span class="unit">m</span> |  | ||||||
|                         <span class="arrow"></span> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin-left: 10px;"> |  | ||||||
|                 <span class="label">图标倍数</span> |  | ||||||
|                 <div class="input-number input-number-unit-1"> |  | ||||||
|                     <input class="input" type="number" title="" data-min="0.1" max="99" @model="billboardScale"> |  | ||||||
|                     <span class="unit">倍</span> |  | ||||||
|                     <span class="arrow"></span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|         <div class="row"> |  | ||||||
|             <div class="col" style="flex: 0 0 155px;margin-right: 10px;"> |  | ||||||
|                 <span class="label">视野缩放</span> |  | ||||||
|                 <input class="btn-switch" type="checkbox" @model="billboardScaleByDistance"> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin: 0 10px;"> |  | ||||||
|                 <span class="label">最近距离</span> |  | ||||||
|                 <div class="input-number input-number-unit-1"> |  | ||||||
|                     <input class="input" type="number" title="" min="1" max="99999999" @model="billboardNear"> |  | ||||||
|                     <span class="unit">m</span> |  | ||||||
|                     <span class="arrow"></span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin-left: 10px;"> |  | ||||||
|                 <span class="label">最远距离</span> |  | ||||||
|                 <div class="input-number input-number-unit-1"> |  | ||||||
|                     <input class="input" type="number" title="" min="1" max="99999999" @model="billboardFar"> |  | ||||||
|                     <span class="unit">m</span> |  | ||||||
|                     <span class="arrow"></span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|         <h4>文字设置</h4> |  | ||||||
|         <div class="row"> |  | ||||||
|             <div class="col" style="flex: 0 0 80px;margin: 0 10px 0 0;;"> |  | ||||||
|                 <span class="label" style="flex: none;">显隐</span> |  | ||||||
|                 <input class="btn-switch" type="checkbox" @model="labelShow"> |  | ||||||
|             </div> |  | ||||||
|             <div class="col font-select-box" style="margin: 0 0px;flex: 0 0 160px;"> |  | ||||||
|                 <span class="label" style="flex: none;">字体选择</span> |  | ||||||
|                 <div class="input input-select font-select"></div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin: 0 10px;"> |  | ||||||
|                 <span class="label">文字大小</span> |  | ||||||
|                 <div class="input-number input-number-unit-2"> |  | ||||||
|                     <input class="input label-font-size" type="number" title="" min="1" max="99" step="1" style="width: 70px;"> |  | ||||||
|                     <span class="unit">px</span> |  | ||||||
|                     <span class="arrow"></span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin-left: 10px;"> |  | ||||||
|                 <span class="label">文字颜色</span> |  | ||||||
|                 <div class="labelColor"></div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|         <div class="row" style="justify-content: flex-start;"> |  | ||||||
|             <div class="col font-select-box" style="margin: 0 0px;flex: 0 0 70px;"> |  | ||||||
|                 <span class="label" style="flex: none;">文字偏移</span> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin: 0 10px;flex: 0 0 100px;"> |  | ||||||
|                 <span class="label">x</span> |  | ||||||
|                 <div class="input-number input-number-unit-2"> |  | ||||||
|                     <input class="input label-offset-x" type="number" title="" min="-999" max="999" step="1"> |  | ||||||
|                     <span class="unit">px</span> |  | ||||||
|                     <span class="arrow"></span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col" style="margin: 0 10px;flex: 0 0 100px;"> |  | ||||||
|                 <span class="label">y</span> |  | ||||||
|                 <div class="input-number input-number-unit-2"> |  | ||||||
|                     <input class="input label-offset-y" type="number" title="" min="-999" max="999" step="1"> |  | ||||||
|                     <span class="unit">px</span> |  | ||||||
|                     <span class="arrow"></span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     </div> |  | ||||||
|     <span class="custom-divider"></span> |     <span class="custom-divider"></span> | ||||||
|     <div class="div-item attribute-info"> |     <div class="div-item attribute-info"> | ||||||
|         <div class="row"> |         <div class="row"> | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -893,7 +893,6 @@ class PolylineObject extends Base { | |||||||
|       }) |       }) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|    |  | ||||||
|   get labelBackgroundColorEnd() { |   get labelBackgroundColorEnd() { | ||||||
|     return this.options.label.backgroundColor[1] |     return this.options.label.backgroundColor[1] | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
|  * 文本框 |  * 文本框 | ||||||
|  */ |  */ | ||||||
| import Base from "../index"; | import Base from "../index"; | ||||||
|  | import { syncData, getSdk } from '../../../Global/MultiViewportMode' | ||||||
| import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global' | import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global' | ||||||
| class TextBox extends Base { | class TextBox extends Base { | ||||||
|   /** |   /** | ||||||
| @ -29,7 +30,15 @@ class TextBox extends Base { | |||||||
|     this.textDom = undefined |     this.textDom = undefined | ||||||
|     this.create(this) |     this.create(this) | ||||||
|     this.sdk.addIncetance(this.options.id, this) |     this.sdk.addIncetance(this.options.id, this) | ||||||
|  |  | ||||||
|     this.callback = callback |     this.callback = callback | ||||||
|  |  | ||||||
|  |     syncData(this.sdk, this.options.id) | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   get type() { | ||||||
|  |     return 'TextBox' | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   async create(that) { |   async create(that) { | ||||||
| @ -38,6 +47,7 @@ class TextBox extends Base { | |||||||
|     let dom = document.createElement('span'); |     let dom = document.createElement('span'); | ||||||
|     dom.id = that.options.id |     dom.id = that.options.id | ||||||
|     dom.className = 'popup-textarea' |     dom.className = 'popup-textarea' | ||||||
|  |     dom.style.zIndex = 1 | ||||||
|     // 创建textarea元素 |     // 创建textarea元素 | ||||||
|     var textarea = document.createElement('textarea'); |     var textarea = document.createElement('textarea'); | ||||||
|     textarea.className = 'textarea' |     textarea.className = 'textarea' | ||||||
| @ -124,11 +134,49 @@ class TextBox extends Base { | |||||||
|   } |   } | ||||||
|   async getwords(words) { |   async getwords(words) { | ||||||
|     this.options.text = words |     this.options.text = words | ||||||
|  |  | ||||||
|  |     let { sdkP } = getSdk() | ||||||
|  |     if (this.sdk === sdkP && sdkP) {//三维 | ||||||
|       this.callback(this.options) |       this.callback(this.options) | ||||||
|  |       syncData(this.sdk, this.options.id) | ||||||
|  |     } | ||||||
|  |     else if (sdkP) {//二维 | ||||||
|  |       sdkP.entityMap.get(this.options.id).text = words | ||||||
|  |       sdkP.entityMap.get(this.options.id).twoToThree(this.options.position) | ||||||
|  |     } else if (!sdkP) { | ||||||
|  |       this.callback(this.options) | ||||||
|  |       syncData(this.sdk, this.options.id) | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   async twoToThree(position) { | ||||||
|  |     let that = this | ||||||
|  |     that.sdk.viewer.scene.postRender.removeEventListener(that.handler); | ||||||
|  |     let posi = Cesium.Cartesian3.fromDegrees(position.lng, position.lat, position.alt) | ||||||
|  |  | ||||||
|  |     that.handler = function () { | ||||||
|  |       const position = Cesium.SceneTransforms.wgs84ToWindowCoordinates( | ||||||
|  |         that.sdk.viewer.scene, posi | ||||||
|  |       ); | ||||||
|  |       if (position) { | ||||||
|  |         let width = that.textDom.clientWidth * 1 | ||||||
|  |         let height = that.textDom.clientHeight * 1 | ||||||
|  |         that.textDom.style.left = `${position.x - width / 2}px`; | ||||||
|  |         that.textDom.style.top = `${position.y - height}px`; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     that.sdk.viewer.scene.postRender.addEventListener(that.handler); | ||||||
|   } |   } | ||||||
|   async returnFun() { |   async returnFun() { | ||||||
|     return this.handler |     return this.handler | ||||||
|   } |   } | ||||||
|  |   get text() { | ||||||
|  |     return this.options.text | ||||||
|  |   } | ||||||
|  |   set text(val) { | ||||||
|  |     this.options.text = val | ||||||
|  |     this.textDom.querySelector('textarea').value = val | ||||||
|  |     this.callback(this.options) | ||||||
|  |   } | ||||||
|   get onClick() { |   get onClick() { | ||||||
|     return this.clickCallBack |     return this.clickCallBack | ||||||
|   } |   } | ||||||
| @ -145,6 +193,7 @@ class TextBox extends Base { | |||||||
|   set show(v) { |   set show(v) { | ||||||
|     this.options.show = v |     this.options.show = v | ||||||
|     this.textDom && (this.textDom.style.display = v ? 'block' : 'none'); |     this.textDom && (this.textDom.style.display = v ? 'block' : 'none'); | ||||||
|  |     syncData(this.sdk, this.options.id) | ||||||
|   } |   } | ||||||
|   get position() { |   get position() { | ||||||
|     return this.options.position |     return this.options.position | ||||||
| @ -235,6 +284,8 @@ class TextBox extends Base { | |||||||
|     if (this.textDom && this.textDom.parentNode) { |     if (this.textDom && this.textDom.parentNode) { | ||||||
|       this.sdk.viewer.cesiumWidget.container.removeChild(this.textDom); |       this.sdk.viewer.cesiumWidget.container.removeChild(this.textDom); | ||||||
|     } |     } | ||||||
|  |     await this.sdk.removeIncetance(this.options.id) | ||||||
|  |     syncData(this.sdk, this.options.id) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   flicker() { } |   flicker() { } | ||||||
|  | |||||||
| @ -182,6 +182,23 @@ function html() { | |||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <span class="custom-divider"></span> |     <span class="custom-divider"></span> | ||||||
|  |     <div class="div-item"> | ||||||
|  |       <div class="row"> | ||||||
|  |         <div class="col"> | ||||||
|  |           <span class="label">油耗</span> | ||||||
|  |           <div class="input-number input-number-unit-6" style="width: 170px;"> | ||||||
|  |             <input class="input" type="number" title="" min="0" max="99999999" @model="unitFuelConsumption"> | ||||||
|  |             <span class="unit">L/100km</span> | ||||||
|  |             <span class="arrow"></span> | ||||||
|  |           </div> | ||||||
|  |         </div> | ||||||
|  |         <div class="col" style="flex: 0 0 0;"> | ||||||
|  |           <span class="label">总油耗</span> | ||||||
|  |           <input class="btn-switch" type="checkbox" @model="fuelShow"> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |     <span class="custom-divider"></span> | ||||||
|     ` |     ` | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
| @ -78,6 +78,7 @@ class TrajectoryMotion extends Base { | |||||||
|     this.options.line.smooth = options.line.smooth ? options.line.smooth : false |     this.options.line.smooth = options.line.smooth ? options.line.smooth : false | ||||||
|     this.options.line.noseToTail = options.line.noseToTail ? options.line.noseToTail : false |     this.options.line.noseToTail = options.line.noseToTail ? options.line.noseToTail : false | ||||||
|     this.positions_smooth = [] |     this.positions_smooth = [] | ||||||
|  |     this.options.unitFuelConsumption = options.unitFuelConsumption || 0 | ||||||
|     this.options.ground = options.ground || false |     this.options.ground = options.ground || false | ||||||
|     this.options.state = (options.state || options.state === false) ? options.state : true |     this.options.state = (options.state || options.state === false) ? options.state : true | ||||||
|     this.options.routeDirection = (options.routeDirection || options.routeDirection === false) ? options.routeDirection : true |     this.options.routeDirection = (options.routeDirection || options.routeDirection === false) ? options.routeDirection : true | ||||||
| @ -180,7 +181,8 @@ class TrajectoryMotion extends Base { | |||||||
|         if (this.realTimeRoute) { |         if (this.realTimeRoute) { | ||||||
|           this.realTimeLine && (this.realTimeLine.show = (!this.showView || this.showView == 3 || !sdkD) ? true : false) |           this.realTimeLine && (this.realTimeLine.show = (!this.showView || this.showView == 3 || !sdkD) ? true : false) | ||||||
|         } |         } | ||||||
|         this.label && (this.label.show = (!this.showView || this.showView == 3 || !sdkD) ? this.options.label.show : false) |         this.label && (this.label.show = (!this.showView || this.showView == 3) ? this.options.label.show : false) | ||||||
|  |         this.fuelLabel && (this.fuelLabel.show = (!this.showView || this.showView == 3) ? this.options.fuelShow : false) | ||||||
|       } |       } | ||||||
|       else { |       else { | ||||||
|         this.model.show = (!this.showView || this.showView == 3 || !sdkD) ? this.options.show : false |         this.model.show = (!this.showView || this.showView == 3 || !sdkD) ? this.options.show : false | ||||||
| @ -203,6 +205,7 @@ class TrajectoryMotion extends Base { | |||||||
|           this.keyPoints[i].show = (!this.showView || this.showView == 3) ? show : false |           this.keyPoints[i].show = (!this.showView || this.showView == 3) ? show : false | ||||||
|         } |         } | ||||||
|         this.label && (this.label.show = false) |         this.label && (this.label.show = false) | ||||||
|  |         this.fuelLabel && (this.fuelLabel.show = false) | ||||||
|         this.viewFollow = false |         this.viewFollow = false | ||||||
|       } |       } | ||||||
|  |  | ||||||
| @ -257,14 +260,17 @@ class TrajectoryMotion extends Base { | |||||||
|       // Cesium.Matrix4.multiplyByTranslation(this.model.modelMatrix, new Cesium.Cartesian3(0, 0, -difference), this.model.modelMatrix) |       // Cesium.Matrix4.multiplyByTranslation(this.model.modelMatrix, new Cesium.Cartesian3(0, 0, -difference), this.model.modelMatrix) | ||||||
|       // Cesium.Matrix4.getTranslation(this.model.modelMatrix, this.model.position) |       // Cesium.Matrix4.getTranslation(this.model.modelMatrix, this.model.position) | ||||||
|       this.label && (this.label.show = this.label.show) |       this.label && (this.label.show = this.label.show) | ||||||
|  |       this.fuelLabel && (this.fuelLabel.show = this.fuelLabel.show) | ||||||
|       if (this.options.label.position) { |       if (this.options.label.position) { | ||||||
|         setTimeout(() => { |         setTimeout(() => { | ||||||
|           if (this.options.label.position.alt) { |           if (this.options.label.position.alt) { | ||||||
|             this.label && (this.label.position = [this.options.label.position.lng, this.options.label.position.lat, this.options.label.position.alt]) |             this.label && (this.label.position = [this.options.label.position.lng, this.options.label.position.lat, this.options.label.position.alt]) | ||||||
|  |             this.fuelLabel && (this.fuelLabel.position = [this.options.label.position.lng, this.options.label.position.lat, this.options.label.position.alt]) | ||||||
|           } |           } | ||||||
|           else { |           else { | ||||||
|             this.getClampToHeight({ lng: this.options.label.position.lng, lat: this.options.label.position.lat }).then((height) => { |             this.getClampToHeight({ lng: this.options.label.position.lng, lat: this.options.label.position.lat }).then((height) => { | ||||||
|               this.label && (this.label.position = [this.options.label.position.lng, this.options.label.position.lat, height]) |               this.label && (this.label.position = [this.options.label.position.lng, this.options.label.position.lat, height]) | ||||||
|  |               this.fuelLabel && (this.fuelLabel.position = [this.options.label.position.lng, this.options.label.position.lat, height]) | ||||||
|             }) |             }) | ||||||
|           } |           } | ||||||
|         }, 0) |         }, 0) | ||||||
| @ -1168,7 +1174,9 @@ class TrajectoryMotion extends Base { | |||||||
|       show = false |       show = false | ||||||
|     } |     } | ||||||
|     if (this.show) { |     if (this.show) { | ||||||
|       this.label && (this.label.show = show) |       if (this.label) { | ||||||
|  |         this.label.show = show | ||||||
|  |         this.label.pixelOffset = this.options.label.pixelOffset + (this.fuelShow ? this.labelFontSize + 20 : 0) | ||||||
|         if (this.options.label.position) { |         if (this.options.label.position) { | ||||||
|           setTimeout(() => { |           setTimeout(() => { | ||||||
|             if (this.options.label.position.alt) { |             if (this.options.label.position.alt) { | ||||||
| @ -1182,6 +1190,7 @@ class TrajectoryMotion extends Base { | |||||||
|           }, 0); |           }, 0); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  |     } | ||||||
|     else { |     else { | ||||||
|       this.label && (this.label.show = false) |       this.label && (this.label.show = false) | ||||||
|     } |     } | ||||||
| @ -1197,6 +1206,7 @@ class TrajectoryMotion extends Base { | |||||||
|   set labelFontFamily(v) { |   set labelFontFamily(v) { | ||||||
|     this.options.label.fontFamily = v || 0 |     this.options.label.fontFamily = v || 0 | ||||||
|     this.label && (this.label.fontFamily = this.options.label.fontFamily) |     this.label && (this.label.fontFamily = this.options.label.fontFamily) | ||||||
|  |     this.fuelLabel && (this.fuelLabel.fontFamily = this.options.label.fontFamily) | ||||||
|  |  | ||||||
|     let name = getFontFamilyName(this.labelFontFamily) || '' |     let name = getFontFamilyName(this.labelFontFamily) || '' | ||||||
|     this._elms.labelFontFamily && |     this._elms.labelFontFamily && | ||||||
| @ -1211,6 +1221,7 @@ class TrajectoryMotion extends Base { | |||||||
|   set labelColor(v) { |   set labelColor(v) { | ||||||
|     this.options.label.color = v |     this.options.label.color = v | ||||||
|     this.label && (this.label.color = v) |     this.label && (this.label.color = v) | ||||||
|  |     this.fuelLabel && (this.fuelLabel.color = v) | ||||||
|     if (this._elms.labelColor) { |     if (this._elms.labelColor) { | ||||||
|       this._elms.labelColor.forEach((item, i) => { |       this._elms.labelColor.forEach((item, i) => { | ||||||
|         let labelColorPicker = new YJColorPicker({ |         let labelColorPicker = new YJColorPicker({ | ||||||
| @ -1238,6 +1249,13 @@ class TrajectoryMotion extends Base { | |||||||
|   set labelFontSize(v) { |   set labelFontSize(v) { | ||||||
|     this.options.label.fontSize = v |     this.options.label.fontSize = v | ||||||
|     this.label && (this.label.fontSize = v) |     this.label && (this.label.fontSize = v) | ||||||
|  |     if (this.fuelLabel) { | ||||||
|  |       this.fuelLabel.fontSize = v | ||||||
|  |       this.label.pixelOffset = this.options.label.pixelOffset + v + 20 | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|  |       this.label.pixelOffset = this.options.label.pixelOffset | ||||||
|  |     } | ||||||
|     this._elms.labelFontSize && this._elms.labelFontSize.forEach((item) => { |     this._elms.labelFontSize && this._elms.labelFontSize.forEach((item) => { | ||||||
|       item.value = v |       item.value = v | ||||||
|     }) |     }) | ||||||
| @ -1249,6 +1267,7 @@ class TrajectoryMotion extends Base { | |||||||
|   set labelScaleByDistance(v) { |   set labelScaleByDistance(v) { | ||||||
|     this.options.label.scaleByDistance = v |     this.options.label.scaleByDistance = v | ||||||
|     this.label && (this.label.scaleByDistance = v) |     this.label && (this.label.scaleByDistance = v) | ||||||
|  |     this.fuelLabel && (this.fuelLabel.scaleByDistance = v) | ||||||
|     this._elms.labelScaleByDistance && this._elms.labelScaleByDistance.forEach((item) => { |     this._elms.labelScaleByDistance && this._elms.labelScaleByDistance.forEach((item) => { | ||||||
|       item.checked = v |       item.checked = v | ||||||
|     }) |     }) | ||||||
| @ -1264,6 +1283,7 @@ class TrajectoryMotion extends Base { | |||||||
|     } |     } | ||||||
|     this.options.label.near = near |     this.options.label.near = near | ||||||
|     this.label && (this.label.near = near) |     this.label && (this.label.near = near) | ||||||
|  |     this.fuelLabel && (this.fuelLabel.near = near) | ||||||
|     this._elms.labelNear && this._elms.labelNear.forEach((item) => { |     this._elms.labelNear && this._elms.labelNear.forEach((item) => { | ||||||
|       item.value = near |       item.value = near | ||||||
|     }) |     }) | ||||||
| @ -1279,11 +1299,66 @@ class TrajectoryMotion extends Base { | |||||||
|     } |     } | ||||||
|     this.options.label.far = far |     this.options.label.far = far | ||||||
|     this.label && (this.label.far = far) |     this.label && (this.label.far = far) | ||||||
|  |     this.fuelLabel && (this.fuelLabel.far = far) | ||||||
|     this._elms.labelFar && this._elms.labelFar.forEach((item) => { |     this._elms.labelFar && this._elms.labelFar.forEach((item) => { | ||||||
|       item.value = far |       item.value = far | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   get unitFuelConsumption() { | ||||||
|  |     return this.options.unitFuelConsumption | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   set unitFuelConsumption(v) { | ||||||
|  |     this.options.unitFuelConsumption = v | ||||||
|  |     this._elms.unitFuelConsumption && this._elms.unitFuelConsumption.forEach((item) => { | ||||||
|  |       item.value = v | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   get fuelShow() { | ||||||
|  |     return this.options.fuelShow | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   set fuelShow(v) { | ||||||
|  |     this.options.fuelShow = v | ||||||
|  |     let show = v | ||||||
|  |     if (this.show && (!this.showView || this.showView == 3)) { | ||||||
|  |       show = v | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|  |       show = false | ||||||
|  |     } | ||||||
|  |     if (this.show) { | ||||||
|  |       if (this.fuelLabel) { | ||||||
|  |         this.fuelLabel.show = show | ||||||
|  |         this.label.pixelOffset = this.options.label.pixelOffset + (show ? this.labelFontSize + 20 : 0) | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         this.label.pixelOffset = this.options.label.pixelOffset | ||||||
|  |       } | ||||||
|  |       if (this.options.label.position) { | ||||||
|  |         setTimeout(() => { | ||||||
|  |           if (this.options.label.position.alt) { | ||||||
|  |             this.fuelLabel && (this.fuelLabel.position = [this.options.label.position.lng, this.options.label.position.lat, this.options.label.position.alt]) | ||||||
|  |           } | ||||||
|  |           else { | ||||||
|  |             this.getClampToHeight({ lng: this.options.label.position.lng, lat: this.options.label.position.lat }).then((height) => { | ||||||
|  |               this.fuelLabel && (this.fuelLabel.position = [this.options.label.position.lng, this.options.label.position.lat, height]) | ||||||
|  |             }) | ||||||
|  |           } | ||||||
|  |         }, 0); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|  |       this.fuelLabel && (this.fuelLabel.show = false) | ||||||
|  |       this.label.pixelOffset = this.options.label.pixelOffset | ||||||
|  |     } | ||||||
|  |     this._elms.fuelShow && this._elms.fuelShow.forEach((item) => { | ||||||
|  |       item.checked = v | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  |  | ||||||
|   // 创建路径 |   // 创建路径 | ||||||
|   static addLine(that) { |   static addLine(that) { | ||||||
|     let positions_smooth = that.renewLinePositions(that.options.line.positions) |     let positions_smooth = that.renewLinePositions(that.options.line.positions) | ||||||
| @ -1402,6 +1477,7 @@ class TrajectoryMotion extends Base { | |||||||
|     } |     } | ||||||
|     let pos = that.smooth ? that.positions_smooth : Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArrayHeights) |     let pos = that.smooth ? that.positions_smooth : Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArrayHeights) | ||||||
|     TrajectoryMotion.createLabel(that) |     TrajectoryMotion.createLabel(that) | ||||||
|  |     TrajectoryMotion.createFuelLabel(that) | ||||||
|     that.modelMove(pos) |     that.modelMove(pos) | ||||||
|  |  | ||||||
|  |  | ||||||
| @ -1411,13 +1487,13 @@ class TrajectoryMotion extends Base { | |||||||
|   static async createLabel(that) { |   static async createLabel(that) { | ||||||
|     let labelPosition = that.cartesian3Towgs84(that.model.position, that.sdk.viewer) |     let labelPosition = that.cartesian3Towgs84(that.model.position, that.sdk.viewer) | ||||||
|     that.label = new LabelObject(that.sdk, { |     that.label = new LabelObject(that.sdk, { | ||||||
|       show: that.options.show ? (that.options.model.show ? that.options.label.show : false) : false, |       show: that.options.show ? (that.options.label.show ? true : false) : false, | ||||||
|       position: [labelPosition.lng, labelPosition.lat, labelPosition.alt], |       position: [labelPosition.lng, labelPosition.lat, labelPosition.alt], | ||||||
|       text: that.options.name, |       text: that.options.name, | ||||||
|       fontSize: that.options.label.fontSize, |       fontSize: that.options.label.fontSize, | ||||||
|       fontFamily: that.options.label.fontFamily, |       fontFamily: that.options.label.fontFamily, | ||||||
|       color: that.options.label.color, |       color: that.options.label.color, | ||||||
|       pixelOffset: that.options.label.pixelOffset, |       pixelOffset: that.options.label.pixelOffset + (that.options.fuelShow ? that.options.label.fontSize + 20 : 0), | ||||||
|       backgroundColor: that.options.label.backgroundColor, |       backgroundColor: that.options.label.backgroundColor, | ||||||
|       lineColor: that.options.label.lineColor, |       lineColor: that.options.label.lineColor, | ||||||
|       lineWidth: that.options.label.lineWidth, |       lineWidth: that.options.label.lineWidth, | ||||||
| @ -1427,6 +1503,26 @@ class TrajectoryMotion extends Base { | |||||||
|     }, that.model) |     }, that.model) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   static async createFuelLabel(that) { | ||||||
|  |     let labelPosition = that.cartesian3Towgs84(that.model.position, that.sdk.viewer) | ||||||
|  |     that.fuelLabel = new LabelObject(that.sdk, { | ||||||
|  |       show: that.options.show ? (that.options.fuelShow ? true : false) : false, | ||||||
|  |       // show: true, | ||||||
|  |       position: [labelPosition.lng, labelPosition.lat, labelPosition.alt], | ||||||
|  |       text: '总油耗:', | ||||||
|  |       fontSize: that.options.label.fontSize, | ||||||
|  |       fontFamily: that.options.label.fontFamily, | ||||||
|  |       color: that.options.label.color, | ||||||
|  |       pixelOffset: 0, | ||||||
|  |       backgroundColor: ['#6e6e6e', '#6e6e6e'], | ||||||
|  |       lineColor: '#00ffff00', | ||||||
|  |       lineWidth: 0, | ||||||
|  |       scaleByDistance: that.options.label.scaleByDistance, | ||||||
|  |       near: that.options.label.near, | ||||||
|  |       far: that.options.label.far | ||||||
|  |     }, that.model) | ||||||
|  |   } | ||||||
|  |  | ||||||
|   // 创建关键点 |   // 创建关键点 | ||||||
|   static async addKeyPoint(that) { |   static async addKeyPoint(that) { | ||||||
|     for (let i = 0; i < that.options.line.positions.length; i++) { |     for (let i = 0; i < that.options.line.positions.length; i++) { | ||||||
| @ -1531,8 +1627,8 @@ class TrajectoryMotion extends Base { | |||||||
|     else { |     else { | ||||||
|       setPosition(startDistance) |       setPosition(startDistance) | ||||||
|       setTimeout(() => { |       setTimeout(() => { | ||||||
|         _this.model && (_this.model.isMove = false) |         _this.model.isMove = false | ||||||
|       }, 500); |       }, 1000); | ||||||
|  |  | ||||||
|  |  | ||||||
|       animateUpdate() |       animateUpdate() | ||||||
| @ -1555,6 +1651,8 @@ class TrajectoryMotion extends Base { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     async function setPosition(distance) { |     async function setPosition(distance) { | ||||||
|  |       _this.totalFuelConsumption = Number((distance / 100 * _this.unitFuelConsumption).toFixed(2)) | ||||||
|  |       _this.fuelLabel.text = '总油耗:' + _this.totalFuelConsumption + ' L' | ||||||
|       _this.model.isMove = true |       _this.model.isMove = true | ||||||
|       let sdk2D = get2DView() |       let sdk2D = get2DView() | ||||||
|       let splitSdk = getSdk() |       let splitSdk = getSdk() | ||||||
| @ -1767,6 +1865,7 @@ class TrajectoryMotion extends Base { | |||||||
|       } |       } | ||||||
|       let labelPosition = _this.cartesian3Towgs84(position, _this.sdk.viewer) |       let labelPosition = _this.cartesian3Towgs84(position, _this.sdk.viewer) | ||||||
|       _this.label.position = [labelPosition.lng, labelPosition.lat, labelPosition.alt] |       _this.label.position = [labelPosition.lng, labelPosition.lat, labelPosition.alt] | ||||||
|  |       _this.fuelLabel.position = [labelPosition.lng, labelPosition.lat, labelPosition.alt] | ||||||
|       lastDistance = distance |       lastDistance = distance | ||||||
|       // console.log(position) |       // console.log(position) | ||||||
|       _this.realTimeRouteArray.push(position) |       _this.realTimeRouteArray.push(position) | ||||||
| @ -2088,7 +2187,7 @@ class TrajectoryMotion extends Base { | |||||||
|       rubricElm.style.color = '#ff5733'; |       rubricElm.style.color = '#ff5733'; | ||||||
|       rubricElm.style.display = 'none' |       rubricElm.style.display = 'none' | ||||||
|  |  | ||||||
|       rubricElm.innerHTML = `场景正北方向为轨迹前进正方向<div x-arrow="" class="custom__popper__arrow" style="left: 59px;"></div>` |       rubricElm.innerHTML = `场景正东方向为轨迹前进正方向<div x-arrow="" class="custom__popper__arrow" style="left: 59px;"></div>` | ||||||
|       let iconRubric = contentElm.getElementsByClassName('icon-rubric')[0] |       let iconRubric = contentElm.getElementsByClassName('icon-rubric')[0] | ||||||
|       iconRubric.addEventListener('mouseenter', (e) => { |       iconRubric.addEventListener('mouseenter', (e) => { | ||||||
|         rubricElm.style.display = 'block' |         rubricElm.style.display = 'block' | ||||||
| @ -2163,6 +2262,7 @@ class TrajectoryMotion extends Base { | |||||||
|     this.sdk.viewer.entities.remove(this.line) |     this.sdk.viewer.entities.remove(this.line) | ||||||
|     this.sdk.viewer.entities.remove(this.realTimeLine) |     this.sdk.viewer.entities.remove(this.realTimeLine) | ||||||
|     this.label && this.label.remove() |     this.label && this.label.remove() | ||||||
|  |     this.fuelLabel && this.fuelLabel.remove() | ||||||
|     for (let i = 0; i < this.keyPointShow.length; i++) { |     for (let i = 0; i < this.keyPointShow.length; i++) { | ||||||
|       this.sdk.viewer.entities.remove(this.keyPointShow[i]) |       this.sdk.viewer.entities.remove(this.keyPointShow[i]) | ||||||
|     } |     } | ||||||
| @ -2170,6 +2270,7 @@ class TrajectoryMotion extends Base { | |||||||
|     this.realTimeLine = null |     this.realTimeLine = null | ||||||
|     this.model = null |     this.model = null | ||||||
|     this.label = null |     this.label = null | ||||||
|  |     this.fuelLabel = null | ||||||
|     if (this._DialogObject && !this._DialogObject.isDestroy) { |     if (this._DialogObject && !this._DialogObject.isDestroy) { | ||||||
|       this._DialogObject.close() |       this._DialogObject.close() | ||||||
|       this._DialogObject = null |       this._DialogObject = null | ||||||
| @ -2223,6 +2324,7 @@ class TrajectoryMotion extends Base { | |||||||
|       this.model && (this.model.show = false) |       this.model && (this.model.show = false) | ||||||
|     } |     } | ||||||
|     this.labelShow = this.originalOptions.label.show |     this.labelShow = this.originalOptions.label.show | ||||||
|  |     this.fuelShow = this.originalOptions.fuelShow | ||||||
|     this.labelColor = this.originalOptions.label.color |     this.labelColor = this.originalOptions.label.color | ||||||
|     this.labelFontSize = this.originalOptions.label.fontSize |     this.labelFontSize = this.originalOptions.label.fontSize | ||||||
|     this.labelFontFamily = this.originalOptions.label.fontFamily |     this.labelFontFamily = this.originalOptions.label.fontFamily | ||||||
|  | |||||||
| @ -137,7 +137,7 @@ class Base extends Tools { | |||||||
|           this.originalOptions.show = v |           this.originalOptions.show = v | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       this.entity._showView = this.showView |       this.entity && (this.entity._showView = this.showView) | ||||||
|       if (this.type == 'layer') { |       if (this.type == 'layer') { | ||||||
|         if (this.entity) { |         if (this.entity) { | ||||||
|           this.entity._objectState = this.options.show |           this.entity._objectState = this.options.show | ||||||
|  | |||||||
| @ -78,7 +78,6 @@ class Dialog extends BaseDialog { | |||||||
|       this.footAppChild(div) |       this.footAppChild(div) | ||||||
|       if (this.options.updateHeightCallBack) { |       if (this.options.updateHeightCallBack) { | ||||||
|         let heightBtn = document.createElement('button'); |         let heightBtn = document.createElement('button'); | ||||||
|         heightBtn.className = 'update-height' |  | ||||||
|         heightBtn.innerHTML = '<svg class="icon-updateheigh"><use xlink:href="#yj-icon-updateheight"></use></svg>更新高程' |         heightBtn.innerHTML = '<svg class="icon-updateheigh"><use xlink:href="#yj-icon-updateheight"></use></svg>更新高程' | ||||||
|         heightBtn.style.width = 'auto' |         heightBtn.style.width = 'auto' | ||||||
|         heightBtn.addEventListener('click', () => { |         heightBtn.addEventListener('click', () => { | ||||||
|  | |||||||
| @ -100,7 +100,7 @@ function attributeElm(that) { | |||||||
|                   let tr = ` |                   let tr = ` | ||||||
|                     <div class="tr"> |                     <div class="tr"> | ||||||
|                       <div class="td"> |                       <div class="td"> | ||||||
|                         <input type="checkbox" value="${'ID' in data.data.list[i] ? data.data.list[i].ID : data.data.list[i].id}"> |                         <input type="checkbox" value="${data.data.list[i].deviceId}"> | ||||||
|                         <span>绑定</span> |                         <span>绑定</span> | ||||||
|                       </div> |                       </div> | ||||||
|                       <div class="td">${data.data.list[i].cameraName}</div> |                       <div class="td">${data.data.list[i].cameraName}</div> | ||||||
| @ -126,11 +126,8 @@ function attributeElm(that) { | |||||||
|                     } |                     } | ||||||
|                     else { |                     else { | ||||||
|                       let newArray = that.attributeCamera.filter((item) => { |                       let newArray = that.attributeCamera.filter((item) => { | ||||||
|                         if ('ID' in data.data.list[i]) { |                         if ('deviceId' in data.data.list[i]) { | ||||||
|                           return item.ID !== data.data.list[i].ID |                           return item.deviceId !== data.data.list[i].deviceId | ||||||
|                         } |  | ||||||
|                         else { |  | ||||||
|                           return item.id !== data.data.list[i].id |  | ||||||
|                         } |                         } | ||||||
|                       }) |                       }) | ||||||
|                       that.attributeCamera = newArray |                       that.attributeCamera = newArray | ||||||
| @ -139,7 +136,7 @@ function attributeElm(that) { | |||||||
|                   tableContent.appendChild(trElm) |                   tableContent.appendChild(trElm) | ||||||
|  |  | ||||||
|                   for (let m = 0; m < that.attributeCamera.length; m++) { |                   for (let m = 0; m < that.attributeCamera.length; m++) { | ||||||
|                     if (('ID' in data.data.list[i]) ? (that.attributeCamera[m].ID === data.data.list[i].ID) : (that.attributeCamera[m].id === data.data.list[i].id)) { |                     if (('deviceId' in data.data.list[i]) ? (that.attributeCamera[m].deviceId === data.data.list[i].deviceId):false) { | ||||||
|                       checkbox.checked = true |                       checkbox.checked = true | ||||||
|                       break |                       break | ||||||
|                     } |                     } | ||||||
| @ -200,19 +197,11 @@ function attributeElm(that) { | |||||||
|                   for (let i = that.attributeCamera.length - 1; i >= 0; i--) { |                   for (let i = that.attributeCamera.length - 1; i >= 0; i--) { | ||||||
|                     let flag = false |                     let flag = false | ||||||
|                     for (let m = 0; m < data.data.list.length; m++) { |                     for (let m = 0; m < data.data.list.length; m++) { | ||||||
|                       if ('ID' in data.data.list[m]) { |                       if (that.attributeCamera[i].deviceId === data.data.list[m].deviceId) { | ||||||
|                         if (that.attributeCamera[i].ID === data.data.list[m].ID) { |  | ||||||
|                         flag = true |                         flag = true | ||||||
|                         break |                         break | ||||||
|                       } |                       } | ||||||
|                     } |                     } | ||||||
|                       if ('id' in data.data.list[m]) { |  | ||||||
|                         if (that.attributeCamera[i].id === data.data.list[m].id) { |  | ||||||
|                           flag = true |  | ||||||
|                           break |  | ||||||
|                         } |  | ||||||
|                       } |  | ||||||
|                     } |  | ||||||
|                     if (!flag) { |                     if (!flag) { | ||||||
|                       that.attributeCamera.splice(i, 1) |                       that.attributeCamera.splice(i, 1) | ||||||
|                     } |                     } | ||||||
|  | |||||||
| @ -1504,9 +1504,16 @@ class Tools { | |||||||
|     } |     } | ||||||
|     message = document.createElement('div') |     message = document.createElement('div') | ||||||
|     message.id = 'YJ-custom-message' |     message.id = 'YJ-custom-message' | ||||||
|  |     if (type == 'success') { | ||||||
|       message.innerHTML = ` |       message.innerHTML = ` | ||||||
|       <i><?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755929961282" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5064" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M874.119618 149.859922A510.816461 510.816461 0 0 0 511.997 0.00208a509.910462 509.910462 0 0 0-362.119618 149.857842c-199.817789 199.679789-199.817789 524.581447 0 724.260236a509.969462 509.969462 0 0 0 362.119618 149.857842A508.872463 508.872463 0 0 0 874.119618 874.120158c199.836789-199.679789 199.836789-524.581447 0-724.260236zM814.94268 378.210681L470.999043 744.132295a15.359984 15.359984 0 0 1-5.887994 4.095996c-1.751998 1.180999-2.913997 2.362998-5.276994 2.913997a34.499964 34.499964 0 0 1-13.469986 2.914997 45.547952 45.547952 0 0 1-12.897986-2.303998l-4.095996-2.363997a45.291952 45.291952 0 0 1-7.009992-4.095996l-196.902793-193.789796a34.126964 34.126964 0 0 1-10.555989-25.186973c0-9.37399 3.583996-18.74698 9.98399-25.186974a36.429962 36.429962 0 0 1 50.372947 0l169.98382 167.423824L763.389735 330.220732a37.059961 37.059961 0 0 1 50.371947-1.732998 33.647965 33.647965 0 0 1 11.165988 25.186973 35.544963 35.544963 0 0 1-9.98399 24.575974v-0.04z m0 0" fill="#52C41A" p-id="5065"></path></svg></i>${text} |       <i><?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755929961282" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5064" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M874.119618 149.859922A510.816461 510.816461 0 0 0 511.997 0.00208a509.910462 509.910462 0 0 0-362.119618 149.857842c-199.817789 199.679789-199.817789 524.581447 0 724.260236a509.969462 509.969462 0 0 0 362.119618 149.857842A508.872463 508.872463 0 0 0 874.119618 874.120158c199.836789-199.679789 199.836789-524.581447 0-724.260236zM814.94268 378.210681L470.999043 744.132295a15.359984 15.359984 0 0 1-5.887994 4.095996c-1.751998 1.180999-2.913997 2.362998-5.276994 2.913997a34.499964 34.499964 0 0 1-13.469986 2.914997 45.547952 45.547952 0 0 1-12.897986-2.303998l-4.095996-2.363997a45.291952 45.291952 0 0 1-7.009992-4.095996l-196.902793-193.789796a34.126964 34.126964 0 0 1-10.555989-25.186973c0-9.37399 3.583996-18.74698 9.98399-25.186974a36.429962 36.429962 0 0 1 50.372947 0l169.98382 167.423824L763.389735 330.220732a37.059961 37.059961 0 0 1 50.371947-1.732998 33.647965 33.647965 0 0 1 11.165988 25.186973 35.544963 35.544963 0 0 1-9.98399 24.575974v-0.04z m0 0" fill="#52C41A" p-id="5065"></path></svg></i>${text} | ||||||
|     ` |     ` | ||||||
|  |     } else if (type == 'warning') { | ||||||
|  |       message.innerHTML = ` | ||||||
|  |       <i><?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756093599258" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1648" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M512.002558 64.24521c-247.292176 0-447.75786 200.464661-447.75786 447.756837 0 247.287059 200.464661 447.752744 447.75786 447.752744 247.286036 0 447.75172-200.464661 447.75172-447.752744C959.754279 264.710894 759.288594 64.24521 512.002558 64.24521zM512.010745 735.87586c-20.602224 0-37.319977-16.718777-37.319977-37.323047 0-20.597107 16.717753-37.319977 37.319977-37.319977 20.60427 0 37.297464 16.72287 37.297464 37.319977C549.308209 719.158107 532.613992 735.87586 512.010745 735.87586zM549.308209 567.969733c0 20.600177-16.693194 37.293371-37.297464 37.293371-20.602224 0-37.319977-16.693194-37.319977-37.293371L474.690768 325.420581c0-20.605294 16.717753-37.297464 37.319977-37.297464 20.60427 0 37.297464 16.693194 37.297464 37.297464L549.308209 567.969733z" fill="#e98f36" p-id="1649"></path></svg></i>${text} | ||||||
|  |     ` | ||||||
|  |     } | ||||||
|  |  | ||||||
|     document.body.appendChild(message) |     document.body.appendChild(message) | ||||||
|     message.classList.add(type) |     message.classList.add(type) | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ import AModelLoader from '../Obj/Base/LoadObjModel/AModelLoader' | |||||||
| import { setSvg } from '../Obj/Element/svg' | import { setSvg } from '../Obj/Element/svg' | ||||||
| import Tools from '../Tools' | import Tools from '../Tools' | ||||||
| import { Proj } from '../Tools/proj' | import { Proj } from '../Tools/proj' | ||||||
|  | import { syncData, getSdk } from '../Global/MultiViewportMode' | ||||||
| import { | import { | ||||||
|   unRegLeftClickCallback, |   unRegLeftClickCallback, | ||||||
|   unRegRightClickCallback, |   unRegRightClickCallback, | ||||||
| @ -151,7 +152,7 @@ class YJEarth { | |||||||
|     } |     } | ||||||
|     this.options.contextOptions = { |     this.options.contextOptions = { | ||||||
|       webgl: { |       webgl: { | ||||||
|         alpha: true, |         // alpha: true, | ||||||
|         depth: true, |         depth: true, | ||||||
|         stencil: true, |         stencil: true, | ||||||
|         antialias: true, |         antialias: true, | ||||||
| @ -419,7 +420,8 @@ class YJEarth { | |||||||
|  |  | ||||||
|     let ClickHandler = new Cesium.ScreenSpaceEventHandler(_this.viewer.canvas) |     let ClickHandler = new Cesium.ScreenSpaceEventHandler(_this.viewer.canvas) | ||||||
|     ClickHandler.setInputAction((movement) => { |     ClickHandler.setInputAction((movement) => { | ||||||
|       let textList = document.getElementsByClassName('popup-textarea') |       // let textList = document.getElementsByClassName('popup-textarea') | ||||||
|  |       let textList = _this.viewer._element.getElementsByClassName('popup-textarea') | ||||||
|       _this.isLeftClick = false |       _this.isLeftClick = false | ||||||
|       for (let i = textList.length - 1; i > -1; i--) { |       for (let i = textList.length - 1; i > -1; i--) { | ||||||
|         let left = returnNumber(textList[i].style.left) |         let left = returnNumber(textList[i].style.left) | ||||||
| @ -431,12 +433,24 @@ class YJEarth { | |||||||
|         if (x > left && x < left + width && y > top && y < top + height) { |         if (x > left && x < left + width && y > top && y < top + height) { | ||||||
|           if (_this.clickTextDom) { |           if (_this.clickTextDom) { | ||||||
|             _this.clickTextDom.style['pointer-events'] = 'none' |             _this.clickTextDom.style['pointer-events'] = 'none' | ||||||
|  |             _this.clickTextDom.querySelector('textarea').removeEventListener('blur', _this.blurFun) | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           _this.clickTextDom = textList[i] |           _this.clickTextDom = textList[i] | ||||||
|           textList[i].style['pointer-events'] = 'all' |           textList[i].style['pointer-events'] = 'all' | ||||||
|           textList[i].querySelector('textarea').focus() |           textList[i].querySelector('textarea').focus() | ||||||
|           _this.isLeftClick = true |           _this.isLeftClick = true | ||||||
|           _this.entityMap.get(_this.clickTextDom.id).isClick(movement.position, _this.clickTextDom.id) |           _this.entityMap.get(_this.clickTextDom.id).isClick(movement.position, _this.clickTextDom.id) | ||||||
|  |           _this.blurFun = () => { | ||||||
|  |             // let { sdkP } = getSdk() | ||||||
|  |             // if (_this == sdkP && sdkP) {//二维 | ||||||
|  |             //   _this.entityMap.get(_this.clickTextDom.id).getwords(_this.clickTextDom.getElementsByTagName('textarea')[0].value) | ||||||
|  |             // } else if (!sdkP) { | ||||||
|  |             _this.entityMap.get(_this.clickTextDom.id).getwords(_this.clickTextDom.getElementsByTagName('textarea')[0].value) | ||||||
|  |             // } | ||||||
|  |             _this.clickTextDom.querySelector('textarea').removeEventListener('blur', _this.blurFun) | ||||||
|  |           } | ||||||
|  |           _this.clickTextDom.querySelector('textarea').addEventListener('blur', _this.blurFun) | ||||||
|           break; |           break; | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -458,7 +472,7 @@ class YJEarth { | |||||||
|           click = true |           click = true | ||||||
|         } |         } | ||||||
|         mousemove = function (e) { |         mousemove = function (e) { | ||||||
|           if (!click) { |           if (!click || !_this.clickTextDom) { | ||||||
|             return |             return | ||||||
|           } |           } | ||||||
|           let width = _this.clickTextDom.clientWidth * 1 |           let width = _this.clickTextDom.clientWidth * 1 | ||||||
| @ -467,6 +481,11 @@ class YJEarth { | |||||||
|             x: e.clientX - layerX + width / 2, |             x: e.clientX - layerX + width / 2, | ||||||
|             y: e.clientY - layerY + height, |             y: e.clientY - layerY + height, | ||||||
|           } |           } | ||||||
|  |           let { sdkP } = getSdk() | ||||||
|  |           if (_this != sdkP && sdkP) {//二维 | ||||||
|  |             let num = sdkP.viewer._element.clientWidth | ||||||
|  |             param.x = param.x - num | ||||||
|  |           } | ||||||
|           _this.entityMap.get(_this.clickTextDom.id).setHandeler(param) |           _this.entityMap.get(_this.clickTextDom.id).setHandeler(param) | ||||||
|  |  | ||||||
|         } |         } | ||||||
| @ -478,15 +497,15 @@ class YJEarth { | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         _this.clickTextDom.addEventListener('mousedown', mousedown); |         _this.clickTextDom.addEventListener('mousedown', mousedown); | ||||||
|         document.addEventListener('mousemove', mousemove); |         _this.viewer._element.addEventListener('mousemove', mousemove); | ||||||
|         document.addEventListener('mouseup', mouseup); |         _this.viewer._element.addEventListener('mouseup', mouseup); | ||||||
|       } |       } | ||||||
|       // 点击其他地方取消 |       // 点击其他地方取消 | ||||||
|       if (!_this.isLeftClick && _this.clickTextDom) { |       if (!_this.isLeftClick && _this.clickTextDom) { | ||||||
|         _this.clickTextDom.removeEventListener('mousedown', mousedown); |         _this.clickTextDom.removeEventListener('mousedown', mousedown); | ||||||
|         document.removeEventListener('mousemove', mousemove); |         _this.viewer._element.removeEventListener('mousemove', mousemove); | ||||||
|         document.removeEventListener('mouseup', mouseup); |         _this.viewer._element.removeEventListener('mouseup', mouseup); | ||||||
|         _this.entityMap.get(_this.clickTextDom.id).getwords(_this.clickTextDom.getElementsByTagName('textarea')[0].value) |         // _this.entityMap.get(_this.clickTextDom.id).getwords(_this.clickTextDom.getElementsByTagName('textarea')[0].value) | ||||||
|  |  | ||||||
|         _this.clickTextDom.style['pointer-events'] = 'none' |         _this.clickTextDom.style['pointer-events'] = 'none' | ||||||
|         _this.clickTextDom = undefined |         _this.clickTextDom = undefined | ||||||
|  | |||||||
| @ -2743,7 +2743,7 @@ | |||||||
|  |  | ||||||
| /* 贴地svg */ | /* 贴地svg */ | ||||||
| .YJ-custom-base-dialog.ground-svg>.content { | .YJ-custom-base-dialog.ground-svg>.content { | ||||||
|   width: 560px; |   width: 535px; | ||||||
| } | } | ||||||
|  |  | ||||||
| .YJ-custom-base-dialog.ground-svg>.content>div .div-item:nth-of-type(2) .row .col .label { | .YJ-custom-base-dialog.ground-svg>.content>div .div-item:nth-of-type(2) .row .col .label { | ||||||
| @ -3140,7 +3140,6 @@ | |||||||
|   border: unset!important; |   border: unset!important; | ||||||
|   color: #fff; |   color: #fff; | ||||||
| } | } | ||||||
|  |  | ||||||
| .popup-textarea textarea::-webkit-scrollbar { | .popup-textarea textarea::-webkit-scrollbar { | ||||||
|   width: 8px!important; |   width: 8px!important; | ||||||
|   /* height: 8px!important; */ |   /* height: 8px!important; */ | ||||||
| @ -3494,6 +3493,7 @@ | |||||||
|   cursor: e-resize; |   cursor: e-resize; | ||||||
|   background-color: #d3d3d3; |   background-color: #d3d3d3; | ||||||
|   user-select: none; |   user-select: none; | ||||||
|  |   z-index: 1; | ||||||
| } | } | ||||||
|  |  | ||||||
| .cesium-performanceDisplay-defaultContainer { | .cesium-performanceDisplay-defaultContainer { | ||||||
| @ -3765,6 +3765,7 @@ | |||||||
|   border-top: none; |   border-top: none; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | /* 自定义提示 */ | ||||||
| #YJ-custom-message { | #YJ-custom-message { | ||||||
|   /* 固定在顶部中央 */ |   /* 固定在顶部中央 */ | ||||||
|   position: fixed; |   position: fixed; | ||||||
| @ -3799,6 +3800,10 @@ | |||||||
|   background-color: #f0f9eb; |   background-color: #f0f9eb; | ||||||
|   color: rgb(82, 196, 26); |   color: rgb(82, 196, 26); | ||||||
| } | } | ||||||
|  | #YJ-custom-message.warning { | ||||||
|  |   background-color: #fdf6ec; | ||||||
|  |   color: #e6a23c; | ||||||
|  | } | ||||||
|  |  | ||||||
| /* 滑入动画 */ | /* 滑入动画 */ | ||||||
| @keyframes YJ-custom-message-slideDown { | @keyframes YJ-custom-message-slideDown { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user