()
| 4095 | this.virtualGamepad.style.display = "none"; |
| 4096 | } |
| 4097 | handleResize() { |
| 4098 | if (this.virtualGamepad) { |
| 4099 | if (this.virtualGamepad.style.display === "none") { |
| 4100 | this.virtualGamepad.style.opacity = 0; |
| 4101 | this.virtualGamepad.style.display = ""; |
| 4102 | setTimeout(() => { |
| 4103 | this.virtualGamepad.style.display = "none"; |
| 4104 | this.virtualGamepad.style.opacity = ""; |
| 4105 | }, 250) |
| 4106 | } |
| 4107 | } |
| 4108 | const positionInfo = this.elements.parent.getBoundingClientRect(); |
| 4109 | this.game.parentElement.classList.toggle("ejs_small_screen", positionInfo.width <= 575); |
| 4110 | //This wouldnt work using :not()... strange. |
| 4111 | this.game.parentElement.classList.toggle("ejs_big_screen", positionInfo.width > 575); |
| 4112 | |
| 4113 | if (!this.handleSettingsResize) return; |
| 4114 | this.handleSettingsResize(); |
| 4115 | } |
| 4116 | getElementSize(element) { |
| 4117 | let elem = element.cloneNode(true); |
| 4118 | elem.style.position = "absolute"; |
no outgoing calls
no test coverage detected