- updates components to use shadow DOM or scoped if they require css variables - moves global styles to an external stylesheet that needs to be imported - adds support for additional colors and removes the Sass loops to generate colors for each component - several property renames, bug fixes, and test updates Co-authored-by: Manu Mtz.-Almeida <manu.mtza@gmail.com> Co-authored-by: Adam Bradley <adambradley25@gmail.com> Co-authored-by: Cam Wiegert <cam@camwiegert.com>
ion-menu-controller
The MenuController makes it easy to control a Menu. Its methods can be used to display the menu, enable the menu, toggle the menu, and more. The controller will grab a reference to the menu by the side, id, or, if neither of these are passed to it, it will grab the first menu it finds.
Methods
_register()
_setActiveMenu()
_setOpen()
_unregister()
close()
Close the Menu. If no menuId is given as the first
argument then it'll close any menu which is open. If a menuId
is given then it'll close that exact menu.
createAnimation()
enable()
Used to enable or disable a menu. For example, there could be multiple left menus, but only one of them should be able to be opened at the same time. If there are multiple menus on the same side, then enabling one menu will also automatically disable all the others that are on the same side.
get()
Used to get a menu instance. If a menuId is not provided then it'll
return the first menu found. If a menuId is left or right, then
it'll return the enabled menu on that side. Otherwise, if a menuId is
provided, then it'll try to find the menu using the menu's id
property. If a menu is not found then it'll return null.
getMenus()
Returns an array of all menu instances.
getOpen()
Returns the instance of the menu already opened, otherwise null.
isAnimating()
If any menu is currently animating
isEnabled()
Returns true or false if the menuId is enabled or not
isOpen()
If the menuId is not specified, it returns true if ANY menu is currenly open.
open()
Open the Menu.
registerAnimation()
swipeEnable()
Used to enable or disable the ability to swipe open the menu.
toggle()
Toggle the menu. If it's closed, it will open, and if opened, it will close.
Built with StencilJS