-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Absolute position #11
Comments
Thanks for the feature request.
This definitely would be nice to have. I would also like to add more options to
I think this is currently possible using the offset options Can you provide an example of an SVG you'd want to add a popover to its elements, with an explanation of how you'd want it to function? Would help me to test that functionality with the popover. |
I'll give it another shot and let you know then. |
I did some more experiments. I did try to define popover on a containing div of my svg and also on a div inside the div but that seemed not to be doing what I would expect. It works as expected on a button though. That could have solve together with |
Thanks for getting back to me on this issue. I would be interested to investigate the problems with using it on an SVG. I do have a plunker here but i would prefer if you used StackBlitz here is one that I've setup. If you fork that StackBlitz template and add an SVG example and share the link I will look into seeing what's wrong. |
I am unsure if I should start a new feature request, or add it here. But I need to trigger the menu to open at precisely where my mouse clicks it, not in relation to where the component was clicked. Is there a way to do it with the current api? I looked at it but I couldn't figure it out. |
I think this feature would fit your criteria That's not possible with the current API. It would be a nice to have feature. This type of popover would need to have its own component that doesn't use the At the moment you could have an invisible 1px by 1px element that you use for the target element and position that element where the mouse is on the event trigger. The popover should then be positioned wherever that target element is. |
@joejordanbrown Thanks, I've also thought about doing having a layer of an invisible component to anchor the popover and have it follow the cursor. I've since switched to a static location to trigger the popover to avoid all that code for what is a small change in UX. |
Here is an example I've just made https://stackblitz.com/edit/mde-popover-dynamic-target-position |
@joejordanbrown
|
If the problem was relating to |
Updated, renamed to See StackBlitz Demo. |
@joejordanbrown the above works, but when mouse is clicked outside of div it doesn't closes the popover.
this.triggerEvent === 'click' is none |
@joejordanbrown, is there a way to show the arrow in the example |
Sorry I missed your reply. Check out this example https://stackblitz.com/edit/mde-popover-dynamic-target-position-arrow-offset?file=app/app.component.html You can use these options There is a bug with the offset that's I was recently made aware of, you can see the issue when you try to click the right side of the example. |
Is there a way I can currently achieve absolute positioning ? @joejordanbrown |
Bug, feature request, or proposal:
Feature
What is the expected behaviour?
Be able to (absolute) position popover.
Have possibility to absolute position popover. Or move it relative to the element at least.
What is the current behaviour?
Position is bound a dom element (I agree there is functionality making use of it)
What are the steps to reproduce?
Provide a working example using StackBlitz (or similar) to reproduce the problem.
StackBlitz Template: https://stackblitz.com/fork/mde-popover
What is the use-case or motivation for changing an existing behaviour?
I need to show popup for svg elements.
Which versions of Angular, Material-Extended, OS, TypeScript, browsers are affected?
Other Comments
The text was updated successfully, but these errors were encountered: