From 0ac0ab505cb58d1d82efa8b83d3d4b11fb7d231f Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Fri, 17 Sep 2010 17:58:18 +0000 Subject: [PATCH] Enabled preview_url for SVGs when given git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1728 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/extensions/ext-imagelib.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/editor/extensions/ext-imagelib.js b/editor/extensions/ext-imagelib.js index f151238e..80f1b5e5 100644 --- a/editor/extensions/ext-imagelib.js +++ b/editor/extensions/ext-imagelib.js @@ -157,7 +157,7 @@ svgEditor.addExtension("imagelib", function() { var cur_meta = pending[id]; if(svg_str) { if(cur_meta && cur_meta.name) { - title = cur_meta.name; + var title = cur_meta.name; } else { // Try to find a title var xml = new DOMParser().parseFromString(response, 'text/xml').documentElement; @@ -166,7 +166,11 @@ svgEditor.addExtension("imagelib", function() { if(cur_meta) { preview.children().each(function() { if($(this).data('id') == id) { - $(this).text(title); + if(cur_meta.preview_url) { + $(this).html('' + title); + } else { + $(this).text(title); + } } }); } else {