Make aircraft info panel draggable

This commit is contained in:
Carlos Salaverria 2016-08-31 15:45:29 -05:00
parent 6934b8899a
commit bf1d1280ec
3 changed files with 63 additions and 59 deletions

View file

@ -50,7 +50,6 @@
<div id="map_canvas"></div> <div id="map_canvas"></div>
<a id="toggle_sidebar_button" class="hide_sidebar" href="#"></a> <a id="toggle_sidebar_button" class="hide_sidebar" href="#"></a>
<a id="expand_sidebar_button" href="#"></a> <a id="expand_sidebar_button" href="#"></a>
</div>
<div id="selected_infoblock" class="hidden"> <div id="selected_infoblock" class="hidden">
<table style="width: 100%"> <table style="width: 100%">
<tr class="infoblock_heading"> <tr class="infoblock_heading">
@ -110,6 +109,7 @@
</tr> </tr>
</table> </table>
</div> <!-- selected_infoblock --> </div> <!-- selected_infoblock -->
</div>
<div id="sidebar_container"> <div id="sidebar_container">
<div id="splitter" class="ui-resizable-handle ui-resizable-w"></div> <div id="splitter" class="ui-resizable-handle ui-resizable-w"></div>
<div id="sidebar_canvas"> <div id="sidebar_canvas">

View file

@ -216,6 +216,9 @@ function initialize() {
// Set up map/sidebar splitter // Set up map/sidebar splitter
$("#sidebar_container").resizable({handles: {w: '#splitter'}}); $("#sidebar_container").resizable({handles: {w: '#splitter'}});
// Set up aircraft information panel
$("#selected_infoblock").draggable({containment: "parent"});
// Set up event handlers for buttons // Set up event handlers for buttons
$("#toggle_sidebar_button").click(toggleSidebarVisibility); $("#toggle_sidebar_button").click(toggleSidebarVisibility);
$("#expand_sidebar_button").click(expandSidebar); $("#expand_sidebar_button").click(expandSidebar);

View file

@ -16,6 +16,7 @@ html, body {
padding: 20px; padding: 20px;
background: #ffffff; background: #ffffff;
box-shadow: 4px 4px 10px #444444; box-shadow: 4px 4px 10px #444444;
cursor: pointer;
} }
#map_container { #map_container {