From ac01076973aed33f3b7f90bd2d94000c07ad3f34 Mon Sep 17 00:00:00 2001 From: ztimson Date: Fri, 30 Aug 2019 16:41:30 -0400 Subject: [PATCH] return item --- src/app/components/toolbar/toolbar.component.ts | 6 +++--- src/app/models/toolbarItem.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/components/toolbar/toolbar.component.ts b/src/app/components/toolbar/toolbar.component.ts index 4c72db8..d3b5973 100644 --- a/src/app/components/toolbar/toolbar.component.ts +++ b/src/app/components/toolbar/toolbar.component.ts @@ -41,11 +41,11 @@ export class ToolbarComponent implements OnInit, AfterViewInit { this.menuItemsChange.emit(this.displayMenuItems); if(item.enabled) { - if(item.onEnabled) item.onEnabled(); + if(item.onEnabled) item.onEnabled(item); } else { - if(item.onDisabled) item.onDisabled(); + if(item.onDisabled) item.onDisabled(item); } } - if(item.click) item.click(); + if(item.click) item.click(item); } } diff --git a/src/app/models/toolbarItem.ts b/src/app/models/toolbarItem.ts index 5b1a24e..2c485ba 100644 --- a/src/app/models/toolbarItem.ts +++ b/src/app/models/toolbarItem.ts @@ -5,9 +5,9 @@ export interface ToolbarItem { hidden?: boolean; toggle?: boolean; individualToggle?: boolean; - click?: () => void; + click?: (item?: ToolbarItem) => void; enabled?: boolean; - onEnabled?: () => void; - onDisabled?: () => void; + onEnabled?: (item?: ToolbarItem) => void; + onDisabled?: (item?: ToolbarItem) => void; subMenu?: ToolbarItem[]; }