-
Notifications
You must be signed in to change notification settings - Fork 13
1113 adjust defaults new map defaults #1302
base: master
Are you sure you want to change the base?
Conversation
… analyse a better calculation solution (currently hardcoded values of widgets)
Explanation related to how the View rectangle is centered at (0, 0):
In the code we have those values hardcoded for the calculation - this is not ideal but I am not sure how else to approach this, maybe someone else has another solution. |
Please put this as code comment. It is nearly impossible for devs to find text in PRs later on. |
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.
I would suggest having a config file of some sort (or adding it to an existing file where it fits) in the map_planning feature maybe for saving these sizes "globally". If not, leaving it like this is also good for now.
- I've tested the code
- I've read through the whole code
- I've read through the whole documentation
- I've checked conformity to guidelines
- I've checked conformity to requirements
- I've checked that the requirements are tested
I changed the approach to the problem. Inside the component, we use a reference to the node of the DOM tree already, so we can use it to grab the height and the width of the "BaseStage" component itself and update it inside the useEffect hook. |
jenkins build please |
jenkins build please |
Summary
To make the default view of a new map make sense for the user, we change the scaling of the map polygon and we move the view rectangle to be centered on (0, 0).
The calculation for the new view rectangle is not ideal, see first comment for description.
PR should not be merged before the approach is discussed and maybe a better solution is proposed.
Basics
close #X
, are in the commit messages and changelogChecklist
First Time Checklist
Review