-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Modal for roomfinder #281
Modal for roomfinder #281
Conversation
It can probably be simplified a bit for the modal, because not all parts are relevant (I've not tested this code, but this is what I think is relevant): loadModalRoomfinderMap: function () {
const map = this.view_data.maps.roomfinder.available[mapIndex];
const rect = document
.getElementById("TBD")
.getBoundingClientRect();
// -1023px, -1023px is top left corner, 16px = 2*8px is element padding
this.state.map.roomfinder.modalX =
-1023 + (map.x / map.width) * (rect.width - 16);
// We cannot use "height" here as it might be still zero before layouting
// finished, so we use the aspect ratio here.
this.state.map.roomfinder.modalY =
-1023 +
(map.y / map.height) * (rect.width - 16) * (map.height / map.width);
} But one problem may be that the HTML elements will not yet be in the DOM if you put that in the click handler at the moment. Because the One way to fix that could be to toggle only the (Maybe it's better to call it On the other hand, I would also be okay to merge without the cross implemented, I don't know how much difference it makes in terms of the Vue3 port @CommanderStorm ? |
I am indifferent about this. Migrating this should be quite straightforward (I cannot guarantee commit ownership though, as all commits in #200 will have to be squashed before merging into main..) |
@octycs did you think of this change or did I something wrong? Because it is not working properly. The modal is now open when I leave out the |
Did you add the |
Oh sorry. I tried the code in another directory and forgot to add the |
@octycs Now the positioning of the cross should be right. But I didn't get rid of the overflow of the cross. |
Ok, thank you for your help! Now everything should be right from my perspective. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4aa90f3
to
971a56c
Compare
Sorry for the long wait 😅 |
Resolves: #143
Is the roomfinder-map sufficient or should the map-cross also be implemented to the modal?
I already tried to implement the cross but it is a bit difficult with the position because I think you have to make a function like the
loadRoomfinderMap
-function for the roomfinder modal.