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

Panel size & location bug #2

Open
praftery opened this issue Apr 21, 2015 · 1 comment
Open

Panel size & location bug #2

praftery opened this issue Apr 21, 2015 · 1 comment
Labels

Comments

@praftery
Copy link
Contributor

I'm guessing you already know about this, but it's possible to specify a panel that extends beyond the wall, causing this:

image

@thoyt

@thoyt thoyt added the bug label Oct 21, 2017
@praftery
Copy link
Contributor Author

I see two routes to resolve this out of bounds issue.

  1. When a user enters a value that would cause this, we edit the value for the opposing property. For example, starting from a valid scenario in a 10 m wide room:
    xposition = 3
    panel width = 6.
    There's 1 m left over. If the user increases the panel width to 9, we'd move the window over to accommodate it (change xposition to 1). This could be a bit jarring as you'd click on one input and a different input value would change automagically....

  2. The alternative is to define it differently, using:
    xcenter (denotes the center of the panel in the surface in the x direction)
    xpct (denotes the percentage of the widest possible panel at that location, given the room width constraint). Maybe a little less intuitive up front (?), but you'd never encounter a case where you'd change one input and another would also change.

I guess option 2 might be better, because none of the inputs would change based on other inputs. Any thoughts before I go one route or the other?

praftery added a commit that referenced this issue Jul 18, 2019
Resize the panel to fit on the surface even when a user enters a panel dimension/position such that the panel would be out of bounds.

Note: the GUI will still display the 'incorrect' (too large) dimension for that panel.

Other minor changes:
added var for minimum border size around panel (0.1 m)
limited maximum user inputs for any panel dimension to surface dimension minus 2*min border size
limited maximum user input for panel position to 2* border size (minimum panel dimension in any case is now the min border size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants