mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 23:25:56 +00:00
hide build menu when click on map on mobile
This commit is contained in:
@@ -40,10 +40,6 @@ export class BuildMenu extends LitElement {
|
||||
private myPlayer: Player;
|
||||
private clickedCell: Cell;
|
||||
|
||||
init() {
|
||||
this.eventBus.on(ContextMenuEvent, (e) => { this.hideMenu() })
|
||||
}
|
||||
|
||||
static styles = css`
|
||||
:host {
|
||||
display: block;
|
||||
|
||||
@@ -201,6 +201,10 @@ export class RadialMenu implements Layer {
|
||||
}
|
||||
|
||||
private onContextMenu(event: ContextMenuEvent) {
|
||||
if (this.buildMenu.isVisible) {
|
||||
this.buildMenu.hideMenu()
|
||||
return
|
||||
}
|
||||
if (this.isVisible) {
|
||||
this.hideRadialMenu()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user