* Do not allow notes to be resized any smaller than 50x50px. Resolves bug 479.
authorArt Cancro <ajc@citadel.org>
Thu, 3 Sep 2009 02:38:12 +0000 (02:38 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 3 Sep 2009 02:38:12 +0000 (02:38 +0000)
webcit/static/wclib.js

index 4714313a754b3141424a445e6b0c2b2b42ae19a2..ff5d1b0cdada42c58dc250b6c262b203ee04594d 100644 (file)
@@ -509,8 +509,14 @@ function NotesResizeMouseMove(evt) {
        divTop = parseInt(d.style.height);
        divLeft = parseInt(d.style.width);
 
-       d.style.height = (divTop + y_increment) + 'px';
-       d.style.width = (divLeft + x_increment) + 'px';
+       newHeight = divTop + y_increment;
+       if (newHeight < 50) newHeight = 50;
+
+       newWidth = divLeft + x_increment;
+       if (newWidth < 50) newWidth = 50;
+
+       d.style.height = newHeight + 'px';
+       d.style.width = newWidth + 'px';
 
        saved_x = x;
        saved_y = y;