picozone / simplemodal

Automatically exported from code.google.com/p/simplemodal
0 stars 0 forks source link

Allow modals to increase in size #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please describe the feature you would like to see and how it would help you
and others better use SimpleModal (try and be specific):

 * SimpleModal 1.3-b1 - jQuery Plugin

Size of modals' decreases but does not increase. Create an option or
ability to allow for flexible increase & decrease in size. 

Quick and dirty hack;  in setContainerDimensions() add to height/width if
statements "|| this.opts.flexsizeheight" and "|| this.opts.flexsizewidth".
When method is called on window re-size the pop-up will always pretend
there is no already set height or width when these options are set. This
allows the modal to increase in size based on data/min/max.

I think the "clean way" to preform this is to detect if there is a preset
width and/or height in create() and set a private boolean. Then respect
those presets values in setContainerDimensions() by using the boolean
instead of the option value outlined above.

I hope that was clear, but somehow doubt it.

Original issue reported on code.google.com by cavi...@gmail.com on 11 Jun 2009 at 6:48

GoogleCodeExporter commented 8 years ago
Thanks for the suggestion. One thing I changed from 1.3-b1 was I added an 
autoResize
option, which is false by default. So, by default, the container will not be 
resized
when the window is resized.

I think having it increase in size, might be cool - I'm just not sure it is 
worth the
extra code/conditions that it might take...especially now that I changed it to 
not
resize by default.

Thoughts?

Original comment by emartin24 on 11 Jun 2009 at 8:58

GoogleCodeExporter commented 8 years ago
It sounds like it might be best left to the next release. Unfortunately I've 
spent
all the time that I've had budgeted so I can't submit a proper patch.

The "hack" I used would split the autoResize option you mention into two 
options.
Something like autoResizeWidth, autoResizeHeight. If you want to go ahead with 
this I
suggest:
 create()
   if ( ! autoResizeHeight ) autoResizeHeight = autoResize;
   if ( ! autoResizeWidth ) autoResizeWidth = autoResize;
 setContainerDimensions()
   // height
   if (!ch || this.opts.autoResizeHeight ) {
   // width 
   if (!cw || this.opts.autoResizeWidth ) {

Its not perfect but it works great for my dynamic content in the pop-ups if I 
set
.simplemodal-data { width: 500px; }

Original comment by cavi...@gmail.com on 11 Jun 2009 at 9:49

GoogleCodeExporter commented 8 years ago
I'm adding a new function in SimpleModal that will allow you to update the 
container size and re-bind events. It will be in the next release.

Original comment by emartin24 on 20 Jul 2010 at 11:22

GoogleCodeExporter commented 8 years ago
how is it comming

Original comment by fox...@gmail.com on 6 Aug 2010 at 7:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
1.4 should contain the functions necessary to resize the dialog.

Original comment by emartin24 on 19 Oct 2010 at 5:03