feat(menu): add getWidth()

fix #14794
This commit is contained in:
Manu Mtz.-Almeida
2018-07-24 00:37:12 +02:00
parent 65008e7853
commit cb4acab198

View File

@ -238,6 +238,11 @@ export class Menu {
return !this.disabled && !this.isPaneVisible;
}
@Method()
getWidth(): number {
return this.width;
}
private async loadAnimation(): Promise<void> {
// Menu swipe animation takes the menu's inner width as parameter,
// If `offsetWidth` changes, we need to create a new animation.