MCPcopy
hub / github.com/methodofaction/Method-Draw / saveSourceEditor

Function saveSourceEditor

src/js/method-draw.js:905–924  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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);

Callers 1

method-draw.jsFile · 0.85

Calls 3

$Function · 0.85
setSelectModeFunction · 0.85
saveChangesFunction · 0.70

Tested by

no test coverage detected