JakovTomasic / RitehMaps

Indoor navigation project for the Faculty of Engineering, Rijeka
Apache License 2.0
3 stars 1 forks source link

Map zoom fix #79

Open JakovTomasic opened 6 months ago

JakovTomasic commented 6 months ago

Map should know its dimensions to handle zoom properly. I want to be able to say "let rectangle 10x10 meters be always visible" and for map to handle that properly.

See https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API

JakovTomasic commented 6 months ago

Possible solutions:

JakovTomasic commented 6 months ago

Example of it not working: last step for path http://localhost:3000/navigation-step-by-step-forward?startNodeId=I2&endNodeId=P4

JakovTomasic commented 5 months ago

Use ParentResizeListener for div size. That is solved.

JakovTomasic commented 4 months ago

Permalink to mentioned ParentResizeListener.

See that branch to see how I used it in the code here.

The observer function onResize is triggered when the parent of the ParentResizeListener is resized.

JakovTomasic commented 4 months ago

@Marko132001 here. I added the link. I will assign you to this issue since you are solving it now.