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.on("pointerdown", onStart);
this._controlsCanvas.stage.on("pointerup", onEnd);
this._controlsCanvas.stage.on("pointerupoutside", onEnd);
@ -379,6 +378,7 @@ ONSControls.replaceBackEvent = function() {
// * Open Edit Mode
//=============================================================================
ONSControls.openEditMode = function() {
if (Graphics._canvas.hidden === false) {
Graphics._canvas.hidden = true;
this.clearInteractive();
clearInterval(this._idleInterval);
@ -389,6 +389,7 @@ ONSControls.openEditMode = function() {
this._editModeText.visible = true;
this._editModeText.x = this._controlsCanvas.screen.width / 2;
this._editModeText.y = this._controlsCanvas.screen.height / 2;
}
}
//=============================================================================
// * Close Edit Mode