From bfe87237887c20c8098e44d21f944684e03dc771 Mon Sep 17 00:00:00 2001 From: jonsowman Date: Mon, 14 Jun 2010 11:07:11 +0100 Subject: [PATCH] Added drag handles, windows snap to edges of screen --- predict/css/pred.css | 11 +++++++++-- predict/images/drag_handle.png | Bin 0 -> 185 bytes predict/index.php | 2 ++ predict/js/pred.js | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 predict/images/drag_handle.png diff --git a/predict/css/pred.css b/predict/css/pred.css index 7f326e0..f36cd5b 100644 --- a/predict/css/pred.css +++ b/predict/css/pred.css @@ -114,7 +114,8 @@ a { text-decoration: underline; color: #333; cursor: pointer; } } #input_form { - height:370px; + max-height:370px; + overflow: auto; width: 400px; padding: 5px; bottom: 0; right: 0; @@ -124,12 +125,18 @@ a { text-decoration: underline; color: #333; cursor: pointer; } position: absolute; top: 25px; right: 0px; - border-right: none; width: 400px; text-align:center; padding: 10px; } +img.handle { + position: relative; + float:left; + top:0px; + left:0px; + z-index:100; +} td.right-td { text-align: right; diff --git a/predict/images/drag_handle.png b/predict/images/drag_handle.png new file mode 100644 index 0000000000000000000000000000000000000000..6ba896811dd3976e24fbc8f329baaf799e170383 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`4W2HJAr-fh6Ati8NoX*b1~6xN zTs^^fwWH6n!?Z!L5f^drH6c)Zr^(L1$S-+8M7VH9jhF*gD0d gFm6Fqo(j-u3ops=J0DE00J??2)78&qol`;+0Lq{{VE_OC literal 0 HcmV?d00001 diff --git a/predict/index.php b/predict/index.php index ec81629..1123732 100644 --- a/predict/index.php +++ b/predict/index.php @@ -69,6 +69,7 @@ var clickMarker;
+

Scenario Information

Current mouse position: Lat: ? @@ -115,6 +116,7 @@ No guarantee is given for the accuracy, precision or reliability of the data pro
+
diff --git a/predict/js/pred.js b/predict/js/pred.js index 05c9605..790141c 100644 --- a/predict/js/pred.js +++ b/predict/js/pred.js @@ -25,7 +25,8 @@ $(document).ready(function() { populateLaunchSite(); setupEventHandlers(); // make launch card draggable - $("#input_form").draggable({containment: '#map_canvas'}); + $("#input_form").draggable({containment: '#map_canvas', handle: 'img.handle', snap: '#map_canvas'}); + $("#scenario_info").draggable({containment: '#map_canvas', handle: 'img.handle', snap: '#map_canvas'}); // see if we want an old prediction displayed if ( current_uuid != '0' ) {