Prevented Editor opening image browser if not in image mode

master
Ian Newborn 2016-03-10 16:08:08 +00:00
parent bd55ce3bf5
commit 8f904c05dd
1 changed files with 3 additions and 2 deletions

View File

@ -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') {