Feature
It might be useful to set explicitly the position of the MdMenu by using real x and y coordinates.
When you open the menu programmatically via the ViewChild you can only set for position "above" and "below" respectively "before" and "after"
I have a svg with several paths. When I click on one of these paths I'd like to show a Menu with actions. I have to call it programmatically. I assigned the mdMenuTriggerFor on a hidden input field. But now the menu will always be displayed on the top left corner.
Material: 2.0.0-beta.1
OS: Microsoft Windows [Version 6.1.7601]
Browser: Chrome Version 55.0.2883.87 m
I would like this option too. There are many cases where you would want to show a menu at different locations in response to a click event.
This feature also means that you should be able to create a MdMenu without an associated MdMenuTrigger. Or, at least you should be able to create a MdMenu without a trigger and specify a single-use trigger via the API:
this.menu.openAtElement(event.target)
@arlowhite I've come up with a work-around for the time being that works fairly well. I've added an ngStyle to an invisible, absolutley positioned trigger that updates the top and left based on mouse click.
Most helpful comment
@arlowhite I've come up with a work-around for the time being that works fairly well. I've added an ngStyle to an invisible, absolutley positioned trigger that updates the top and left based on mouse click.