From 686e9cb12978d559130f816e5c2d2854a13c2f48 Mon Sep 17 00:00:00 2001 From: wente <329538422@qq.com> Date: 星期三, 22 五月 2024 08:43:31 +0800 Subject: [PATCH] svgEditor --- web/public/SVGOrigin/Method-Draw-master/editor/src/method-draw.js | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/method-draw.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/method-draw.js index fb74c2d..2516a67 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/method-draw.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/method-draw.js @@ -29,7 +29,7 @@ var is_ready = false; curConfig = { canvas_expansion: 1, - dimensions: [580,400], + dimensions: [200,200], initFill: {color: 'fff', opacity: 1}, initStroke: {width: 1.5, color: '000', opacity: 1}, initOpacity: 1, @@ -83,7 +83,7 @@ "noteTheseIssues": "Also note the following issues: ", "unsavedChanges": "There are unsaved changes.", "enterNewLinkURL": "Enter the new hyperlink URL", - "errorLoadingSVG": "Error: Unable to load SVG data", + "errorLoadingSVG": "閿欒: 鏃犳硶璇诲彇SVG鏁版嵁", "URLloadFail": "Unable to load from URL", "retrieving": 'Retrieving "%s" ...' } @@ -4046,8 +4046,10 @@ is_ready = true; var data = window.parent.document.getElementById("svgContentId").value svgCanvas.clear() - window.methodDraw.loadSvgString(data) - window.methodDraw.updateCanvas() + if(data){ + window.methodDraw.loadSvgString(data) + window.methodDraw.updateCanvas() + } // alert(data+'inputValue') }; -- Gitblit v1.9.1