This PR fixes issue #7 where entities and models were being displayed offscreen when created. The issue was identified in the ViewMain.jsx file and has been addressed by modifying the calculation of viewHeight.
User-visible changes:
Entities and models are now correctly displayed within the screen boundaries when created.
Developer-relevant changes:
The calculation of viewHeight in ViewMain.jsx has been modified.
Testing Steps
Pull the changes from the branch dev-tv/fix-outcome-entity-displayed-offscreen.
Run the application.
Create a new entity or model.
Verify that the new entity or model is displayed within the screen boundaries.
Technical Notes
Changes to viewHeight calculation:
The line const viewHeight = this.viewRect.height - this.toolRect.height was using Math.min to calculate the viewHeight. This was causing the height to be set offscreen when either this.viewRect.height or this.toolRect.height was 0. The calculation has been changed to use Math.max instead, ensuring that viewHeight is the larger of the two values.
Summary
This PR fixes issue #7 where entities and models were being displayed offscreen when created. The issue was identified in the
ViewMain.jsx
file and has been addressed by modifying the calculation ofviewHeight
.User-visible changes:
Entities and models are now correctly displayed within the screen boundaries when created.
Developer-relevant changes:
The calculation of
viewHeight
inViewMain.jsx
has been modified.Testing Steps
Technical Notes
Changes to
viewHeight
calculation:The line
const viewHeight = this.viewRect.height - this.toolRect.height
was usingMath.min
to calculate theviewHeight
. This was causing the height to be set offscreen when eitherthis.viewRect.height
orthis.toolRect.height
was 0. The calculation has been changed to use Math.max instead, ensuring thatviewHeight
is the larger of the two values.