From 8f904c05ddaec1af2639d23700030b97bcb7366a Mon Sep 17 00:00:00 2001 From: Ian Newborn Date: Thu, 10 Mar 2016 16:08:08 +0000 Subject: [PATCH 1/2] Prevented Editor opening image browser if not in image mode --- editor/svg-editor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index edf1ceac..c9aa8278 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -1563,7 +1563,7 @@ TODOS $('#blur_slider').slider('option', 'value', blurval); if (svgCanvas.addedNew) { - if (elname === 'image') { + if (elname === 'image' && svgCanvas.getMode() === 'image') { // Prompt for URL if not a data URL if (svgCanvas.getHref(elem).indexOf('data:') !== 0) { promptImgURL(); @@ -1708,7 +1708,8 @@ TODOS }, 100); } } // text - else if (el_name == 'image') { + else if (el_name == 'image' && svgCanvas.getMode() == 'image') { + debugger; setImageURL(svgCanvas.getHref(elem)); } // image else if (el_name === 'g' || el_name === 'use') { From 0c035f8aa236f0c28b8d861c39633c2cb16c22cf Mon Sep 17 00:00:00 2001 From: Ian Newborn Date: Fri, 11 Mar 2016 15:08:41 +0000 Subject: [PATCH 2/2] Removed debugger; --- editor/svg-editor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index c9aa8278..071a13e8 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -1709,7 +1709,6 @@ TODOS } } // text else if (el_name == 'image' && svgCanvas.getMode() == 'image') { - debugger; setImageURL(svgCanvas.getHref(elem)); } // image else if (el_name === 'g' || el_name === 'use') {