@@ -25,6 +25,7 @@ function CodeKeyframes(args){
2525 <textarea name="code" id="code" cols="30" rows="10"></textarea>
2626 <div class="controls">
2727 <a href="#" class="render">Export Keyframes</a>
28+ <a href="#" class="close">Close Editor</a>
2829 </div>
2930 </form>
3031 </div>` )
@@ -34,6 +35,7 @@ function CodeKeyframes(args){
3435 this . _codeForm = document . querySelector ( '#ckf-editor .code-form' )
3536 this . _code = document . querySelector ( '#ckf-editor #code' )
3637 this . _renderButton = document . querySelector ( '#ckf-editor .render' )
38+ this . _closeButton = document . querySelector ( '#ckf-editor .close' )
3739
3840 if ( this . label ) {
3941 _label = document . createElement ( 'div' )
@@ -98,6 +100,11 @@ function CodeKeyframes(args){
98100 this . _code . value = JSON . stringify ( keyframes )
99101 }
100102
103+ this . _closeButton . onclick = ( e ) => {
104+ this . _editor . classList . add ( 'closed' )
105+ this . _codeForm . remove ( )
106+ }
107+
101108
102109
103110 document . addEventListener ( 'keydown' , ( e ) => {
@@ -468,10 +475,10 @@ function CodeKeyframes(args){
468475
469476 var waveHeight = 100
470477 if ( ! this . editorOpen ) {
471- waveHeight = 50
478+ waveHeight = 30
472479 }
473480
474- var waveColor = args . waveColor || '#3AEAD2'
481+ var waveColor = args . waveColor || '#3AEAD2'
475482 var progressColor = args . progressColor || '#0c9fa7'
476483
477484 this . wavesurfer = WaveSurfer . create ( {
0 commit comments