Canvas is no longer hidden by the commander

This commit is contained in:
Devine Lu Linvega 2019-07-15 17:32:56 +09:00
parent ea0d4c3b4a
commit 994b97f58f
2 changed files with 10 additions and 8 deletions

View File

@ -7,7 +7,9 @@ body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_regular
#ronin #wrapper #commander { z-index: 9000; position: relative; width: 300px; height: calc(100vh - 60px); border-right: 1px solid #333; -webkit-app-region: no-drag; padding-right: 30px; transition: margin-left 250ms;} #ronin #wrapper #commander { z-index: 9000; position: relative; width: 300px; height: calc(100vh - 60px); border-right: 1px solid #333; -webkit-app-region: no-drag; padding-right: 30px; transition: margin-left 250ms;}
#ronin #wrapper #commander textarea { background: none; width: 100%; height: calc(100vh - 80px); resize: none; font-size: 12px;line-height: 15px; padding-right: 15px} #ronin #wrapper #commander textarea { background: none; width: 100%; height: calc(100vh - 80px); resize: none; font-size: 12px;line-height: 15px; padding-right: 15px}
#ronin #wrapper #commander div#status { position: absolute; bottom: 0px; } #ronin #wrapper #commander div#status { position: absolute; bottom: 0px; }
#ronin #wrapper #commander.hidden { margin-left:-331px; } #ronin.hidden #wrapper #commander { margin-left:-331px; }
#ronin canvas#surface,#ronin canvas#guide { position: absolute; right:0px; top:0px; -webkit-user-select: none;-webkit-app-region: no-drag; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='10' cy='10' r='1' fill='%23555'></circle></svg>"); background-size: 10px 10px; background-position: -4px -4px; width:100%; height:100%;} #ronin canvas#surface,#ronin canvas#guide { position: absolute; top:0px; -webkit-user-select: none;-webkit-app-region: no-drag; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='10' cy='10' r='1' fill='%23555'></circle></svg>"); background-size: 10px 10px; background-position: -4px -4px; width:100%; height:100%; left:340px; transition: left 250ms}
#ronin canvas#guide { background:none; } #ronin canvas#guide { background:none; }
#ronin.hidden canvas#surface, #ronin.hidden canvas#guide { left:0px; }

View File

@ -145,19 +145,19 @@ function Commander (ronin) {
// Display // Display
this.show = function () { this.show = function () {
if (this.el.className !== '') { if (ronin.el.className !== '') {
this.el.className = '' ronin.el.className = ''
} }
} }
this.hide = function () { this.hide = function () {
if (this.el.className !== 'hidden') { if (ronin.el.className !== 'hidden') {
this.el.className = 'hidden' ronin.el.className = 'hidden'
} }
} }
this.toggle = function () { this.toggle = function () {
if (this.el.className === 'hidden') { if (ronin.el.className === 'hidden') {
this.show() this.show()
} else { } else {
this.hide() this.hide()