From 3cdcf52f700c2ca603f77ad536442e5dd33be852 Mon Sep 17 00:00:00 2001 From: Georg Fischer Date: Mon, 16 Dec 2013 15:37:38 +0100 Subject: [PATCH 1/2] fix a download file name bug --- scripts/src/export-button.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/src/export-button.js b/scripts/src/export-button.js index 69ff968..92854be 100644 --- a/scripts/src/export-button.js +++ b/scripts/src/export-button.js @@ -10,6 +10,7 @@ define( var download_file_name; var file_suffix = '.png'; var file_suffix_regex = /(\.)(jpg|jpeg|png|gif|bmp)/ig; + var parameters; function init( shared ) { @@ -24,6 +25,8 @@ define( png_link.addEventListener( 'click', hidePNGLink, false ); signals['load-file'].add( updateFileName ); + signals['load-file'].add( updateDownloadFileName ); + signals['control-updated'].add( updateParameters ); signals['control-updated'].add( updateDownloadFileName ); } @@ -45,9 +48,14 @@ define( } } - function updateDownloadFileName( options ) + function updateParameters( new_parameters ) { - download_file_name = file_name + '-glitched-' + objToString( options ) + file_suffix; + parameters = new_parameters || parameters; + } + + function updateDownloadFileName() + { + download_file_name = file_name + '-glitched-' + objToString( parameters ) + file_suffix; } function updatePNGLinkAddress( data_url ) From 320950bacb8856ed61c87c27ca0c777a1fb04ef5 Mon Sep 17 00:00:00 2001 From: Georg Fischer Date: Mon, 16 Dec 2013 15:42:19 +0100 Subject: [PATCH 2/2] fix intro closed intro position --- scripts/src/intro.js | 7 +++++++ styles/main.css | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/src/intro.js b/scripts/src/intro.js index 1d0426e..525b448 100644 --- a/scripts/src/intro.js +++ b/scripts/src/intro.js @@ -33,6 +33,7 @@ define( { button.classList.add( 'is-active' ); element.classList.add( 'is-active' ); + element.style.top = '0'; is_open = true; } @@ -40,9 +41,15 @@ define( { button.classList.remove( 'is-active' ); element.classList.remove( 'is-active' ); + element.style.top = -getHeight() + 'px'; is_open = false; } + function getHeight() + { + return element.clientHeight; + } + return { init: init }; } ); \ No newline at end of file diff --git a/styles/main.css b/styles/main.css index 2488c28..2314169 100644 --- a/styles/main.css +++ b/styles/main.css @@ -106,8 +106,8 @@ a:hover { top: -100%; background-color: #fff; background-color: rgba(255,255,255, 0.9); - -webkit-transition: all 0.5s ease-in; - transition: all 0.5s ease-in; + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; } .intro.is-active {