二三维文本框

This commit is contained in:
zh
2025-08-26 13:34:38 +08:00
parent 838f39ba40
commit 0c4c956868
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -32,6 +32,10 @@ class TextBox extends Base {
this.callback = callback this.callback = callback
} }
get type() {
return 'TextBox'
}
async create(that) { async create(that) {
let viewer = that.sdk.viewer let viewer = that.sdk.viewer
// 创建div元素 // 创建div元素