@momo2555/koppeliajs 0.0.130 → 0.0.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/scripts/console.js
CHANGED
|
@@ -185,6 +185,7 @@ export class Console {
|
|
|
185
185
|
}
|
|
186
186
|
/* Handle device event */
|
|
187
187
|
else if (type == MessageType.DEVICE_EVENT) {
|
|
188
|
+
console.log("receive device event ! handlers : " + this._deviceEventHandlers);
|
|
188
189
|
this._execDeviceEventHandlers(request.header.device, request.header.from_addr, request.event);
|
|
189
190
|
}
|
|
190
191
|
/* Handle device data */
|
|
@@ -222,4 +223,11 @@ export class Console {
|
|
|
222
223
|
handler(request, params, from, address);
|
|
223
224
|
}
|
|
224
225
|
}
|
|
226
|
+
destroyEvents() {
|
|
227
|
+
this._deviceEventHandlers = [];
|
|
228
|
+
this._deviceDataHandlers = [];
|
|
229
|
+
this._dataExchangeHandlers = [];
|
|
230
|
+
this._anyRequestHandlers = [];
|
|
231
|
+
console.log("destroy events event handlers : " + this._deviceEventHandlers);
|
|
232
|
+
}
|
|
225
233
|
}
|
|
@@ -29,6 +29,7 @@ export declare class Koppelia {
|
|
|
29
29
|
init(defaultState: AnyState, stages: string[]): void;
|
|
30
30
|
/**
|
|
31
31
|
* Go to a stage, the stage must be in the stage list
|
|
32
|
+
* Before changing the staging all callbacks will be destroyed
|
|
32
33
|
* If the stage list is empty the console will return an error
|
|
33
34
|
* @param stageName
|
|
34
35
|
*/
|
package/dist/scripts/koppelia.js
CHANGED
|
@@ -76,10 +76,12 @@ export class Koppelia {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Go to a stage, the stage must be in the stage list
|
|
79
|
+
* Before changing the staging all callbacks will be destroyed
|
|
79
80
|
* If the stage list is empty the console will return an error
|
|
80
81
|
* @param stageName
|
|
81
82
|
*/
|
|
82
83
|
goto(stageName) {
|
|
84
|
+
this._console.destroyEvents();
|
|
83
85
|
this._stage.goto(stageName);
|
|
84
86
|
}
|
|
85
87
|
fixMediaUrl(mediaUrl) {
|