|
|
@@ -88,9 +88,14 @@ class SymjaConsole {
|
|
|
document.getElementById('closeFullscreen')?.addEventListener('click', () => {
|
|
|
const fs = document.getElementById('fullscreenPanel');
|
|
|
fs.classList.remove('show');
|
|
|
- // 停止动画循环
|
|
|
- const api = this.createIJSAPI([]);
|
|
|
- if (api) api.canvas.stop();
|
|
|
+ // 调用插件的 IJS.ui.close() 进行清理(停止音乐、动画等)
|
|
|
+ if (this._lastIjsApi && this._lastIjsApi.ui) {
|
|
|
+ this._lastIjsApi.ui.close();
|
|
|
+ }
|
|
|
+ // 确保动画停止
|
|
|
+ if (this._lastIjsApi && this._lastIjsApi.canvas) {
|
|
|
+ this._lastIjsApi.canvas.stop();
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// 插件面板事件
|