From 5167363a2dad0c27537d50871ae1ed5207d996fe Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 15 Mar 2010 11:13:22 -0500 Subject: [PATCH] Sync with latest SVG-Edit Loading of configuration data via URL query string. Now no differences, from trunk, in svgcanvas.js or svg-edit.js. --- public/javascripts/page_helper.js | 2 +- .../editor/jgraduate/jquery.jgraduate.js | 4 + public/svg-edit/editor/svg-editor.css | 3 +- public/svg-edit/editor/svg-editor.html | 2 + public/svg-edit/editor/svg-editor.js | 5376 +++++++++-------- public/svg-edit/editor/svgcanvas.js | 39 +- 6 files changed, 2749 insertions(+), 2677 deletions(-) diff --git a/public/javascripts/page_helper.js b/public/javascripts/page_helper.js index 658194c1..3362199c 100644 --- a/public/javascripts/page_helper.js +++ b/public/javascripts/page_helper.js @@ -82,7 +82,7 @@ function setupSVGedit(path){ f.insert({top: SVGeditButton}); SVGeditButton.disabled = true; Event.observe(SVGeditButton, 'click', function(){ - var editor = window.open(path, 'Edit SVG graphic', 'status=1,resizable=1,scrollbars=1'); + var editor = window.open(path + "?initStroke[width]=2", 'Edit SVG graphic', 'status=1,resizable=1,scrollbars=1'); editor.addEventListener("load", function() { editor.svgEditor.setCustomHandlers({ 'save': function(window,svg){ diff --git a/public/svg-edit/editor/jgraduate/jquery.jgraduate.js b/public/svg-edit/editor/jgraduate/jquery.jgraduate.js index 137919be..7518af5c 100644 --- a/public/svg-edit/editor/jgraduate/jquery.jgraduate.js +++ b/public/svg-edit/editor/jgraduate/jquery.jgraduate.js @@ -46,6 +46,9 @@ $.jGraduate.Paint({hex: "#rrggbb", linearGradient: o}) -> throws an exception? * */ + +(function() { + var ns = { svg: 'http://www.w3.org/2000/svg', xlink: 'http://www.w3.org/1999/xlink' }; if(!window.console) { window.console = new function() { @@ -1083,3 +1086,4 @@ jQuery.fn.jGraduate = $this.show(); }); }; +})(); \ No newline at end of file diff --git a/public/svg-edit/editor/svg-editor.css b/public/svg-edit/editor/svg-editor.css index 66188dbf..aef70ea7 100644 --- a/public/svg-edit/editor/svg-editor.css +++ b/public/svg-edit/editor/svg-editor.css @@ -674,7 +674,7 @@ span.zoom_tool { } #svg_editor #tools_bottom_2 { - width: 204px; + width: 215px; position: relative; float: left; } @@ -706,6 +706,7 @@ span.zoom_tool { -moz-border-radius-bottomleft: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-bottom-left-radius: 4px; + padding-right: 0; } .color_tool > *:last-child { diff --git a/public/svg-edit/editor/svg-editor.html b/public/svg-edit/editor/svg-editor.html index bc1d7b95..e06e430a 100644 --- a/public/svg-edit/editor/svg-editor.html +++ b/public/svg-edit/editor/svg-editor.html @@ -14,6 +14,7 @@ + @@ -28,6 +29,7 @@