1

I am using jquery-resizable i am stuck with an issue that i dont know min width and height at the time of binding an element for resizing but i know its boundaries when i start resizing

so i want to do something and edit the minWidth and minHeight property of resizable without altering the jquery.ui.resizable.js can i do this from start method of the function, if yes then how to do it?

$("#mainDiv").resizable({
        handles: 's, e',
        maxWidth : 10000,
        maxHeight : 10000,
        start: function(event, ui) {
        wall.min = null;
        wall.max = null;
        wall.minEle = null;
        wall.maxEle = null;
        lastShift = 0;
        var haschildren = ($("#mainDiv").children().size() > 0);
        if(haschildren){
            if(ui.handle == "e"){// check first s or e
                setMinMax(document.getElementById("mainDiv"), true, true);
                addEffected(document.getElementById("mainDiv"), true);
                checkInnerElementWidth(document.getElementById("mainDiv"), true);
            }
            else{
                setMinMax(document.getElementById("mainDiv"), false, true);
                addEffected(document.getElementById("mainDiv"), true);
                checkInnerElementHieght(document.getElementById("mainDiv"), true);
            }
        }
    }
});

at the end of the start i have my boundary conditions there with me

EDIT : also i want a solution for auto scroll its not provided with resizable, the page size is increasing but to an extent only i want it to keep scrolling until user resizes an element

Varun
  • 5,001
  • 12
  • 54
  • 85
  • Wrote my own resize code molded it according to my requirement finally didnt used jquery resizable – Varun Aug 29 '11 at 09:06

1 Answers1

1

I honestly don't see why you'd have to change dimensions. If it's an ajax event or something the parent should auto-update it's width and height as long as they're within the boundaries of the min- and max-height.

Some specificity as to what you're trying to achieve would be nice.

NullDivision
  • 161
  • 1
  • 12
  • actually the requirement is like that i get to know the boundary conditions only when i am about to resize it – Varun Aug 23 '11 at 08:03