()
| 903 | }; |
| 904 | |
| 905 | var saveSourceEditor = function(){ |
| 906 | if (!editingsource) return; |
| 907 | |
| 908 | var saveChanges = function() { |
| 909 | svgCanvas.clearSelection(); |
| 910 | hideSourceEditor(); |
| 911 | zoomImage(); |
| 912 | prepPaints(); |
| 913 | } |
| 914 | |
| 915 | if (!svgCanvas.setSvgString($('#svg_source_textarea').val())) { |
| 916 | $.confirm("There were parsing errors in your SVG source.\nRevert back to original SVG source?", function(ok) { |
| 917 | if(!ok) return false; |
| 918 | saveChanges(); |
| 919 | }); |
| 920 | } else { |
| 921 | saveChanges(); |
| 922 | } |
| 923 | setSelectMode(); |
| 924 | }; |
| 925 | |
| 926 | function setBackground(color, url) { |
| 927 | $.pref('bkgd_color', color); |
no test coverage detected