slightly transparent control panel

This commit is contained in:
MaxRobinsonTheGreat
2020-07-23 22:53:28 -06:00
parent b2f18ee240
commit 22e39b22ee
4 changed files with 11 additions and 7 deletions

View File

@@ -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;

View File

@@ -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');