Fix:修复协同编辑插件:当选中一个节点时,再将该节点收起,该节点激活状态已消失,但其他客户端该节点的选中状态依旧存在的问题
This commit is contained in:
parent
f3fe2dbc7b
commit
58a3faae74
@ -715,6 +715,7 @@ class Node {
|
|||||||
// 销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布
|
// 销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布
|
||||||
destroy() {
|
destroy() {
|
||||||
if (!this.group) return
|
if (!this.group) return
|
||||||
|
this.emptyUser()
|
||||||
this.resetWhenDelete()
|
this.resetWhenDelete()
|
||||||
this.group.remove()
|
this.group.remove()
|
||||||
this.removeGeneralization()
|
this.removeGeneralization()
|
||||||
|
|||||||
@ -94,11 +94,18 @@ function removeUser(userInfo) {
|
|||||||
this.updateUserListNode()
|
this.updateUserListNode()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清空用户
|
||||||
|
function emptyUser() {
|
||||||
|
this.userList = []
|
||||||
|
this.updateUserListNode()
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
createUserListNode,
|
createUserListNode,
|
||||||
updateUserListNode,
|
updateUserListNode,
|
||||||
createTextAvatar,
|
createTextAvatar,
|
||||||
createImageAvatar,
|
createImageAvatar,
|
||||||
addUser,
|
addUser,
|
||||||
removeUser
|
removeUser,
|
||||||
|
emptyUser
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,6 +233,7 @@ class Cooperate {
|
|||||||
// 设置当前数据
|
// 设置当前数据
|
||||||
const data = Array.from(this.awareness.getStates().values())
|
const data = Array.from(this.awareness.getStates().values())
|
||||||
this.currentAwarenessData = data
|
this.currentAwarenessData = data
|
||||||
|
this.waitNodeUidMap = {}
|
||||||
walk(data, (uid, node, userInfo) => {
|
walk(data, (uid, node, userInfo) => {
|
||||||
// 不显示自己
|
// 不显示自己
|
||||||
if (userInfo.id === this.userInfo.id) return
|
if (userInfo.id === this.userInfo.id) return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user