From 5e22950505c7d8d1221bb61c3d9f836013c2fe60 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 3 Sep 2009 02:38:12 +0000 Subject: [PATCH] * Do not allow notes to be resized any smaller than 50x50px. Resolves bug 479. --- webcit/static/wclib.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 4714313a7..ff5d1b0cd 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -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; -- 2.30.2