Skip to content

Commit

Permalink
feat(preview): double click to pick an item
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveVanOpstal committed Dec 13, 2016
1 parent 105b3aa commit 99abecb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/client/build/shop/preview/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import {ItemBundle} from './item-bundle';
<div class="tree">
<div class="item" *ngIf="item">
<h2>{{item.name}}</h2>
<lb-item [item]="item" (itemPicked)="pickItem($event)"></lb-item>
<lb-item [item]="item"
(itemPicked)="pickItem($event)"
(dblclick)="pickItem(item)">
</lb-item>
</div>
<div class="from">
<hr *ngIf="itemsFrom?.length" class="down">
Expand Down
3 changes: 2 additions & 1 deletion src/client/build/shop/shop.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import {Item} from '../item';
[ngClass]="{disabled: item.disabled}"
[attr.title]="item.description"
(click)="selectItem(item)"
(contextmenu)="pickItem(item)">
(contextmenu)="pickItem(item)"
(dblclick)="pickItem(item)">
</lb-item>
</template>
<lb-loading [loading]="loading"></lb-loading>
Expand Down

0 comments on commit 99abecb

Please sign in to comment.