增加自定义提示
This commit is contained in:
@ -135,6 +135,7 @@ const open = async (sdk, options = {}, _Dialog = {}) => {
|
|||||||
pitch: viewer.camera.pitch,
|
pitch: viewer.camera.pitch,
|
||||||
roll: viewer.camera.roll
|
roll: viewer.camera.roll
|
||||||
}
|
}
|
||||||
|
tools.message({text: '操作成功'})
|
||||||
})
|
})
|
||||||
|
|
||||||
let totalTimeElm = contentElm.querySelector("input[name='totalTime']")
|
let totalTimeElm = contentElm.querySelector("input[name='totalTime']")
|
||||||
|
@ -181,7 +181,7 @@ class CircleDiffuse extends Base {
|
|||||||
}
|
}
|
||||||
that.sdk._entityZIndex++
|
that.sdk._entityZIndex++
|
||||||
if (that.sdk.viewer._element.className === 'cesium-viewer 2d') {
|
if (that.sdk.viewer._element.className === 'cesium-viewer 2d') {
|
||||||
that.entity.ellipse.height = 1000000
|
that.entity.ellipse.height = 1
|
||||||
}
|
}
|
||||||
CircleDiffuse.createLabel(that)
|
CircleDiffuse.createLabel(that)
|
||||||
syncData(that.sdk, that.options.id)
|
syncData(that.sdk, that.options.id)
|
||||||
|
@ -1384,10 +1384,10 @@ class CurvelineObject extends Base {
|
|||||||
that.options.lengthByMeter = res
|
that.options.lengthByMeter = res
|
||||||
that.lengthUnit = that.options['length-unit']
|
that.lengthUnit = that.options['length-unit']
|
||||||
syncData(that.sdk, that.options.id)
|
syncData(that.sdk, that.options.id)
|
||||||
|
})
|
||||||
if (that.options.show) {
|
if (that.options.show) {
|
||||||
setSplitDirection(0, that.options.id)
|
setSplitDirection(0, that.options.id)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
// if (this.options['nose-to-tail']) {
|
// if (this.options['nose-to-tail']) {
|
||||||
// let array = []
|
// let array = []
|
||||||
|
@ -162,6 +162,7 @@ class FlyRoam extends Base {
|
|||||||
pitch: viewer.camera.pitch,
|
pitch: viewer.camera.pitch,
|
||||||
roll: viewer.camera.roll
|
roll: viewer.camera.roll
|
||||||
}
|
}
|
||||||
|
this.message({text: '操作成功'})
|
||||||
})
|
})
|
||||||
|
|
||||||
let totalTimeElm = contentElm.querySelector("input[name='totalTime']")
|
let totalTimeElm = contentElm.querySelector("input[name='totalTime']")
|
||||||
|
@ -1411,10 +1411,10 @@ class PolylineObject extends Base {
|
|||||||
that.options.lengthByMeter = res
|
that.options.lengthByMeter = res
|
||||||
that.lengthUnit = that.options['length-unit']
|
that.lengthUnit = that.options['length-unit']
|
||||||
syncData(that.sdk, that.options.id)
|
syncData(that.sdk, that.options.id)
|
||||||
|
})
|
||||||
if (that.options.show) {
|
if (that.options.show) {
|
||||||
setSplitDirection(0, that.options.id)
|
setSplitDirection(0, that.options.id)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
// if (this.options['nose-to-tail']) {
|
// if (this.options['nose-to-tail']) {
|
||||||
|
@ -138,7 +138,7 @@ class RadarScan extends Base {
|
|||||||
})
|
})
|
||||||
that.sdk._entityZIndex++
|
that.sdk._entityZIndex++
|
||||||
if (that.sdk.viewer._element.className === 'cesium-viewer 2d') {
|
if (that.sdk.viewer._element.className === 'cesium-viewer 2d') {
|
||||||
that.entity.ellipse.height = 1000000
|
that.entity.ellipse.height = 1
|
||||||
}
|
}
|
||||||
RadarScan.createLabel(that)
|
RadarScan.createLabel(that)
|
||||||
syncData(that.sdk, that.options.id)
|
syncData(that.sdk, that.options.id)
|
||||||
|
@ -50,7 +50,8 @@ export default class CircleDiffuseMaterialProperty {
|
|||||||
let color = this.colors[ratio[i]]
|
let color = this.colors[ratio[i]]
|
||||||
_sourceColor = _sourceColor + `
|
_sourceColor = _sourceColor + `
|
||||||
if(dis < float(${Number(ratio[i]) / 2})) {
|
if(dis < float(${Number(ratio[i]) / 2})) {
|
||||||
material.diffuse = 1.5 * vec4(${color.red},${color.green},${color.blue},${color.alpha}).rgb;
|
material.diffuse = vec4(0.0,0.0,0.0,0.0).rgb;
|
||||||
|
material.emission = 1.0 * vec4(${color.red},${color.green},${color.blue},${color.alpha}).rgb;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
@ -1493,6 +1493,23 @@ class Tools {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message(option={}) {
|
||||||
|
let type = option.type || 'success'
|
||||||
|
let text = option.text || ''
|
||||||
|
let duration = option.duration || 1500
|
||||||
|
|
||||||
|
let message = document.getElementById('YJ-custom-message');
|
||||||
|
if (message) {
|
||||||
|
document.body.removeChild(message)
|
||||||
|
}
|
||||||
|
message = document.createElement('div')
|
||||||
|
message.id = 'YJ-custom-message'
|
||||||
|
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}
|
||||||
|
`
|
||||||
|
document.body.appendChild(message)
|
||||||
|
message.classList.add(type)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3108,11 +3108,13 @@
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
padding: 5px 5px 0px 5px;
|
padding: 5px 5px 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-textarea textarea {
|
.popup-textarea textarea {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
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; */
|
||||||
@ -3587,20 +3589,25 @@
|
|||||||
border-image: linear-gradient(to bottom, var(--color-sdk-gradual)) 1;
|
border-image: linear-gradient(to bottom, var(--color-sdk-gradual)) 1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.billboard-attribute-box .DIV-cy-tabs {
|
.billboard-attribute-box .DIV-cy-tabs {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title {
|
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title {
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title:first-child {
|
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title:first-child {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title:last-child {
|
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title:last-child {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title span {
|
.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title span {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
@ -3610,3 +3617,56 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 自定义提示 */
|
||||||
|
#YJ-custom-message {
|
||||||
|
/* 固定在顶部中央 */
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0%);
|
||||||
|
/* 初始位置在屏幕顶部外 */
|
||||||
|
|
||||||
|
/* 样式美化 */
|
||||||
|
display: flex;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 15px 20px;
|
||||||
|
width: 380px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 9999999;
|
||||||
|
|
||||||
|
|
||||||
|
/* 动画定义 */
|
||||||
|
animation: YJ-custom-message-slideDown 0.5s forwards,
|
||||||
|
YJ-custom-message-fadeOut 0.5s 1500ms forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
#YJ-custom-message i {
|
||||||
|
margin: 2px 10px 0 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#YJ-custom-message.success {
|
||||||
|
background-color: #f0f9eb;
|
||||||
|
color: rgb(82, 196, 26);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滑入动画 */
|
||||||
|
@keyframes YJ-custom-message-slideDown {
|
||||||
|
to {
|
||||||
|
top: 20px;
|
||||||
|
/* 移动到屏幕顶部 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 淡出动画 - 1500ms后执行 */
|
||||||
|
@keyframes YJ-custom-message-fadeOut {
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
top: -200px
|
||||||
|
/* 移回顶部外 */
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user