Added minimum left and top properties for positioning the dialog #2

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@jasonseney

Hey Eric, I noticed that if you size down the browser, it doesn't constrain the top or left position properties. This causes the dialog to be positioned "off screen" in a window that is shorter or narrower than the centered dialog.

I added two options for minLeft and minTop (with generic defaults of 0) to check against when calculating position.

Hope you find this as useful as I did, thanks!

@ericmmartin

This comment has been minimized.

Show comment
Hide comment
@ericmmartin

ericmmartin Apr 5, 2011

Owner

Thanks Jason! I hope to find some time soon to review a few changes and get a new version out.

Owner

ericmmartin commented Apr 5, 2011

Thanks Jason! I hope to find some time soon to review a few changes and get a new version out.

@ericmmartin

This comment has been minimized.

Show comment
Hide comment
@ericmmartin

ericmmartin Jun 14, 2011

Owner

Hi Jason, thanks for the contribution. Do you think it is necessary to create additional options, or could this be "hard-coded" to keep the dialog within window boundaries?

Owner

ericmmartin commented Jun 14, 2011

Hi Jason, thanks for the contribution. Do you think it is necessary to create additional options, or could this be "hard-coded" to keep the dialog within window boundaries?

@jasonseney

This comment has been minimized.

Show comment
Hide comment
@jasonseney

jasonseney Jun 14, 2011

I think it at a minimum it should simply constrain to the window boundaries (0,0). I added the option since I wanted additional margins between my modal dialog and the window so the user with a small window would be able to see some of the overlay on the left and top.

I can understand you wouldn't want the option list to grow out of control, and personally I think "hard-coding" it in for now would be the most important to update. Could always go back and add the additional options later if other users bring it up.

I think it at a minimum it should simply constrain to the window boundaries (0,0). I added the option since I wanted additional margins between my modal dialog and the window so the user with a small window would be able to see some of the overlay on the left and top.

I can understand you wouldn't want the option list to grow out of control, and personally I think "hard-coding" it in for now would be the most important to update. Could always go back and add the additional options later if other users bring it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment