slightly transparent control panel
This commit is contained in:
@@ -41,8 +41,7 @@ class EnvironmentController extends CanvasController{
|
||||
}
|
||||
|
||||
updateMouseLocation(offsetX, offsetY){
|
||||
this.prev_x = this.mouse_x;
|
||||
this.prev_y = this.mouse_y;
|
||||
|
||||
super.updateMouseLocation(offsetX, offsetY);
|
||||
}
|
||||
|
||||
@@ -105,8 +104,10 @@ class EnvironmentController extends CanvasController{
|
||||
case Modes.Drag:
|
||||
var cur_top = parseInt($('#env-canvas').css('top'), 10);
|
||||
var cur_left = parseInt($('#env-canvas').css('left'), 10);
|
||||
var new_top = (cur_top + (this.mouse_y - this.prev_y)*this.scale);
|
||||
var new_left = (cur_left + (this.mouse_x - this.prev_x)*this.scale);
|
||||
var new_top = cur_top + ((this.mouse_y - this.prev_y)/this.scale);
|
||||
var new_left = cur_left + ((this.mouse_x - this.prev_x)/this.scale);
|
||||
this.prev_x = this.mouse_x;
|
||||
this.prev_y = this.mouse_y;
|
||||
$('#env-canvas').css('top', new_top+'px');
|
||||
$('#env-canvas').css('left', new_left+'px');
|
||||
break;
|
||||
|
||||
@@ -4,7 +4,6 @@ import Engine from './Engine';
|
||||
|
||||
$('document').ready(function(){
|
||||
let isMobile = mobileCheck();
|
||||
console.log(isMobile)
|
||||
if (isMobile) {
|
||||
alert("Though the simulation still works on mobile, most features are disabled. Try it on desktop for the full experience!");
|
||||
$('.control-panel').css('display', 'none');
|
||||
|
||||
Reference in New Issue
Block a user