mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
fix(menu): pass platform to menu type
This commit is contained in:
@ -294,7 +294,7 @@ export class MenuController {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
static create(type: string, menuCmp: Menu, platform: Platform) {
|
static create(type: string, menuCmp: Menu, platform: Platform) {
|
||||||
return new menuTypes[type](menuCmp);
|
return new menuTypes[type](menuCmp, platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ export class MenuType {
|
|||||||
* The menu itself, which is under the content, does not move.
|
* The menu itself, which is under the content, does not move.
|
||||||
*/
|
*/
|
||||||
class MenuRevealType extends MenuType {
|
class MenuRevealType extends MenuType {
|
||||||
constructor(menu: Menu) {
|
constructor(menu: Menu, platform: Platform) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
let openedX = (menu.width() * (menu.side === 'right' ? -1 : 1)) + 'px';
|
let openedX = (menu.width() * (menu.side === 'right' ? -1 : 1)) + 'px';
|
||||||
|
Reference in New Issue
Block a user