// resizeImageContainer()
//
resizeImageContainer: function(imgWidth, imgHeight) {
- Roo.log(imgWidth);
+
// make sure we have some sensible sizes..
imgWidth = Math.max(50, imgWidth);
imgHeight = Math.max(50, imgHeight);
ww -= 150;
wh -= 150;
+
// get new width and height
var bs = this.borderSize * 2;
var widthNew = imgWidth + bs;
var heightNew = imgHeight + bs;
-
+ Roo.log(widthNew);
if (widthNew > ww || heightNew > wh) {
// bigger than window.
// scale here... - bit nasty..