Skip to content

Commit

Permalink
feat(hotbar): hide hotbars when input type isn't mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
SargoDarya committed Aug 16, 2021
1 parent b86ca89 commit 1f9d035
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export class CrossHotbarSetComponent {
}

public onDropHandler(dropEvent: { hotbarId: number, slotId: number, actionId: number }) {
console.log('emitting')
this.onAssignSlot.emit(dropEvent);
}
}
2 changes: 1 addition & 1 deletion src/app/pages/browser/browser.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(toggleUserOverlay)="isUserPanelVisible = !isUserPanelVisible"></rh-toolbar>

<div class="rh-browser__content" cdkDropListGroup>
<rh-hotbars></rh-hotbars>
<rh-hotbars *ngIf="(configurationService.inputType$ | async) === InputType.Mouse"></rh-hotbars>

<rh-cross-hotbar
[hotbarCrossSettings]="configurationService.hotbarCrossSettings$ | async"
Expand Down
6 changes: 5 additions & 1 deletion src/app/pages/browser/browser.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import {Component} from '@angular/core';
import {DialogConfiguration, DialogService} from "../../modules/dialog/services/dialog.service";
import {ConfigurationService} from "../../modules/configuration/services/configuration.service";
import {InputType} from "../../modules/configuration/enums/input-type";

@Component({
selector: 'app-browser',
templateUrl: './browser.component.html',
styleUrls: ['./browser.component.scss']
})
export class BrowserComponent {

public readonly InputType = InputType;

public constructor(
public readonly configurationService: ConfigurationService,
private readonly dialogService: DialogService,
Expand All @@ -19,6 +23,6 @@ export class BrowserComponent {
this.dialogService.toggle(dialogConfiguration);
}
}

public isUserPanelVisible = false;
}

0 comments on commit 1f9d035

Please sign in to comment.