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

Some bonus features to simplemodal #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Some bonus features to simplemodal #3

wants to merge 3 commits into from

Conversation

cballou
Copy link

@cballou cballou commented Apr 26, 2011

Hey Eric,

I added a number of features to simple modal as it wasn't covering all edge cases I needed for a project. The main functionality I improved upon was calculations in getDimensions(), which now allows for better resizing based on the nested document contents. It does bounds checking on the viewport to ensure the container does not exceed the window size.

I also went ahead and added animation handling to autoResize() so the container now expands and contracts on either update() or when the $(document).resize() fires.

The last thing, and I'm not so sure what I may have broken, was that the setTimeout() of 10 ms on close causes problems when trying to perform a number of consecutive calls to $.modal.close() followed by $.modal.X. Either way, take a look at the code and feel free to merge it once fully tested. I'm sure there are still a few edge cases considering the amount of dimension calculations I modified, but it seems to be working pretty well.

Corey

@ericmmartin
Copy link
Owner

Hi Corey,

I just found this in my spam folder, so sorry for not responding sooner.

Thanks for providing your updates. I'll be sure to take a look at them when
I get a chance to work on SimpleModal!

Regards,
Eric Martin
http://ericmmartin.com

On Tue, Apr 26, 2011 at 4:58 AM, cballou <
[email protected]>wrote:

Hey Eric,

I added a number of features to simple modal as it wasn't covering all edge
cases I needed for a project. The main functionality I improved upon was
calculations in getDimensions(), which now allows for better resizing based
on the nested document contents. It does bounds checking on the viewport to
ensure the container does not exceed the window size.

I also went ahead and added animation handling to autoResize() so the
container now expands and contracts on either update() or when the
$(document).resize() fires.

The last thing, and I'm not so sure what I may have broken, was that the
setTimeout() of 10 ms on close causes problems when trying to perform a
number of consecutive calls to $.modal.close() followed by $.modal.X. Either
way, take a look at the code and feel free to merge it once fully tested.
I'm sure there are still a few edge cases considering the amount of
dimension calculations I modified, but it seems to be working pretty well.

Corey

Reply to this email directly or view it on GitHub:
#3

@tuscanknox
Copy link

ahhhhh... the animation on update()! thank you for doing this Corey - it's awesome!

Oh, and Eric - just because I know you love having random internet plebs tell you that you should spend your time doing things for them because they feel that people who give stuff away for free are somehow making themselves obliged to serve "society" which they wholeheartedly believe includes their every problem and whim... let's get this in the formal simplemodal 1.5 package, ok? wink

t

@mattcph
Copy link

mattcph commented Feb 14, 2013

I found the auto animation not a good core feature, prefer to implement a resize of own decision based on application using the simple modal, it's simple for a good reason. thanks though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants