feat(tracker-assist): annotation available on RemoteControl as well
This commit is contained in:
parent
437341257c
commit
b283b89bd2
1 changed files with 7 additions and 0 deletions
|
|
@ -146,17 +146,24 @@ export default class Assist {
|
||||||
socket.onAny((...args) => app.debug.log("Socket:", ...args))
|
socket.onAny((...args) => app.debug.log("Socket:", ...args))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const remoteControl = new RemoteControl(
|
const remoteControl = new RemoteControl(
|
||||||
this.options,
|
this.options,
|
||||||
id => {
|
id => {
|
||||||
this.agents[id].onControlReleased = this.options.onRemoteControlStart()
|
this.agents[id].onControlReleased = this.options.onRemoteControlStart()
|
||||||
this.emit("control_granted", id)
|
this.emit("control_granted", id)
|
||||||
|
annot = new AnnotationCanvas()
|
||||||
|
annot.mount()
|
||||||
},
|
},
|
||||||
id => {
|
id => {
|
||||||
const cb = this.agents[id].onControlReleased
|
const cb = this.agents[id].onControlReleased
|
||||||
delete this.agents[id].onControlReleased
|
delete this.agents[id].onControlReleased
|
||||||
typeof cb === "function" && cb()
|
typeof cb === "function" && cb()
|
||||||
this.emit("control_rejected", id)
|
this.emit("control_rejected", id)
|
||||||
|
if (annot != null) {
|
||||||
|
annot.remove()
|
||||||
|
annot = null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue