diff --git a/bricks/audio.js b/bricks/audio.js index bdb1a46..0000ae0 100644 --- a/bricks/audio.js +++ b/bricks/audio.js @@ -167,11 +167,12 @@ bricks.AudioRecorder = class extends bricks.HBox { } } rec_btn_pressed(){ - bricks.debug(this.rec_btn.url, ':url:', this.start_icon, this.stop_icon); if(this.rec_btn.url == this.start_icon){ + console.log('start recording .......'); this.rec_btn.set_url(this.stop_icon); this.start_recording(); } else { + console.log('stop recording ....'); this.rec_btn.set_url(this.start_icon); this.stop_recording(); } @@ -216,9 +217,6 @@ bricks.AudioRecorder = class extends bricks.HBox { } start_recording(){ this.recordData = null; - if( this.recordData ){ - this.URL.revokeObjectURL(this.recordData.url); - } if (this.mic_opened){ this.rec.start(); this.dispatch('record_started'); diff --git a/bricks/svg.js b/bricks/svg.js index ed550ff..2447420 100644 --- a/bricks/svg.js +++ b/bricks/svg.js @@ -28,6 +28,7 @@ bricks.Svg = class extends bricks.VBox { } } set_url(url){ + this.url = url; fetch(url) .then(response => response.text()) .then(svgText => { diff --git a/bricks/tree.js b/bricks/tree.js index 7c808fa..75cf340 100644 --- a/bricks/tree.js +++ b/bricks/tree.js @@ -115,7 +115,7 @@ bricks.TreeNode = class extends bricks.VBox { widget.add_widget(this.check_w); this.check_w.bind('changed', this.tree.node_checked.bind(this.tree, this)) } - var icon_url = self.this.icons_urls.leaf; + var icon_url = this.icons_urls.leaf; if (this.is_leaf) icon_url = this.icons_urls.leaf; else if (this.node_state == 'expand') this.icon_url = this.icons_urls.open; else this.icon_url = this.icons_urls.close;