showView状态保存
This commit is contained in:
@ -6,7 +6,7 @@ import EventBinding from '../../Element/Dialog/eventBinding';
|
||||
import richText from "../../Element/richText";
|
||||
import MouseEvent from '../../../Event/index'
|
||||
import LabelObject from '../LabelObject'
|
||||
import { syncData } from '../../../Global/MultiViewportMode'
|
||||
import { syncData, getSdk as get2DSdk } from '../../../Global/MultiViewportMode'
|
||||
import { legp } from '../../Element/datalist';
|
||||
import { getFontList, getFontFamilyName } from '../../Element/fontSelect'
|
||||
import MouseTip from '../../../MouseTip'
|
||||
@ -223,10 +223,11 @@ class CircleDiffuse extends Base {
|
||||
|
||||
set show(v) {
|
||||
if (typeof v === "boolean") {
|
||||
if (!this.isShowView) {
|
||||
let sdkD = get2DSdk().sdkD
|
||||
if (!this.isShowView || !sdkD) {
|
||||
this.options.show = v
|
||||
}
|
||||
if (!this.showView || this.showView == 3) {
|
||||
if (!this.showView || this.showView == 3 || !sdkD) {
|
||||
this.entity.show = this.options.show
|
||||
if (this.options.label.show) {
|
||||
this.label.show = this.options.show
|
||||
@ -442,8 +443,9 @@ class CircleDiffuse extends Base {
|
||||
return this.options.label.show
|
||||
}
|
||||
set labelShow(v) {
|
||||
let sdkD = get2DSdk().sdkD
|
||||
this.options.label.show = v
|
||||
if (this.show && (!this.showView || this.showView == 3)) {
|
||||
if (this.show && (!this.showView || this.showView == 3 || !sdkD)) {
|
||||
this.label.show = v
|
||||
}
|
||||
else {
|
||||
@ -1336,7 +1338,7 @@ class CircleDiffuse extends Base {
|
||||
}
|
||||
|
||||
async remove() {
|
||||
this.label.remove()
|
||||
this.label && this.label.remove()
|
||||
this.entity && this.sdk.viewer.entities.remove(this.entity)
|
||||
this.entity2 && this.sdk.viewer.entities.remove(this.entity2)
|
||||
this.entity = null
|
||||
|
Reference in New Issue
Block a user