文本框

This commit is contained in:
zh
2025-08-26 15:34:07 +08:00
parent f9a3ffb359
commit 65441ddff4
2 changed files with 17 additions and 21 deletions

View File

@ -2,7 +2,7 @@
* 文本框
*/
import Base from "../index";
import { syncData } from '../../../Global/MultiViewportMode'
import { syncData, getSdk } from '../../../Global/MultiViewportMode'
import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global'
class TextBox extends Base {
/**
@ -133,7 +133,14 @@ class TextBox extends Base {
async getwords(words) {
this.options.text = words
this.callback(this.options)
syncData(this.sdk, this.options.id)
let { sdkP } = getSdk()
if(this.sdk === sdkP) {
console.log(3)
syncData(this.sdk, this.options.id)
}
else {
console.log(2)
}
}
async returnFun() {
return this.handler
@ -154,7 +161,7 @@ class TextBox extends Base {
set show(v) {
this.options.show = v
this.textDom && (this.textDom.style.display = v ? 'block' : 'none');
// syncData(this.sdk, this.options.id)
syncData(this.sdk, this.options.id)
}
get position() {
return this.options.position