Design improvements
This commit is contained in:
parent
bac46e47ac
commit
d99316aec7
4 changed files with 48 additions and 26 deletions
|
@ -1,6 +1,6 @@
|
|||
var dur = 150
|
||||
var drawerStatus = true
|
||||
var writtenMorse = true
|
||||
var wm = true
|
||||
function drawer(){
|
||||
if(window.innerWidth <= 1400){
|
||||
if(drawerStatus){
|
||||
|
@ -20,7 +20,7 @@ function drawer(){
|
|||
|
||||
function encode(){
|
||||
var input = $('#textarea').val()
|
||||
if(writtenMorse){
|
||||
if(wm){
|
||||
$("#output").text("The normal morse engine is not ported jet.")
|
||||
} else {
|
||||
//TODO port the normal morse decode engine
|
||||
|
@ -31,7 +31,7 @@ function encode(){
|
|||
|
||||
function decode(){
|
||||
var input = $('#textarea').val()
|
||||
if(writtenMorse){
|
||||
if(wm){
|
||||
$('#output').text(decodeWrittenMorseManager(input))
|
||||
} else {
|
||||
//TODO port the normal morse decode engine
|
||||
|
@ -41,12 +41,16 @@ function decode(){
|
|||
}
|
||||
|
||||
function writtenMorse(){
|
||||
writtenMorse = true
|
||||
wm = true
|
||||
$("#normalMorse").css({"color":"#000000"})
|
||||
$("#writtenMorse").css({"color":"#03a9f4"})
|
||||
drawer()
|
||||
}
|
||||
|
||||
function normalMorse(){
|
||||
writtenMorse = false
|
||||
wm = false
|
||||
$("#normalMorse").css({"color":"#03a9f4"})
|
||||
$("#writtenMorse").css({"color":"#000000"})
|
||||
drawer()
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue