Skip to content
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

🐛 [BUG]: Can no longer add classes to MiniMap in order to place other elements in the same Panel #1247

Closed
1 task done
Tracked by #1249
snoozbuster opened this issue Jan 19, 2024 · 5 comments · Fixed by #1235
Closed
1 task done
Tracked by #1249
Assignees
Labels
bug Something isn't working

Comments

@snoozbuster
Copy link
Contributor

snoozbuster commented Jan 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues and this is a new bug.

Current Behavior

Prior to @vueflow/minimap@1.3.0, I was able to write code similar to the following (using Bootstrap utilities to reset margin and position):

<Panel>
  <MiniMap class="position-static m-0" />
  <!-- other stuff -->
</Panel>

in order to put the minimap inside the same panel as other components. I used this for an effect like so:
image

In 1.3.0, classes are no longer applied to the Panel, but instead to the svg inside the Panel. Additionally, there is no way to add additional contents to the Panel such as via a slot or to use the MiniMap without a wrapping Panel.

Expected Behavior

I should be able to include a minimap alongside additional content in the same floating panel.

Steps To Reproduce

see code above

Relevant log output

No response

Anything else?

No response

@bcakmakoglu
Copy link
Owner

Mh... You could just do Controls position="bottom-right" to have them on the same position.
Is it a hard requirement to put these in the same Panel? 🤔

This change could be reverted though but if a different solution is possible, I'd prefer that 😅

@snoozbuster
Copy link
Contributor Author

the two panels overlap if you put them both in the same position. Also, these controls are a custom set of buttons. Yes, this is a hard requirement for me.

There are a number of solutions which don't involve a revert - exposing the minimap component separate from the wrapping panel, adding a slot to the minimap, or adding a prop to the minimap which allows classes to be placed directly on the panel. Any of these would be sufficient for my usecase.

@bcakmakoglu
Copy link
Owner

Well yeah, but wrapping it in a Panel isn't preventing Panels overlapping.
You put a third Panel around 2 components that already use a panel, so I'm not sure how "overlap" is the issue here?

@bcakmakoglu
Copy link
Owner

I'mma be real with you, looking back at this I'm not even sure why I changed it in the first place.
This change will be reverted 🤷‍♂️

@bcakmakoglu bcakmakoglu linked a pull request Jan 21, 2024 that will close this issue
@bcakmakoglu
Copy link
Owner

Reverted in 1.29.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants