jQuery Forum

Hi,

I'm extending the dialog to have more funcionalities but i need to disable resize and drag when it's minimized. I though i could override the method "resize" and "drag" but i can't find how.

I attached the file, but my doubt is:

I have i variable which stores the state of the dialog (eg, if it's minimized or maximized) and i'd like to check it overriding methods for resize and drag, if it isn't minimized, i'd call the default method.

how to disable resize and drag only when it's minimized? 
Any opinion about this override?
is there another way?

Thanks,
Carlos
Attachments
Status

Answered

  • No status
  • Working on it
  • Answered
  • Need more info
  1 user has this question 
Try setting draggable to false and resizable to false. If it doesn't work to do that, it should be considered a bug.
Hi Richard,

I won't do this at dialog start (eg: dialog({resizable:false}) because i want to be able to resize unless the dialog is minimized.

I tried to set minimize and draggable to false, during my minimize method:
this.uiDialog.data("resizable", false);
this.options.resizable  = false;

But no effect. Am I doing wrong?

Thanks,
Carlos

use _setOption("resizable", false) so that you get the side effect
no, no effect. once it starts as resizable i can't stop it :(

And i checked this function you said, but it only sets the value in this.option[key] = value. I tried this option, but no effect either.

I can stop the resizable using this:
  1. this.uiDialog.data("resizable", false);
But then the ui dialog isn't resizable, although the mouse changes to resize mouse icon and i got a lot of erros like :

  1. g is undefined

Any ideia, to turn off this feature after it started?

http://carvalhar.com
It also does

  1. var isResizable = uiDialog.is(':data(resizable)'),

and
  1. case "resizable":
  2.     // currently resizable, becoming non-resizable
  3.     (isResizable && !value && uiDialog.resizable('destroy'));
  4.     // currently resizable, changing handles
  5.     (isResizable && typeof value == 'string' &&
  6.         uiDialog.resizable('option', 'handles', value));
  7.     // currently non-resizable, becoming resizable
  8.     (isResizable || (value !== false && self._makeResizable(value)));
  9.     break;

 Back
 Top
Post Actions
Statistics
  • 7
     Replies
  • 236
     Views
  • 0
     Followers
Tags for the post

Edit Link Delete Link

Edit Link Delete Link

LoadingImage