diff --git a/src/js/app.js b/src/js/app.js index 6add4dd..9eba4aa 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -241,6 +241,11 @@ module.exports = new Vue({ if(this.config.motors[2]['axis'] == 'Y') return false; return true; }, + + enable_rotary: function() { + if(this.config.motors[2]['axis'] == 'Y' || this.config.motors[2]['axis'] == 'A') return true; + return false; + } }, ready: function() { diff --git a/src/pug/index.pug b/src/pug/index.pug index ed70877..9606f0a 100644 --- a/src/pug/index.pug +++ b/src/pug/index.pug @@ -92,7 +92,7 @@ html(lang="en") .whitespace div - button.rotary-button(:class="is_rotary_active && 'active'", @click="toggle_rotary") + button.rotary-button(:disabled="!enable_rotary", :class="is_rotary_active && 'active'", @click="toggle_rotary") img(src="/images/rotary.svg", alt="rotary", style="width:90%;") .video(title="Plug camera into USB.\n" + diff --git a/src/stylus/style.styl b/src/stylus/style.styl index d94aecf..b4aa9b0 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -110,7 +110,16 @@ tt &.active border 1px solid #54ed54 - fill #ccffcb !important + background #ccffcb + + &:focus + outline none + box-shadow none + + &.disabled + opacity 0.5 + background #e0e0e0 + cursor not-allowed .video position relative