diff options
author | Rob McGinley <mcginleyr1@gmail.com> | 2016-06-04 10:39:56 -0400 |
---|---|---|
committer | Rob McGinley <mcginleyr1@gmail.com> | 2016-06-04 10:39:56 -0400 |
commit | 8dc7986ada6631a491ff09f286a1a534e7b34a19 (patch) | |
tree | 75957a61c59ad06efcafa3ae04b622315e08dd36 /app/components/plan-view | |
parent | ffec797c18059bad36916c7593902e1906b991ce (diff) | |
parent | d7bac26ce4a8618c4e0bba5335880c92d09acc32 (diff) |
Merge branch 'master' of github.com:AlexTatiyants/pev
Diffstat (limited to 'app/components/plan-view')
-rw-r--r-- | app/components/plan-view/plan-view.html | 15 | ||||
-rw-r--r-- | app/components/plan-view/plan-view.ts | 6 |
2 files changed, 12 insertions, 9 deletions
diff --git a/app/components/plan-view/plan-view.html b/app/components/plan-view/plan-view.html index 4ebb70c..70278f4 100644 --- a/app/components/plan-view/plan-view.html +++ b/app/components/plan-view/plan-view.html @@ -9,21 +9,22 @@ <input id="showPlanStats" type="checkbox" [(ngModel)]="viewOptions.showPlanStats"> <label class="clickable" for="showPlanStats"> show plan stats</label> </li> - - <li> - <input id="showCompactView" type="checkbox" [(ngModel)]="viewOptions.showCompactView"> - <label class="clickable" for="showCompactView"> show compact view</label> - </li> - <li> <input id="showPlannerEstimate" type="checkbox" [(ngModel)]="viewOptions.showPlannerEstimate"> <label class="clickable" for="showPlannerEstimate"> show planner estimate</label> </li> - <li> <input id="showTags" type="checkbox" [(ngModel)]="viewOptions.showTags"> <label class="clickable" for="showTags"> show analysis tags</label> </li> + <li> + <label>view mode: </label> + <div class="button-group"> + <button [class.selected]="viewOptions.viewMode == viewModes.FULL" (click)="viewOptions.viewMode = viewModes.FULL">full</button> + <button [class.selected]="viewOptions.viewMode == viewModes.COMPACT" (click)="viewOptions.viewMode = viewModes.COMPACT">compact</button> + <button [class.selected]="viewOptions.viewMode == viewModes.DOT" (click)="viewOptions.viewMode = viewModes.DOT">dot</button> + </div> + </li> <li> <label>graph metric: </label> diff --git a/app/components/plan-view/plan-view.ts b/app/components/plan-view/plan-view.ts index 895cccf..9ba8782 100644 --- a/app/components/plan-view/plan-view.ts +++ b/app/components/plan-view/plan-view.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from 'angular2/core'; import {ROUTER_DIRECTIVES, RouteParams} from 'angular2/router'; import {IPlan} from '../../interfaces/iplan'; -import {HighlightType} from '../../enums'; +import {HighlightType, ViewMode} from '../../enums'; import {PlanNode} from '../plan-node/plan-node'; import {PlanService} from '../../services/plan-service'; import {SyntaxHighlightService} from '../../services/syntax-highlight-service'; @@ -26,13 +26,15 @@ export class PlanView { showHighlightBar: true, showPlannerEstimate: false, showTags: true, - highlightType: HighlightType.NONE + highlightType: HighlightType.NONE, + viewMode: ViewMode.FULL }; showPlannerEstimate: boolean = true; showMenu: boolean = false; highlightTypes = HighlightType; // exposing the enum to the view + viewModes = ViewMode; constructor(private _planService: PlanService, routeParams: RouteParams) { this.id = routeParams.get('id'); |