PIXI Controls: Fix edit mode open

This commit is contained in:
OleSTEEP 2024-02-15 17:29:03 +03:00
parent b68bf9c002
commit 9489e0533e

View file

@ -355,7 +355,6 @@ ONSControls.setupDragNDrop = function(element) {
element.alpha = orig_alpha; element.alpha = orig_alpha;
}; };
} }
element.on("pointerdown", onStart); element.on("pointerdown", onStart);
this._controlsCanvas.stage.on("pointerup", onEnd); this._controlsCanvas.stage.on("pointerup", onEnd);
this._controlsCanvas.stage.on("pointerupoutside", onEnd); this._controlsCanvas.stage.on("pointerupoutside", onEnd);
@ -379,6 +378,7 @@ ONSControls.replaceBackEvent = function() {
// * Open Edit Mode // * Open Edit Mode
//============================================================================= //=============================================================================
ONSControls.openEditMode = function() { ONSControls.openEditMode = function() {
if (Graphics._canvas.hidden === false) {
Graphics._canvas.hidden = true; Graphics._canvas.hidden = true;
this.clearInteractive(); this.clearInteractive();
clearInterval(this._idleInterval); clearInterval(this._idleInterval);
@ -390,6 +390,7 @@ ONSControls.openEditMode = function() {
this._editModeText.x = this._controlsCanvas.screen.width / 2; this._editModeText.x = this._controlsCanvas.screen.width / 2;
this._editModeText.y = this._controlsCanvas.screen.height / 2; this._editModeText.y = this._controlsCanvas.screen.height / 2;
} }
}
//============================================================================= //=============================================================================
// * Close Edit Mode // * Close Edit Mode
//============================================================================= //=============================================================================