Some bonus features to simplemodal #3

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants

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

Owner

ericmmartin commented May 7, 2011

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 <
reply@reply.github.com>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

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 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