Skip to content

Commit

Permalink
- added different step sizes at the exchange market (CTRL 50, SHIFT 2…
Browse files Browse the repository at this point in the history
…5, ALT 5) (#797)
  • Loading branch information
Kyusung4698 committed Jul 28, 2020
1 parent bde5a07 commit 69e9f92
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
</div>
<div class="values">
<div class="sub">
<button (click)="onSub()" [disabled]="value === min">-</button>
<button (click)="onSub($event)" [disabled]="value === min">-</button>
<button (click)="value = min" [disabled]="value === min">{{min}}</button>
</div>
<div class="add">
<button (click)="onAdd()" [disabled]="value === max">+</button>
<button (click)="onAdd($event)" [disabled]="value === max">+</button>
<button (click)="value = max" [disabled]="value === max">{{max}}</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 69e9f92

Please sign in to comment.