Sorry for the long list of posts replying to myself. Here is a new patch 
that fixes the last problem. I think there is probably a more elegant 
way to do this, but this seems to work now.

diff -Naur temp/iresizeable.js sew/iresizeable.js
--- temp/iresizeable.js 2006-10-21 08:22:10.000000000 -0400
+++ sew/iresizeable.js  2006-11-05 13:58:52.000000000 -0500
@@ -17,6 +17,7 @@
         pointer: null,
         sizes : null,
         position: null,
+    notify: function(){},
         start : function(e)
         {
                 jQuery(document)
@@ -46,8 +47,17 @@
                 if (jQuery.iResize.resizeElement.resizeOptions.onStart) {
 
jQuery.iResize.resizeElement.resizeOptions.onStart.apply(jQuery.iResize.resizeElement,
 
[jQuery.iResize.resizeDirection])
                 }
+               jQuery.iResize.sizes = {
+                       width : 
parseInt(jQuery(jQuery.iResize.resizeElement).css('width'))||0,
+                       height : 
parseInt(jQuery(jQuery.iResize.resizeElement).css('height'))||0
+               };
+               jQuery.iResize.position = {
+                       top : 
parseInt(jQuery(jQuery.iResize.resizeElement).css('top'))||0,
+                       left : 
parseInt(jQuery(jQuery.iResize.resizeElement).css('left'))||0
+               };
                 jQuery.iResize.resizeElement = null;
                 jQuery.iResize.resizeDirection = null;
+        jQuery.iResize.notify();
         },
         getWidth: function(dx, side)
         {
@@ -208,6 +218,9 @@
                                                 }
                                         }
                                 }
+                if (options.notify && typeof(options.notify) == 
"function") {
+                    jQuery.iResize.notify = options.notify;
+                }
                         }
                 );
         }
@@ -216,4 +229,4 @@
         {
                 Resizeable : jQuery.iResize.build
         }
-);
\ No newline at end of file
+);


Stephen Woodbridge wrote:
> OK, this is not quite right yet. In side the notify function this.sizes 
> seems to be the original size of the div and not the new resized sizes. 
> Using it like this:
> 
> $(document).ready(function(){
>      $('#resize_map').Resizeable(
>          {
>              minHeight: 100,
>              maxHeight: 700,
>              minWidth: 100,
>              maxWidth: 800,
>              handlers: {
>                  se: '#resize'
>              },
>              notify: function(){
>                  alert(this.sizes.height + 'x' + this.sizes.width + " 
> resized");
>              }
>          }
>      );
> });
> 
> Looks like sizes and position get set on start but not on stop, so 
> something a little smarter is required. I guess I'll need to poke at it 
> some more.
> 
> -Steve
> 
> 
> Stephen Woodbridge wrote:
>> Hi Stefan,
>>
>> I took a shot at adding the notify to your iresizeable.js and it seems 
>> to work for my limited testing. Here is the patch:
>>
>> [EMAIL PROTECTED]:~/work/jquery2/plugins/interface.eyecon.ro$ diff -Naur 
>> temp/iresizeable.js sew/iresizeable.js
>> --- temp/iresizeable.js 2006-10-21 08:22:10.000000000 -0400
>> +++ sew/iresizeable.js  2006-11-05 10:28:54.000000000 -0500
>> @@ -17,6 +17,7 @@
>>          pointer: null,
>>          sizes : null,
>>          position: null,
>> +    notify: function(){},
>>          start : function(e)
>>          {
>>                  jQuery(document)
>> @@ -48,6 +49,7 @@
>>                  }
>>                  jQuery.iResize.resizeElement = null;
>>                  jQuery.iResize.resizeDirection = null;
>> +        jQuery.iResize.notify();
>>          },
>>          getWidth: function(dx, side)
>>          {
>> @@ -208,6 +210,9 @@
>>                                                  }
>>                                          }
>>                                  }
>> +                if (options.notify && typeof(options.notify) == 
>> "function") {
>> +                    jQuery.iResize.notify = options.notify;
>> +                }
>>                          }
>>                  );
>>          }
>> @@ -216,4 +221,4 @@
>>          {
>>                  Resizeable : jQuery.iResize.build
>>          }
>> -);
>> \ No newline at end of file
>> +);
>>
>>
>> Stephen Woodbridge wrote:
>>> Hi Stefan,
>>>
>>> I have been trying your resize plugin, it is really slick and works great!
>>>
>>> I have a request, does it already have or can you add the ability to 
>>> added a call back at the end of the resize, so other code can be 
>>> notified of the change in size? Like notify below:
>>>
>>> $(document).ready(function(){
>>>      $('#resize_map').Resizeable(
>>>          {
>>>              minHeight: 100,
>>>              maxHeight: 700,
>>>              minWidth: 100,
>>>              maxWidth: 800,
>>>              handlers: {
>>>                  se: '#resize'
>>>              },
>>>              notify: function(){
>>>                  alert("I have been resized");
>>>                  $('#map_tag').Resized(this.sizes);
>>>              }
>>>          }
>>>      );
>>> });
>>>
>>> Maybe there is another way to do this?
>>>
>>> Thanks,
>>>    -Steve
>>>
>>> Stefan Petre wrote:
>>>> Franck, try this http://interface.eyecon.ro/demos/resize_textarea.html
>>>>
>>>> Franck Marcia wrote:
>>>>> 2006/10/21, Stefan Petre <[EMAIL PROTECTED]>:
>>>>>   
>>>>>> I think you can use for textareas, just that you have to move the handle
>>>>>> while the textarea is resized
>>>>>>
>>>>>>     
>>>>> I gave it a try: http://fmarcia.info/jquery/resize
>>>>>
>>>>> Report:
>>>>>
>>>>> There's a odd behavior with FF: after you resized the textarea the
>>>>> first time, it looses 4px in width.
>>>>>
>>>>> Adding a doctype declaration to make it "xhtml 1.0 strict" resolves
>>>>> the problem but the textarea becomes larger than the resizer (?)
>>>>>
>>>>> With IE, when you start to drag the resizer the first time, the
>>>>> textarea's height quickly becomes the min height.
>>>>>
>>>>> Same behavior than FF with the doctype declaration.
>>>>>
>>>>> Franck.
>>>>>
>>>>> _______________________________________________
>>>>> jQuery mailing list
>>>>> [email protected]
>>>>> http://jquery.com/discuss/
>>>>>
>>>>>   
>>>> _______________________________________________
>>>> jQuery mailing list
>>>> [email protected]
>>>> http://jquery.com/discuss/
>>> _______________________________________________
>>> jQuery mailing list
>>> [email protected]
>>> http://jquery.com/discuss/
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
> 
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to