飞线,光照

This commit is contained in:
2025-07-03 16:28:48 +08:00
parent 22a05c2c8c
commit 484fe70e16
23 changed files with 1959 additions and 66 deletions

View File

@ -13,7 +13,6 @@ import MouseTip from '../../../MouseTip'
import Controller from '../../../Controller/index'
import { syncData } from '../../../Global/MultiViewportMode'
import { legp } from '../../Element/datalist'
import { getFontList, getFontFamilyName } from '../../Element/fontSelect'
import { setSplitDirection, syncSplitData, setActiveId } from '../../../Global/SplitScreen'
import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global'
@ -78,7 +77,6 @@ class PolylineObject extends Base {
options.label.fontSize || options.label.fontSize === 0
? options.label.fontSize
: 20,
fontFamily: options.label.fontFamily ? options.label.fontFamily : 0,
color: options.label.color || '#ffffff',
lineWidth:
options.label.lineWidth || options.label.lineWidth === 0
@ -275,6 +273,31 @@ class PolylineObject extends Base {
name: '泛光',
value: '泛光',
key: 2
},
{
name: '尾迹光线',
value: '尾迹光线',
key: 3
},
{
name: '多尾迹光线',
value: '多尾迹光线',
key: 4
},
{
name: '流动虚线1',
value: '流动虚线1',
key: 5
},
{
name: '流动虚线2',
value: '流动虚线2',
key: 6
},
{
name: '流动箭头1',
value: '流动箭头1',
key: 7
}
]
this.options.type = Number(v)
@ -507,21 +530,6 @@ class PolylineObject extends Base {
})
}
get labelFontFamily() {
return this.options.label.fontFamily
}
set labelFontFamily(v) {
this.options.label.fontFamily = v || 0
this.label && (this.label.fontFamily = this.options.label.fontFamily)
let name = getFontFamilyName(this.labelFontFamily) || ''
this._elms.labelFontFamily &&
this._elms.labelFontFamily.forEach(item => {
item.value = name
})
}
get labelColor() {
return this.options.label.color
}
@ -1141,7 +1149,6 @@ class PolylineObject extends Base {
],
text: that.options.name,
fontSize: that.options.label.fontSize,
fontFamily: that.options.label.fontFamily,
color: that.options.label.color,
pixelOffset: that.options.label.pixelOffset,
backgroundColor: that.options.label.backgroundColor,
@ -1508,6 +1515,31 @@ class PolylineObject extends Base {
name: '泛光',
value: '泛光',
key: 2
},
{
name: '尾迹光线',
value: '尾迹光线',
key: 3
},
{
name: '多尾迹光线',
value: '多尾迹光线',
key: 4
},
{
name: '流动虚线1',
value: '流动虚线1',
key: 5
},
{
name: '流动虚线2',
value: '流动虚线2',
key: 6
},
{
name: '流动箭头1',
value: '流动箭头1',
key: 7
}
]
let lineTypeDataLegpObject = legp(
@ -1760,37 +1792,6 @@ class PolylineObject extends Base {
this._elms.altInput.push(altInput)
tBodyElm.appendChild(tr)
}
let fontData = getFontList()
let fontObject = legp(
this._DialogObject._element.content.getElementsByClassName(
'font-select-box'
)[0],
'.font-select'
)
if (fontObject) {
fontObject.legp_search(fontData)
let fontDataLegpElm = this._DialogObject._element.content
.getElementsByClassName('font-select')[0]
.getElementsByTagName('input')[0]
fontDataLegpElm.value = fontData[this.labelFontFamily].value
for (let i = 0; i < fontData.length; i++) {
if (fontData[i].value == fontDataLegpElm.value) {
fontObject.legp_searchActive(fontData[i].value)
break
}
}
fontDataLegpElm.addEventListener('input', () => {
for (let i = 0; i < fontData.length; i++) {
if (fontData[i].value === fontDataLegpElm.value) {
this.labelFontFamily = fontData[i].key
break
}
}
})
this._elms.labelFontFamily = [fontDataLegpElm]
}
}, 0)
} else {
if (this._DialogObject && this._DialogObject.close) {
@ -1972,10 +1973,6 @@ class PolylineObject extends Base {
this.labelShow = this.originalOptions.label.show
this.labelColor = this.originalOptions.label.color
this.labelFontSize = this.originalOptions.label.fontSize
this.labelFontFamily = this.originalOptions.label.fontFamily
this.labelScaleByDistance = this.originalOptions.label.scaleByDistance
this.labelNear = this.originalOptions.label.near
this.labelFar = this.originalOptions.label.far
this.labelLineWidth = this.originalOptions.label.lineWidth
this.labelPixelOffset = this.originalOptions.label.pixelOffset
this.labelLineColor = this.originalOptions.label.lineColor
@ -2039,7 +2036,7 @@ class PolylineObject extends Base {
.value
) {
this.options.attribute.link.content.push({
name: '链接',
name: '链接' + (this.options.attribute.link.content.length + 1),
url: this._DialogObject._element.content.getElementsByClassName(
'link_add'
)[0].value
@ -2057,7 +2054,7 @@ class PolylineObject extends Base {
// input.addEventListener('change', (event) => {
// if (input.value) {
// this.options.attribute.link.content.push({
// name: '链接',
// name: '链接' + (this.options.attribute.link.content.length + 1),
// url: input.value
// })
// this.attributeLink = this.options.attribute.link.content
@ -2067,7 +2064,7 @@ class PolylineObject extends Base {
}
addAttributeLink(link) {
this.options.attribute.link.content.push({
name: '链接',
name: '链接' + (this.options.attribute.link.content.length + 1),
url: link
})
this.attributeLink = this.options.attribute.link.content
@ -2080,7 +2077,7 @@ class PolylineObject extends Base {
)[0].value
) {
this.options.attribute.vr.content.push({
name: '全景图' ,
name: '全景图' + (this.options.attribute.vr.content.length + 1),
url: this._DialogObject._element.content.getElementsByClassName(
'vr_add'
)[0].value
@ -2096,7 +2093,7 @@ class PolylineObject extends Base {
addAttributeRr(vr) {
this.options.attribute.vr.content.push({
name: '全景图' ,
name: '全景图' + (this.options.attribute.vr.content.length + 1),
url: vr
})
this.attributeVr = this.options.attribute.vr.content