Skip to content

Commit

Permalink
Move pop-up a little left so that it doesn't cover big maps as much,
Browse files Browse the repository at this point in the history
and disable moving the layout when the screen is wide enough.
  • Loading branch information
GeorgeXing committed Jul 15, 2018
1 parent c38d4aa commit c2b8335
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/therapist.js
Expand Up @@ -1097,7 +1097,7 @@ function initialize_toolbar() {

var button_toolbar = $('<div>').attr('id',"mt_left_bar").css({
'position' : 'absolute',
'left' : '20px',
'left' : '5px',
'width' : toolbar_width,
'z-index' : '41',
'text-align' : 'center',
Expand Down Expand Up @@ -1134,7 +1134,12 @@ function initialize_toolbar() {
setTimeout(bind_block_events, new_map_timeout); // this is apparently not enough...
} else {
bind_block_events();
$('#difficulties').parent().css('margin-left', toolbar_width + 'px');
$('#difficulties').parent().addClass('pathery-assist-wrapper');
var wrapper_style = document.createElement('style');
wrapper_style.textContent = '@media screen and (max-width: ' + (toolbar_width*2 + 980) +
'px) { .pathery-assist-wrapper { margin-left:' + toolbar_width + 'px; }}';
document.head.appendChild(wrapper_style);
// $('#difficulties').parent().css('margin-left', toolbar_width + 'px');
//$('#difficulties').parent().prepend(button_toolbar);
$('#difficulties').after(button_toolbar);
}
Expand Down

0 comments on commit c2b8335

Please sign in to comment.