From cb4acab198bc22d3115f84756d09007aac9e357c Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Tue, 24 Jul 2018 00:37:12 +0200 Subject: [PATCH] feat(menu): add getWidth() fix #14794 --- core/src/components/menu/menu.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/components/menu/menu.tsx b/core/src/components/menu/menu.tsx index bd0026acfe..f0e73f1c26 100644 --- a/core/src/components/menu/menu.tsx +++ b/core/src/components/menu/menu.tsx @@ -238,6 +238,11 @@ export class Menu { return !this.disabled && !this.isPaneVisible; } + @Method() + getWidth(): number { + return this.width; + } + private async loadAnimation(): Promise { // Menu swipe animation takes the menu's inner width as parameter, // If `offsetWidth` changes, we need to create a new animation.