1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Getting this context for switch hotbar methods

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-04-04 11:16:02 +03:00
parent 85f2ce7504
commit f5b10f2a38

View File

@ -285,7 +285,7 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
}
switchToPrevious() {
switchToPrevious = () => {
let index = this.activeHotbarIndex - 1;
if (index < 0) {
@ -293,9 +293,9 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
this.setActiveHotbar(index);
}
};
switchToNext() {
switchToNext = () => {
let index = this.activeHotbarIndex + 1;
if (index >= this.hotbars.length) {
@ -303,7 +303,7 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
this.setActiveHotbar(index);
}
};
/**
* Checks if entity already pinned to the active hotbar