From 69e9f929f06abbbc04fdb6afd525a87286955259 Mon Sep 17 00:00:00 2001 From: Nicklas Ronge Date: Tue, 28 Jul 2020 16:48:26 +0200 Subject: [PATCH] - added different step sizes at the exchange market (CTRL 50, SHIFT 25, ALT 5) (#797) --- CHANGELOG.md | 5 ++-- README.md | 3 --- .../market-exchange-price.component.html | 4 ++-- .../market-exchange-price.component.ts | 23 +++++++++++++++---- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5092848e..b639d725 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,10 @@ ## 1.0.9 (2020-07-29) - added stash navigation on ctrl + mousewheel -- added support for the different poe.ninja urls based on the league and name +- added better support for the generate poe.ninja urls based on the league and name (#208) - added latest_whisper placeholder for commands -- added images for the items at the market +- added item images at the search market +- added different step sizes at the exchange market (CTRL 50, SHIFT 25, ALT 5) (#797) - fixed an issue at the market enabling sockets to be toggleable ## 1.0.8 (2020-07-09) diff --git a/README.md b/README.md index 667b08cb..0607abee 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,9 @@ The complete guide with pictures can be found [here](INSTALLING.md). | Module | Feature | Status | Note | ------------- | --------------- | ------ | --------- -| Market | Search History | 🚧 | | Market | Save Queries | 📚 | | Market | Sort Results | 📚 | | Stash | Filter Category | 📚 | -| Stash | Navigation | ⚡ | Waiting 🐺 -| Commands | @latest_whisper | ⚡ | Waiting 🐺 🚧 In Progress 📚 Backlog ⚡ Blocked 🐺 Overwolf diff --git a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html index fcce375d..e704d90e 100644 --- a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html +++ b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html @@ -37,11 +37,11 @@
- +
- +
diff --git a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts index 233f78a7..e9fd7ce5 100644 --- a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts +++ b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts @@ -46,11 +46,26 @@ export class MarketExchangePriceComponent implements OnInit { }); } - public onSub(): void { - this.value = Math.max(this.min, this.value - 1); + public onSub(event: MouseEvent): void { + const factor = this.getFactor(event); + this.value = Math.max(this.min, this.value - factor); } - public onAdd(): void { - this.value = Math.min(this.max, this.value + 1); + public onAdd(event: MouseEvent): void { + const factor = this.getFactor(event); + this.value = Math.min(this.max, this.value + factor); + } + + private getFactor(event: MouseEvent): number { + if (event.ctrlKey) { + return 50; + } + if (event.shiftKey) { + return 25; + } + if (event.altKey) { + return 5; + } + return 1; } }