mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Update to Angular 14
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, ViewChild, ElementRef } from '@angular/core';
|
||||
import { Component, Input, ViewChild, ElementRef, TemplateRef } from '@angular/core';
|
||||
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
|
||||
import { ButtonAction } from '../../../common/interfaces';
|
||||
import { PonyTownGame } from '../../../client/game';
|
||||
@@ -16,7 +16,7 @@ import { faCog } from '../../../client/icons';
|
||||
})
|
||||
export class ActionBar {
|
||||
@ViewChild('scroller', { static: true }) scroller!: ElementRef;
|
||||
@ViewChild('actionsModal', { static: true }) actionsModal!: ElementRef;
|
||||
@ViewChild('actionsModal', { static: true }) actionsModal!: TemplateRef<any>;
|
||||
@Input() blurred = false;
|
||||
readonly cogIcon = faCog;
|
||||
activeAction: ButtonAction | undefined = undefined;
|
||||
@@ -68,7 +68,7 @@ export class ActionBar {
|
||||
const settings = { ...this.settings.account, actions: serializeActions(this.actions) };
|
||||
this.settings.saveAccountSettings(settings);
|
||||
}
|
||||
scroll(e: MouseWheelEvent) {
|
||||
scroll(e: WheelEvent) {
|
||||
if (e.deltaY) {
|
||||
const delta = e.deltaY > 0 ? 1 : -1;
|
||||
this.scroller.nativeElement.scrollLeft += delta * 20;
|
||||
|
||||
Reference in New Issue
Block a user