From 7ec9326ce00d08f9d957981f2edff6df26f24a28 Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期四, 26 九月 2024 13:25:02 +0800 Subject: [PATCH] 修改 --- web/public/SVGOrigin/Method-Draw-master/editor/lib/canvg/canvg.js | 944 ++-- web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/build/tools/closure-compiler.jar | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/arrow.json | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/method-draw.compiled.css | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/dialog_balloon.json | 2 web/public/SVGOrigin/Method-Draw-master/editor/src/sanitize.js | 28 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/test/contextmenu_test.html | 44 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsA.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/shadowsintolight-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/test/history_test.html | 46 web/public/SVGOrigin/Method-Draw-master/editor/src/history.js | 46 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-bold-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/docs/index/Files.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/dialog_balloon.json | 2 web/public/评定数据导入模板.xlsx | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.custom.min.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/social.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-bottom.svg | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/foreignobject-icons.xml | 6 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-connector.js | 158 web/src/views/modules/basicInfo/XhProductModel.vue | 5 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/ui.json | 2 web/public/SVGOrigin/Method-Draw-master/docs/files/svgcanvas-js.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-connector.js | 158 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/flowchart.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/browser.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/icons/jquery.svgicons.js | 108 web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jPicker.css | 18 web/public/SVGOrigin/Method-Draw-master/editor/extensions/filesave.php | 8 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/ui.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jPicker.css | 18 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java | 58 web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.min.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/images/italic.svg | 12 web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/index.html | 6 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jgraduate.css | 12 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/music.json | 2 web/public/SVGOrigin/Method-Draw-master/editor/images/align-top.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/extensions/grid-icon.xml | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/README | 3 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-blackitalic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/helloworld-icon.xml | 6 web/src/views/modules/basicInfo/ProductModelTree.vue | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/closepath_icons.svg | 2 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralR.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/mousewheel.js | 20 web/src/views/modules/taskReliability/Task.vue | 8 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/editor/src/dragupload.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-foreignobject.js | 48 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/grid-icon.xml | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.js | 38 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/index.html | 76 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/nature.json | 10 web/public/SVGOrigin/Method-Draw-master/test/units_test.html | 14 web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-left.svg | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.html | 16 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsS.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-closepath.js | 8 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bold-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael_1.json | 2 web/public/SVGOrigin/Method-Draw-master/test/path_test.html | 8 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralC.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/images/svg_edit_icons.svgz | 0 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ReliabilityAssessService.java | 1 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralL.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/dialog.js | 22 web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgcanvas.js | 1718 ++++---- web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-regular-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/images/align-center.svg | 12 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsR.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-draginput.js | 36 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/object.json | 8 web/public/SVGOrigin/Method-Draw-master/docs/index.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jgraduate.css | 12 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/docs/search/NoResults.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.xml | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/social.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.xml | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js | 18 web/public/SVGOrigin/Method-Draw-master/editor/images/eye.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/src/select.js | 40 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/filesave.php | 8 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/sanitize.js | 28 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-closepath.js | 8 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/eyedropper-icon.xml | 4 web/public/SVGOrigin/Method-Draw-master/editor/src/math.js | 40 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-light-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/test/all_tests.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js | 20 web/public/SVGOrigin/Method-Draw-master/method-draw/images/svg_edit_icons.svgz | 0 web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js | 18 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.js | 78 web/public/SVGOrigin/Method-Draw-master/docs/index/General.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/images/eye.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.css | 80 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/LICENSE | 202 - web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-black-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralS.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/editor/images/align-bottom.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/icons/jquery.svgicons.js | 108 web/public/SVGOrigin/Method-Draw-master/editor/images/align-middle.svg | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/markers-icons.xml | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu.js | 8 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/weather.json | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/flowchart.json | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_opensave.js | 62 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/taphold.js | 20 web/public/SVGOrigin/Method-Draw-master/docs/javascript/searchdata.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.js | 298 web/public/SVGOrigin/Method-Draw-master/editor/embedapi.html | 18 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-foreignobject.js | 48 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-grid.js | 32 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-italic-webfont.woff | 0 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/TestScheme/service/TestSchemeService.java | 2 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralG.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralM.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-regular-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/symbol.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu/jquery.contextMenu.js | 52 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js | 2 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralA.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/src/method-draw.js | 106 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/weather.json | 4 web/public/SVGOrigin/Method-Draw-master/editor/src/embedapi.js | 20 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/README.md | 8 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/shadowsintolight-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-helloworld.js | 38 web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-draginput.js | 36 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/lib/mousewheel.js | 20 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jpicker.min.js | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-italic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-italic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/src/svgcanvas.js | 2 web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.custom.min.js | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/pathseg.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-middle.svg | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/requestanimationframe.js | 8 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/src/browser.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgtransformlist.js | 26 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralO.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/helloworld-icon.xml | 6 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/object.json | 8 web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/README.md | 8 web/public/SVGOrigin/Method-Draw-master/build/tools/ship.py | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/euphoriascript-regular-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/images/polygon.svg | 12 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java | 13 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralD.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/src/dialog.js | 22 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/closepath_icons.svg | 2 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java | 3 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/editor/images/italic.svg | 12 web/public/SVGOrigin/Method-Draw-master/.gitignore | 2 web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jpicker.min.js | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bolditalic-webfont.woff | 0 web/src/views/modules/taskReliability/PlanMake.vue | 8 web/public/SVGOrigin/Method-Draw-master/editor/extensions/eyedropper-icon.xml | 4 web/public/SVGOrigin/Method-Draw-master/editor/extensions/markers-icons.xml | 2 web/public/SVGOrigin/Method-Draw-master/editor/src/select.js | 40 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-grid.js | 32 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/music.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.woff | 0 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TimeDiagram.java | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.min.js | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.xml | 2 web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.css | 8 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/arrow.json | 4 web/public/SVGOrigin/Method-Draw-master/editor/src/draw.js | 32 web/public/SVGOrigin/Method-Draw-master/test/draw_test.html | 122 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael.txt | 2 web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu.js | 8 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-italic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/src/history.js | 46 web/public/SVGOrigin/Method-Draw-master/method-draw/src/method-draw.js | 1156 +++--- web/public/产品结构树导入模板.xlsx | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_moinsave.js | 6 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/images/conn.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/filesaver.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/math.js | 40 web/public/SVGOrigin/Method-Draw-master/method-draw/css/fonts.css | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu/jquery.contextMenu.js | 52 web/public/SVGOrigin/Method-Draw-master/editor/css/fonts.css | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.js | 46 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-eyedropper.js | 12 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-regular-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-helloworld.js | 38 web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-right.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/game.json | 2 web/public/SVGOrigin/Method-Draw-master/LICENSE | 19 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsG.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.compiled.css | 2 web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralF.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsM.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-arrows.js | 72 web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.css | 62 web/public/SVGOrigin/Method-Draw-master/method-draw/src/embedapi.js | 20 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsD.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.js | 110 web/public/SVGOrigin/Method-Draw-master/editor/src/svgtransformlist.js | 26 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.xml | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.js | 78 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-arrows.js | 72 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/math.json | 2 web/public/SVGOrigin/Method-Draw-master/editor/images/align-left.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/jquery.hotkeys.min.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/draw.js | 32 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/misc.json | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_opensave.js | 62 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/fileopen.php | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-top.svg | 10 web/public/SVGOrigin/Method-Draw-master/editor/src/path.js | 110 modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.ttf | 0 web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ffsvg.svg | 4 web/public/SVGOrigin/Method-Draw-master/build/tools/yuicompressor-2.4.7.jar | 0 web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/smiley.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/jquery.hotkeys.min.js | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/foreignobject-icons.xml | 6 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/index.html | 6 web/public/SVGOrigin/Method-Draw-master/docs/index/Functions.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/images/polygon.svg | 12 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/smiley.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-blackitalic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/embedapi.html | 18 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/symbol.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgutils.js | 72 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.svg | 4 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bolditalic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/editor/index.html | 897 ++-- web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/math.json | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/images/conn.svg | 2 web/public/SVGOrigin/Method-Draw-master/test/svgutils_test.html | 24 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsO.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-black-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.compiled.css | 2 web/public/SVGOrigin/Method-Draw-master/editor/src/units.js | 20 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-markers.js | 62 web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-center.svg | 12 web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsC.html | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/fileopen.php | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/src/dragupload.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.svg | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/canvg/canvg.js | 944 ++-- web/public/SVGOrigin/Method-Draw-master/test/svgtransformlist_test.html | 96 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ff.svg | 4 web/packages/components/zt-table-wraper/src/zt-table-wraper.vue | 1 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bold-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/src/path.js | 110 web/public/SVGOrigin/Method-Draw-master/editor/images/align-right.svg | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-regular-webfont.woff | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/nature.json | 10 web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquerybbq/jquery.bbq.min.js | 6 web/public/SVGOrigin/Method-Draw-master/test/select_test.html | 14 web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/raphael.txt | 2 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-eyedropper.js | 2 web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.eot | 0 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/game.json | 2 web/public/SVGOrigin/Method-Draw-master/test/math_test.html | 20 web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-markers.js | 62 web/public/SVGOrigin/Method-Draw-master/editor/lib/pathseg.js | 2 web/public/SVGOrigin/Method-Draw-master/editor/lib/requestanimationframe.js | 8 web/public/SVGOrigin/Method-Draw-master/method-draw/src/units.js | 20 web/public/SVGOrigin/Method-Draw-master/docs/search/FilesS.html | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.ttf | 0 web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.js | 144 web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_moinsave.js | 6 web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js | 2 web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/euphoriascript-regular-webfont.woff | 0 312 files changed, 5,243 insertions(+), 5,299 deletions(-) diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/TestScheme/service/TestSchemeService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/TestScheme/service/TestSchemeService.java index abac0ea..e77e792 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/TestScheme/service/TestSchemeService.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/TestScheme/service/TestSchemeService.java @@ -58,7 +58,7 @@ case "涓嶉檺瀹氱敓浜ф柟椋庨櫓鏌ヨ": result = this.getCondition2(dto); break; - case "涓嶉檺瀹氳瀹氬�兼煡璇�": + case "涓嶉檺瀹氭楠屼笂闄愭煡璇�": result = this.getCondition3(dto); break; } diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java index 974d007..ae5e844 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java @@ -183,7 +183,18 @@ public Result delete(@RequestBody Long[] ids) { //鏁堥獙鏁版嵁 AssertUtils.isArrayEmpty(ids, "id"); - xhProductModelService.delete(ids); + for(Long id : ids){ + XhProductModel data = xhProductModelService.get(id); + if (data.getProductType().equals("1")||data.getProductType().equals("3")||data.getProductType().equals("4")){ + + }else if(data.getProductType().equals("2")){ + + }else if(data.getProductType().equals("5")){ + xhProductModelService.delete(ids); + } + } + + return Result.ok(); } diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java index a5093ce..9c37bbf 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java @@ -43,6 +43,9 @@ @ApiModelProperty(value = "杩愯鍥剧墖") private Long operatImg; + @ApiModelProperty(value = "鍚岀被璁惧鍚�") + private String sameSbName; + @TableField(exist = false) @ApiModelProperty(value = "鍥剧墖鍚嶇О") private String operatImgName; diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java index 24cfe80..256e177 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java @@ -194,22 +194,23 @@ String xt = com.zt.core.shiro.ImportUtil.getCellValue(row, 1, pattern); //绯荤粺 String fxt = com.zt.core.shiro.ImportUtil.getCellValue(row, 2, pattern); String sb = com.zt.core.shiro.ImportUtil.getCellValue(row, 3, pattern); //璁惧 - String equipType = com.zt.core.shiro.ImportUtil.getCellValue(row, 4, pattern); //璁惧绫诲瀷 - String reliabDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 5, pattern); //鍙潬鎬у垎甯冪被鍨� - String basicJoinCompute = com.zt.core.shiro.ImportUtil.getCellValue(row, 6, pattern); //鍙傚姞璁$畻 - String basicMtbfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 7, pattern); //mtbf - String basicMtbfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 8, pattern); //鎴愬姛鐜� - String basicMtbfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 9, pattern); //杩愯姣� - String taskMtbcfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 10, pattern); //mtbcf - String taskMtbcfOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 11, pattern); //mtbcf鍏朵粬鍙傛暟2 - String taskMtbcfOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 12, pattern); //mtbcf鍏朵粬鍙傛暟3 - String taskMtbcfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 13, pattern); //mtbcf鎴愬姛鐜� - String taskMtbcfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 14, pattern); //mtbcf杩愯姣� - String repairable = com.zt.core.shiro.ImportUtil.getCellValue(row, 15, pattern); //鏄惁鍙淮淇� - String repairDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 16, pattern); //缁翠慨鍙戝竷绫诲瀷 - String repairMttcr = com.zt.core.shiro.ImportUtil.getCellValue(row, 17, pattern); //mttcr - String repairMttcrOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 18, pattern); //mttcr鍏朵粬鍙傛暟2 - String repairMttcrOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 19, pattern); //mttcr鍏朵粬鍙傛暟3 + String sameSbName = com.zt.core.shiro.ImportUtil.getCellValue(row, 4, pattern); //鍚岀被璁惧鍚嶇О + String equipType = com.zt.core.shiro.ImportUtil.getCellValue(row, 5, pattern); //璁惧绫诲瀷 + String reliabDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 6, pattern); //鍙潬鎬у垎甯冪被鍨� + String basicJoinCompute = com.zt.core.shiro.ImportUtil.getCellValue(row, 7, pattern); //鍙傚姞璁$畻 + String basicMtbfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 8, pattern); //mtbf + String basicMtbfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 9, pattern); //鎴愬姛鐜� + String basicMtbfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 10, pattern); //杩愯姣� + String taskMtbcfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 11, pattern); //mtbcf + String taskMtbcfOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 12, pattern); //mtbcf鍏朵粬鍙傛暟2 + String taskMtbcfOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 13, pattern); //mtbcf鍏朵粬鍙傛暟3 + String taskMtbcfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 14, pattern); //mtbcf鎴愬姛鐜� + String taskMtbcfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 15, pattern); //mtbcf杩愯姣� + String repairable = com.zt.core.shiro.ImportUtil.getCellValue(row, 16, pattern); //鏄惁鍙淮淇� + String repairDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 17, pattern); //缁翠慨鍙戝竷绫诲瀷 + String repairMttcr = com.zt.core.shiro.ImportUtil.getCellValue(row, 18, pattern); //mttcr + String repairMttcrOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 19, pattern); //mttcr鍏朵粬鍙傛暟2 + String repairMttcrOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 20, pattern); //mttcr鍏朵粬鍙傛暟3 if (StringUtils.isBlank(sb)) continue; @@ -252,6 +253,10 @@ } else { curSbId = modelMap.get(sbPath).getId(); paramId = modelMap.get(sbPath).getParamId(); + } + + if(StringUtils.isBlank(sameSbName)){ + sameSbName = sb; } if (StringUtils.isEmpty(sb)) { @@ -303,17 +308,20 @@ paramDataService.insert(itemEntity); } + xhProductModel.setPid(curFxtId == null ? curXtId : curFxtId); + xhProductModel.setId(curSbId); + xhProductModel.setName(sb); + xhProductModel.setSameSbName(sameSbName); + xhProductModel.setEquipType(equipType); + xhProductModel.setProductType("5"); + xhProductModel.setSort(Integer.valueOf(sort)); + defultImg = sysPictureBaseService.getDefaultImg(5).getId(); + xhProductModel.setOperatImg(defultImg); + xhProductModel.setNamePath(sbPath); if (insertSb) { - xhProductModel.setPid(curFxtId == null ? curXtId : curFxtId); - xhProductModel.setId(curSbId); - xhProductModel.setName(sb); - xhProductModel.setEquipType(equipType); - xhProductModel.setProductType("5"); - xhProductModel.setSort(Integer.valueOf(sort)); - defultImg = sysPictureBaseService.getDefaultImg(5).getId(); - xhProductModel.setOperatImg(defultImg); - xhProductModel.setNamePath(sbPath); this.insert(xhProductModel); + }else{ + this.update(xhProductModel); } //瀵煎叆棰勮鍙傛暟 diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TimeDiagram.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TimeDiagram.java index 541d75d..ebeeade 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TimeDiagram.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/TimeDiagram.java @@ -9,7 +9,7 @@ @Data @EqualsAndHashCode(callSuper = false) -@TableName("time_diagram") +@TableName("time_diagram_temp") public class TimeDiagram extends CompanyEntity { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "PROJECT_ID") diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ReliabilityAssessService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ReliabilityAssessService.java index 15eea74..ac513ed 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ReliabilityAssessService.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ReliabilityAssessService.java @@ -147,7 +147,6 @@ } JSONObject xmlJSONObj = XML.toJSONObject(xml); JSONObject jsonObject = xmlJSONObj.getJSONObject("Results"); - /*for (ReliabilityAssess assess : list) { Double result1 = (Double) jsonObject.get(assess.getName()); if (result1 != null) { diff --git a/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml b/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml index 5ad395b..fe82e4a 100644 --- a/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml +++ b/modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml @@ -65,7 +65,7 @@ </select> <select id="getTimeDiagram" resultType="com.zt.life.modules.mainPart.taskReliability.model.TimeDiagram"> select * - from time_diagram + from time_diagram_temp where is_delete = 0 <if test="projectId!=null and projectId!=''"> and PROJECT_ID = #{projectId} diff --git a/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue b/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue index c3c29e3..b50fe38 100644 --- a/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue +++ b/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue @@ -148,6 +148,7 @@ if (res.success) { await this.$tip.success() this._query() + this.$emit('refreshMethod') } } }, diff --git a/web/public/SVGOrigin/Method-Draw-master/.gitignore b/web/public/SVGOrigin/Method-Draw-master/.gitignore index 68cf937..2850315 100644 --- a/web/public/SVGOrigin/Method-Draw-master/.gitignore +++ b/web/public/SVGOrigin/Method-Draw-master/.gitignore @@ -6,4 +6,4 @@ build/svg-edit-2.6.wgt build/svg-edit-2.6.xpi build/svg-edit-2.6.zip -.DS_Store \ No newline at end of file +.DS_Store diff --git a/web/public/SVGOrigin/Method-Draw-master/LICENSE b/web/public/SVGOrigin/Method-Draw-master/LICENSE index ee7d205..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/LICENSE +++ b/web/public/SVGOrigin/Method-Draw-master/LICENSE @@ -1,19 +0,0 @@ -Copyright (c) by Mark MacKay - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/web/public/SVGOrigin/Method-Draw-master/build/tools/closure-compiler.jar b/web/public/SVGOrigin/Method-Draw-master/build/tools/closure-compiler.jar index 4dfa5ad..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/build/tools/closure-compiler.jar +++ b/web/public/SVGOrigin/Method-Draw-master/build/tools/closure-compiler.jar Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/build/tools/ship.py b/web/public/SVGOrigin/Method-Draw-master/build/tools/ship.py index d2c3052..ad81fee 100644 --- a/web/public/SVGOrigin/Method-Draw-master/build/tools/ship.py +++ b/web/public/SVGOrigin/Method-Draw-master/build/tools/ship.py @@ -141,7 +141,7 @@ else: # else append line to the output list out_lines.append(line) i += 1 - + return ''.join(out_lines) if __name__ == '__main__': diff --git a/web/public/SVGOrigin/Method-Draw-master/build/tools/yuicompressor-2.4.7.jar b/web/public/SVGOrigin/Method-Draw-master/build/tools/yuicompressor-2.4.7.jar index 3c9a408..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/build/tools/yuicompressor-2.4.7.jar +++ b/web/public/SVGOrigin/Method-Draw-master/build/tools/yuicompressor-2.4.7.jar Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/files/svgcanvas-js.html b/web/public/SVGOrigin/Method-Draw-master/docs/files/svgcanvas-js.html index 6f1b0b3..ef55297 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/files/svgcanvas-js.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/files/svgcanvas-js.html @@ -423,4 +423,4 @@ <script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/index.html b/web/public/SVGOrigin/Method-Draw-master/docs/index.html index 635c317..a979d7a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/index.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/index.html @@ -1 +1 @@ -<html><head><meta http-equiv="Refresh" CONTENT="0; URL=files/svgcanvas-js.html"></head></html> \ No newline at end of file +<html><head><meta http-equiv="Refresh" CONTENT="0; URL=files/svgcanvas-js.html"></head></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/index/Files.html b/web/public/SVGOrigin/Method-Draw-master/docs/index/Files.html index 9ebbb55..b829399 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/index/Files.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/index/Files.html @@ -34,4 +34,4 @@ <script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/index/Functions.html b/web/public/SVGOrigin/Method-Draw-master/docs/index/Functions.html index 9c282c2..30d7e12 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/index/Functions.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/index/Functions.html @@ -50,4 +50,4 @@ <script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/index/General.html b/web/public/SVGOrigin/Method-Draw-master/docs/index/General.html index 69d5a0b..5257363 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/index/General.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/index/General.html @@ -50,4 +50,4 @@ <script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/javascript/searchdata.js b/web/public/SVGOrigin/Method-Draw-master/docs/javascript/searchdata.js index eac176a..6b1d04b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/javascript/searchdata.js +++ b/web/public/SVGOrigin/Method-Draw-master/docs/javascript/searchdata.js @@ -119,4 +119,4 @@ "Y": false, "Z": false } - } \ No newline at end of file + } diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FilesS.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FilesS.html index 690d961..c96ee01 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FilesS.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FilesS.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsA.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsA.html index de24e1f..257d557 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsA.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsA.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsC.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsC.html index eb4b747..a2646bd 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsC.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsC.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsD.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsD.html index 1c28ffc..16a3b6c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsD.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsD.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsG.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsG.html index c7e504e..ef849cb 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsG.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsG.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsM.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsM.html index fbb3112..3b4d032 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsM.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsM.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsO.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsO.html index 76f92f6..ad0f185 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsO.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsO.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsR.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsR.html index 3153d9d..23b1f50 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsR.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsR.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsS.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsS.html index 13e3338..2d7f325 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsS.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/FunctionsS.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralA.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralA.html index f3ee0f6..bc95a02 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralA.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralA.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralC.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralC.html index eb4b747..a2646bd 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralC.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralC.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralD.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralD.html index 6735300..a47e7e9 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralD.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralD.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralF.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralF.html index 55c21a8..9f113f4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralF.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralF.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralG.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralG.html index c7e504e..ef849cb 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralG.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralG.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralL.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralL.html index 09038de..91c8a6d 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralL.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralL.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralM.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralM.html index fbb3112..3b4d032 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralM.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralM.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralO.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralO.html index 76f92f6..ad0f185 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralO.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralO.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralR.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralR.html index 3153d9d..23b1f50 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralR.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralR.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralS.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralS.html index 1176986..425380e 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralS.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/GeneralS.html @@ -17,4 +17,4 @@ var searchResults = new SearchResults("searchResults", "HTML"); searchResults.Search(); --></script></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/docs/search/NoResults.html b/web/public/SVGOrigin/Method-Draw-master/docs/search/NoResults.html index 02ce888..09ec1cf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/docs/search/NoResults.html +++ b/web/public/SVGOrigin/Method-Draw-master/docs/search/NoResults.html @@ -12,4 +12,4 @@ <div id=Index><div class=SRStatus id=NoMatches>No Matches</div></div><script language=JavaScript><!-- -if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> \ No newline at end of file +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.svg index 55fd0f6..a18fcf2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.svg @@ -142,4 +142,4 @@ <glyph unicode="™" horiz-adv-x="3623" d="M1577 0v172h144v1153h-144v191h480l481 -1309l487 1309h455v-191h-143v-1153h143v-172h-492v172h162v1164l-530 -1336h-170l-537 1339v-1167h156v-172h-492zM41 1116v400h1352v-400h-205v236h-400v-1180h156v-172h-491v172h139v1180h-346v-236h-205z" /> <glyph unicode="" horiz-adv-x="1035" d="M0 1035h1035v-1035h-1035v1035z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.ttf index a82e385..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Arvo-Regular-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.eot index 1b442b2..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.svg index 510798a..df0285a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.svg @@ -130,4 +130,4 @@ <glyph unicode="−" horiz-adv-x="1331" d="M102 496v137h1127v-137h-1127z" /> <glyph unicode="" horiz-adv-x="1125" d="M0 1125h1125v-1125h-1125v1125z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.ttf index 2d49db0..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.woff index f63f813..8aa47c8 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/Junction-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.eot index 08deeb7..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.svg index 7523f75..96d2704 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.svg @@ -232,4 +232,4 @@ <glyph unicode="fi" horiz-adv-x="772" d="M20 934v186h105v31q0 45 1 69.5t7 77t22.5 84t43 67.5t72.5 53.5t108 17.5q33 0 69.5 -4.5t57.5 -8.5l20 -2v-184q-41 12 -110 12q-31 0 -50.5 -18.5t-25.5 -58t-7 -54t-1 -53.5v-29h358v-1120h-207v934h-151v-934h-207v934h-105z" /> <glyph unicode="fl" horiz-adv-x="772" d="M20 934v186h105v31q0 45 1 69.5t7 77t22.5 84t43 67.5t72.5 53.5t108 17.5q33 0 69.5 -4.5t57.5 -8.5l20 -2h164v-1505h-207v1329q-37 4 -67.5 4t-50 -18.5t-25.5 -58t-7 -54t-1 -53.5v-29h104v-186h-104v-934h-207v934h-105z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.ttf index efbe8b4..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.woff index 2e2cda9..58d5ae2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/League_Gothic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bold-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bold-webfont.woff index 403723b..c0f3f42 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bold-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bold-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bolditalic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bolditalic-webfont.woff index b601f26..a5c43e0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bolditalic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-bolditalic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-italic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-italic-webfont.woff index 890b291..dd7a293 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-italic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-italic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-regular-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-regular-webfont.woff index dad6488..31a49d2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-regular-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/arvo-regular-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/euphoriascript-regular-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/euphoriascript-regular-webfont.woff index 57ee337..c0da8d6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/euphoriascript-regular-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/euphoriascript-regular-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.eot index 94f8fae..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.svg index 6bc919a..e9adb68 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.svg @@ -936,4 +936,4 @@ <glyph d="M71 154q0 37 11.5 66.5t32.5 49t35 28.5t34 19q5 3 9.5 4.5t6.5 2.5h2l-2 2q-3 1 -8 4t-11 7q-101 69 -101 158q0 68 49.5 115.5t120.5 47.5q67 0 112.5 -42t45.5 -108q0 -16 -2 -30t-7 -26.5t-9.5 -22.5t-13.5 -20t-14 -16.5t-15.5 -15t-14.5 -12t-15 -11t-12 -8.5 q-9 -7 -9 -8t9 -6q1 -1 17 -9.5t23 -14l22.5 -17t24 -24t19 -29.5t15 -38.5t4.5 -45.5q0 -72 -50 -116t-132 -44q-73 0 -125 45t-52 115zM124 164q0 -63 35 -102.5t93 -39.5q50 0 81.5 39t31.5 92q0 40 -19.5 70.5t-40 45t-59.5 35.5q-22 12 -27 12q-3 0 -33 -21 q-62 -46 -62 -131zM138 507q0 -64 69 -118q34 -26 54 -35l16 -7q3 0 14 10q26 23 49 65t23 78q0 64 -32 100t-83 36q-50 0 -80 -37.5t-30 -91.5z" /> <glyph d="M60 204q0 89 55 141.5t138 52.5q87 0 143.5 -62t56.5 -174q0 -70 -26.5 -130t-68 -99.5t-88.5 -70.5t-91 -47.5t-71.5 -24.5t-34.5 -8q-4 0 -7 9t-3 16q0 2 24 9.5t62 24t79 42t80 71t59 102.5l3 7l3 10.5t0 3.5q-2 0 -20 -12q-54 -33 -125 -33q-77 0 -122.5 47.5 t-45.5 124.5zM125 214q0 -60 35 -105.5t95 -45.5q96 0 126 52q6 11 6 57q0 50 -13 92.5t-43.5 73t-74.5 30.5q-64 0 -97.5 -43.5t-33.5 -110.5z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.ttf index 008d5f9..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.woff index ede3aa2..1aa36e4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.eot index 7cc62dd..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.svg index 816155b..29b08bf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.svg @@ -679,4 +679,4 @@ <glyph horiz-adv-x="415" d="M45 130q0 34 14.5 66t35 54.5t41.5 39.5t35.5 27t14.5 12q0 1 -10.5 10.5t-25 25t-29 35.5t-25 47t-10.5 53q0 71 48 116t124 45q62 0 99.5 -35.5t37.5 -98.5q0 -29 -13.5 -58t-32.5 -49.5t-38.5 -37t-33 -26.5t-13.5 -12q0 -1 11.5 -11.5t28 -28.5t32.5 -40t27.5 -53 t11.5 -61q0 -67 -52.5 -110t-129.5 -43q-68 0 -108 33.5t-40 99.5zM99 145q0 -55 30.5 -89t72.5 -34q48 0 81 35.5t33 82.5q0 22 -11.5 48.5t-27.5 48t-33.5 39.5t-29.5 28.5t-14 10.5q-7 0 -30 -20.5t-47 -62.5t-24 -87zM139 534q0 -36 25.5 -79.5t51 -69.5t30.5 -26 q7 0 30.5 21.5t46.5 62.5t23 82q0 48 -28 80.5t-74 32.5q-48 0 -76.5 -32t-28.5 -72z" /> <glyph horiz-adv-x="437" d="M-6 -185q0 2 32 13q114 40 235 186q20 23 20 32q-2 1 -5 0.5t-12 -4t-12 -4.5q-41 -13 -74 -13q-62 0 -100 45.5t-38 121.5q0 89 62 145.5t146 56.5q70 0 109.5 -52.5t39.5 -138.5q0 -77 -39 -150.5t-101 -125.5q-49 -41 -111.5 -74t-99 -45.5t-43.5 -12.5q-9 0 -9 20z M99 173q0 -55 26.5 -88t79.5 -33q44 0 74 13q25 11 42.5 64t17.5 111q0 61 -25.5 94.5t-66.5 33.5q-66 0 -107 -60.5t-41 -134.5z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.ttf index 8f41cca..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.woff index 53156d2..322e9a0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/fanwood_italic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/shadowsintolight-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/shadowsintolight-webfont.woff index af8e15c..3776cb9 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/shadowsintolight-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/shadowsintolight-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-black-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-black-webfont.woff index 1057727..bfa380a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-black-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-black-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-blackitalic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-blackitalic-webfont.woff index 63080eb..c0efc93 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-blackitalic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-blackitalic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-italic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-italic-webfont.ttf index d469c0c..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-italic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-italic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-regular-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-regular-webfont.woff index 3f8d383..3fbbf03 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-regular-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/font-files/simonetta-regular-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/fonts.css b/web/public/SVGOrigin/Method-Draw-master/editor/css/fonts.css index 1604519..28c4e35 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/fonts.css +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/fonts.css @@ -81,4 +81,4 @@ src: url('font-files/fanwood_italic-webfont.woff') format('woff'); font-weight: normal; font-style: italic; -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.compiled.css b/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.compiled.css index 3f0345d..2063cec 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.compiled.css +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.compiled.css @@ -414,4 +414,4 @@ #stroke_style_label{font-size:30px;margin-top:33px;letter-spacing:-1px} .stroke_tool .caret{top:60%} #tool_align_relative{position:absolute;top:-5px;left:0;right:20px;display:block} -#tool_align_relative select{width:100%;display:block} \ No newline at end of file +#tool_align_relative select{width:100%;display:block} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.css b/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.css index 6eb6e83..1fe726f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.css +++ b/web/public/SVGOrigin/Method-Draw-master/editor/css/method-draw.css @@ -89,7 +89,7 @@ vertical-align: top; } -.touch .menu_title { +.touch .menu_title { padding: 7px 17px; height: 26px; line-height: 26px; @@ -167,7 +167,7 @@ .menu_list .menu_item.push_button_pressed { background: transparent; - border: none; + border: none; width: auto; height: auto; margin: 0; @@ -269,7 +269,7 @@ margin-top: -16px; } -#ruler_x > div, +#ruler_x > div, #ruler_y > div { overflow: hidden; } @@ -295,24 +295,25 @@ .palette_item.transparent, .palette_item.white, .palette_item.black { background: #fff; position: absolute; - width: 10px; - height: 10px; - left: -10px; + width: 30px; + height: 30px; top: 0; + /*background-size:cover;*/ } .palette_item.transparent { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAVdEVYdENyZWF0aW9uIFRpbWUAOC8yMi8xMg1cp6sAAABESURBVBiVjdBBCgAgCETRr/e/87SJKFPLnfIcQRMIwMBIShIAvgZzoSrfkzrs8WyF1+kX9r3p8AE7nL7kSpSshN+JEQ8GixkF0mSevgAAAABJRU5ErkJggg==); + left: -10px; } .palette_item.black { background: #000; - top: 10px; + left: 20px; } .palette_item.white { background: #fff; - top: 20px; + left:50px; } #color_tools { @@ -394,14 +395,14 @@ .touch #tool_switch { display: none; -} +} #use_panel .tool_button, #path_node_panel .tool_button { color: #999; border: solid #3F3F3C 1px; border-radius: 3px; padding: 3px 10px 3px 40px; - background: + background: transparent; position: relative; margin-top: 10px; @@ -476,7 +477,7 @@ position: absolute; top: 10px; width: 14px; - + } #color_tools #tool_switch { @@ -561,13 +562,13 @@ position: absolute; } -.tool_button, +.tool_button, .tool_button_current, .tool_button_pressed { cursor: pointer; } - .tool_button:hover, + .tool_button:hover, .push_button:hover, .buttonup:hover, .buttondown, @@ -630,17 +631,17 @@ color: #999; } -div#font-selector { - width:140px; - height:300px; - overflow:auto; - margin:0 auto; - position:absolute; +div#font-selector { + width:140px; + height:300px; + overflow:auto; + margin:0 auto; + position:absolute; top:27px; right:0; - border:1px solid black; - padding:10px; - display:none; + border:1px solid black; + padding:10px; + display:none; background-color:white; z-index: 10; border-radius: 3px; @@ -920,7 +921,7 @@ right: 50%; border: solid transparent 5px; border-bottom-color: #fff; - + } .dropdown li.special.down:after { @@ -929,13 +930,13 @@ top: auto; border: solid transparent 5px; border-top-color: #fff; - + } - .tool_button, + .tool_button, .push_button, .tool_button_current, - .push_button_pressed + .push_button_pressed { height: 27px; width: 27px; @@ -955,7 +956,7 @@ overflow: hidden; } -#tool_open input, +#tool_open input, #tool_import input, #tool_import_bitmap input { position: absolute; @@ -981,7 +982,7 @@ left: -9999px; } - #tool_bold span, #tool_italic span { + #tool_bold span, #tool_italic span { position: absolute; width: 100%; height: 100%; @@ -1087,7 +1088,6 @@ .draginput_cell { float: left; - height: 26px; height: 26px; border: solid #3f3f3c 10px; outline: solid #2f2f2c 1px; @@ -1278,15 +1278,17 @@ overflow: auto; top: 0; bottom: 0; - left: 110px; + left: 0; + /*left: 110px;*/ right: 0; position: absolute; vertical-align: top; } #shape_cats { + display: none; min-width: 110px; - display: block; + /*display: block;*/ position: absolute; left: 0; top: 0; @@ -1465,7 +1467,7 @@ margin: 5px; border-radius: 0px; -moz-border-radius: 0px; - -webkit-border-radius: 0px; + -webkit-border-radius: 0px; border-width: 0; } @@ -1516,7 +1518,7 @@ } .contextMenu .shortcut { - width: 115px; + width: 115px; text-align:right; float:right; } @@ -1797,7 +1799,7 @@ } - #tool_bold, #tool_italic { + #tool_bold, #tool_italic { font: bold 20px/35px serif; text-align: center; position: absolute; @@ -1854,13 +1856,13 @@ } -.draginput input, .draginput input:hover, .draginput input:active { +.draginput input, .draginput input:hover, .draginput input:active { cursor: url(../images/drag.png), move; cursor: -webkit-grab; cursor: -moz-grab; } -.draginput input[type="checkbox"], .draginput input[type="checkbox"]:hover, .draginput input[type="checkbox"]:active { +.draginput input[type="checkbox"], .draginput input[type="checkbox"]:hover, .draginput input[type="checkbox"]:active { cursor: pointer; } @@ -1868,7 +1870,7 @@ cursor: pointer; } -.draginput.active input, .draginput.active input:hover, .draginput.active input:active { +.draginput.active input, .draginput.active input:hover, .draginput.active input:active { cursor: url(../images/dragging.png), move; cursor: -webkit-grabbing; cursor: -moz-grabbing; @@ -1908,7 +1910,7 @@ margin: 0; z-index: 1; top: 0; - left: 0; + left: 0; } @@ -2080,4 +2082,4 @@ #tool_align_relative select { width: 100%; display: block; -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/embedapi.html b/web/public/SVGOrigin/Method-Draw-master/editor/embedapi.html index 889af20..b170cce 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/embedapi.html +++ b/web/public/SVGOrigin/Method-Draw-master/editor/embedapi.html @@ -12,7 +12,7 @@ function init_embed() { var frame = document.getElementById('svgedit'); svgCanvas = new embedded_svg_edit(frame); - + // Hide main button, as we will be controlling new/load/save etc from the host document var doc; doc = frame.contentDocument; @@ -20,11 +20,11 @@ { doc = frame.contentWindow.document; } - + var mainButton = doc.getElementById('main_button'); - mainButton.style.display = 'none'; + mainButton.style.display = 'none'; } - + function handleSvgData(data, error) { if (error) { @@ -33,15 +33,15 @@ else { alert('Congratulations. Your SVG string is back in the host page, do with it what you will\n\n' + data); - } + } } - + function loadSvg() { var svgexample = '<svg width="640" height="480" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><g><title>Layer 1</title><rect stroke-width="5" stroke="#000000" fill="#FF0000" id="svg_1" height="35" width="51" y="35" x="32"/><ellipse ry="15" rx="24" stroke-width="5" stroke="#000000" fill="#0000ff" id="svg_2" cy="60" cx="66"/></g></svg>'; svgCanvas.setSvgString(svgexample); } - - function saveSvg() { + + function saveSvg() { svgCanvas.getSvgString()(handleSvgData); } </script> @@ -51,6 +51,6 @@ <button onclick="saveSvg();">Save data</button> <br/> - <iframe src="index.html" width="900px" height="600px" id="svgedit" onload="init_embed()"></iframe> + <iframe src="index.html" width="900px" height="600px" id="svgedit" onload="init_embed()"></iframe> </body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/closepath_icons.svg b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/closepath_icons.svg index 7294f5e..b103a6e 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/closepath_icons.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/closepath_icons.svg @@ -38,4 +38,4 @@ </g> <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-arrows.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-arrows.js index 4f45192..3ba48c7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-arrows.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-arrows.js @@ -7,7 +7,7 @@ * */ - + methodDraw.addExtension("Arrows", function(S) { var svgcontent = S.svgcontent, addElem = S.addSvgElementFromJson, @@ -17,7 +17,7 @@ svgCanvas.bind('setnonce', setArrowNonce); svgCanvas.bind('unsetnonce', unsetArrowNonce); - + var lang_list = { "en":[ {"id": "arrow_none", "textContent": "No arrow" } @@ -26,7 +26,7 @@ {"id": "arrow_none", "textContent": "Sans fl猫che" } ] }; - + var prefix = 'se_arrow_'; if (randomize_ids) { var arrowprefix = prefix + nonce + '_'; @@ -38,7 +38,7 @@ fw: {d:"m0,0l10,5l-10,5l5,-5l-5,-5z", refx:8, id: arrowprefix + 'fw'}, bk: {d:"m10,0l-10,5l10,5l-5,-5l5,-5z", refx:2, id: arrowprefix + 'bk'} } - + function setArrowNonce(window, n) { randomize_ids = true; arrowprefix = prefix + n + '_'; @@ -62,17 +62,17 @@ } return S.getElem(m[1]); } - + function showPanel(on) { $('#arrow_panel').toggle(on); - + if(on) { var el = selElems[0]; var end = el.getAttribute("marker-end"); var start = el.getAttribute("marker-start"); var mid = el.getAttribute("marker-mid"); var val; - + if(end && start) { val = "both"; } else if(end) { @@ -85,30 +85,30 @@ val = "mid_bk"; } } - + if(!start && !mid && !end) { val = "none"; } - + $("#arrow_list").val(val); } } - + function resetMarker() { var el = selElems[0]; el.removeAttribute("marker-start"); el.removeAttribute("marker-mid"); el.removeAttribute("marker-end"); } - + function addMarker(dir, type, id) { // TODO: Make marker (or use?) per arrow type, since refX can be different id = id || arrowprefix + dir; - + var marker = S.getElem(id); var data = pathdata[dir]; - + if(type == "mid") { data.refx = 5; } @@ -136,21 +136,21 @@ }); marker.appendChild(arrow); S.findDefs().appendChild(marker); - } - + } + marker.setAttribute('refX', data.refx); - + return marker; } - + function setArrow() { var type = this.value; resetMarker(); - + if(type == "none") { return; } - + // Set marker on element var dir = "fw"; if(type == "mid_bk") { @@ -164,27 +164,27 @@ } else if (type == "start") { dir = "bk"; } - + addMarker(dir, type); svgCanvas.changeSelectedAttribute("marker-"+type, "url(#" + pathdata[dir].id + ")"); S.call("changed", selElems); } - + function colorChanged(elem) { var color = elem.getAttribute('stroke'); - + var mtypes = ['start','mid','end']; var defs = S.findDefs(); - + $.each(mtypes, function(i, type) { var marker = getLinked(elem, 'marker-'+type); if(!marker) return; - + var cur_color = $(marker).children().attr('fill'); var cur_d = $(marker).children().attr('d'); var new_marker = null; if(cur_color === color) return; - + var all_markers = $(defs).find('marker'); // Different color, check if already made all_markers.each(function() { @@ -194,19 +194,19 @@ new_marker = this; } }); - + if(!new_marker) { // Create a new marker with this color var last_id = marker.id; var dir = last_id.indexOf('_fw') !== -1?'fw':'bk'; - + new_marker = addMarker(dir, type, arrowprefix + dir + all_markers.length); $(new_marker).children().attr('fill', color); } - + $(elem).attr('marker-'+type, "url(#" + new_marker.id + ")"); - + // Check if last marker can be removed var remove = true; $(S.svgcontent).find('line, polyline, path, polygon').each(function() { @@ -218,16 +218,16 @@ }); if(!remove) return false; }); - + // Not found, so can safely remove if(remove) { $(marker).remove(); } }); - + } - + return { name: "Arrows", context_tools: [{ @@ -259,13 +259,13 @@ }; }, selectedChanged: function(opts) { - + // Use this to update the current selected elements selElems = opts.elems; - + var i = selElems.length; var marker_elems = ['line','path','polyline','polygon']; - + while(i--) { var elem = selElems[i]; if(elem && $.inArray(elem.tagName, marker_elems) != -1) { @@ -292,7 +292,7 @@ // Has marker, so see if it should match color colorChanged(elem); } - + } }; }); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-closepath.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-closepath.js index dc73f1a..98512ea 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-closepath.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-closepath.js @@ -26,12 +26,12 @@ if (path) updateButton(path); } }, - + toggleClosed = function() { var path = selElems[0]; if (path) { var seglist = path.pathSegList, - last = seglist.numberOfItems - 1; + last = seglist.numberOfItems - 1; // is closed if(seglist.getItem(last).pathSegType == 1) { seglist.removeItem(last); @@ -42,7 +42,7 @@ updateButton(path); } }; - + return { name: "ClosePath", svgicons: "extensions/closepath_icons.svg", @@ -74,7 +74,7 @@ selectedChanged: function(opts) { selElems = opts.elems; var i = selElems.length; - + while(i--) { var elem = selElems[i]; if(elem && elem.tagName == 'path') { diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-connector.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-connector.js index ffd54df..52f77eb 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-connector.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-connector.js @@ -6,7 +6,7 @@ * Copyright(c) 2010 Alexis Deveria * */ - + methodDraw.addExtension("Connector", function(S) { var svgcontent = S.svgcontent, svgroot = S.svgroot, @@ -26,9 +26,9 @@ se_ns, // connect_str = "-SE_CONNECT-", selElems = []; - + elData = $.data; - + var lang_list = { "en":[ {"id": "mode_connect", "title": "Connect two objects" } @@ -37,7 +37,7 @@ {"id": "mode_connect", "title": "Connecter deux objets"} ] }; - + function getOffset(side, line) { var give_offset = !!line.getAttribute('marker-' + side); // var give_offset = $(line).data(side+'_off'); @@ -46,16 +46,16 @@ var size = line.getAttribute('stroke-width') * 5; return give_offset ? size : 0; } - + function showPanel(on) { var conn_rules = $('#connector_rules'); if(!conn_rules.length) { conn_rules = $('<style id="connector_rules"><\/style>').appendTo('head'); - } + } conn_rules.text(!on?"":"#tool_clone, #tool_topath, #tool_angle, #xy_panel { display: none !important; }"); $('#connector_panel').toggle(on); } - + function setPoint(elem, pos, x, y, setMid) { var pts = elem.points; var pt = svgroot.createSVGPoint(); @@ -73,9 +73,9 @@ pt_arr[i] = x + ',' + y; } } - elem.setAttribute("points",pt_arr.join(" ")); + elem.setAttribute("points",pt_arr.join(" ")); } - + if(setMid) { // Add center point var pt_start = pts.getItem(0); @@ -83,7 +83,7 @@ setPoint(elem, 1, (pt_end.x + pt_start.x)/2, (pt_end.y + pt_start.y)/2); } } - + function updateLine(diff_x, diff_y) { // Update line with element var i = connections.length; @@ -91,34 +91,34 @@ var conn = connections[i]; var line = conn.connector; var elem = conn.elem; - + var pre = conn.is_start?'start':'end'; // var sw = line.getAttribute('stroke-width') * 5; - + // Update bbox for this element var bb = elData(line, pre+'_bb'); bb.x = conn.start_x + diff_x; bb.y = conn.start_y + diff_y; elData(line, pre+'_bb', bb); - + var alt_pre = conn.is_start?'end':'start'; - + // Get center pt of connected element var bb2 = elData(line, alt_pre+'_bb'); var src_x = bb2.x + bb2.width/2; var src_y = bb2.y + bb2.height/2; - + // Set point of element being moved var pt = getBBintersect(src_x, src_y, bb, getOffset(pre, line)); // $(line).data(pre+'_off')?sw:0 setPoint(line, conn.is_start?0:'end', pt.x, pt.y, true); - + // Set point of connected element var pt2 = getBBintersect(pt.x, pt.y, elData(line, alt_pre + '_bb'), getOffset(alt_pre, line)); setPoint(line, conn.is_start?'end':0, pt2.x, pt2.y, true); } } - + function findConnectors(elems) { if(!elems) elems = selElems; var connectors = $(svgcontent).find(conn_sel); @@ -128,7 +128,7 @@ connectors.each(function() { var start = elData(this, "c_start"); var end = elData(this, "c_end"); - + var parts = [getElem(start), getElem(end)]; for(var i=0; i<2; i++) { var c_elem = parts[i]; @@ -140,7 +140,7 @@ add_this = true; } }); - + if(!c_elem || !c_elem.parentNode) { $(this).remove(); continue; @@ -153,12 +153,12 @@ is_start: (i === 0), start_x: bb.x, start_y: bb.y - }); + }); } } }); } - + function updateConnectors(elems) { // Updates connector lines based on selected elements // Is not used on mousemove, as it runs getStrokedBBox every time, @@ -174,29 +174,29 @@ var sw = line.getAttribute('stroke-width') * 5; var pre = conn.is_start?'start':'end'; - + // Update bbox for this element var bb = svgCanvas.getStrokedBBox([elem]); bb.x = conn.start_x; bb.y = conn.start_y; elData(line, pre+'_bb', bb); var add_offset = elData(line, pre+'_off'); - + var alt_pre = conn.is_start?'end':'start'; - + // Get center pt of connected element var bb2 = elData(line, alt_pre+'_bb'); var src_x = bb2.x + bb2.width/2; var src_y = bb2.y + bb2.height/2; - + // Set point of element being moved var pt = getBBintersect(src_x, src_y, bb, getOffset(pre, line)); setPoint(line, conn.is_start?0:'end', pt.x, pt.y, true); - + // Set point of connected element var pt2 = getBBintersect(pt.x, pt.y, elData(line, alt_pre + '_bb'), getOffset(alt_pre, line)); setPoint(line, conn.is_start?'end':0, pt2.x, pt2.y, true); - + // Update points attribute manually for webkit if(navigator.userAgent.indexOf('AppleWebKit') != -1) { var pts = line.points; @@ -205,14 +205,14 @@ for(var j=0; j< len; j++) { var pt = pts.getItem(j); pt_arr[j] = pt.x + ',' + pt.y; - } - line.setAttribute("points",pt_arr.join(" ")); + } + line.setAttribute("points",pt_arr.join(" ")); } } } } - + function getBBintersect(x, y, bb, offset) { if(offset) { offset -= 0; @@ -222,54 +222,54 @@ bb.x -= offset/2; bb.y -= offset/2; } - + var mid_x = bb.x + bb.width/2; var mid_y = bb.y + bb.height/2; var len_x = x - mid_x; var len_y = y - mid_y; - + var slope = Math.abs(len_y/len_x); - + var ratio; - + if(slope < bb.height/bb.width) { ratio = (bb.width/2) / Math.abs(len_x); } else { ratio = (bb.height/2) / Math.abs(len_y); } - - + + return { x: mid_x + len_x * ratio, y: mid_y + len_y * ratio } } - + // Do once (function() { var gse = svgCanvas.groupSelectedElements; - + svgCanvas.groupSelectedElements = function() { svgCanvas.removeFromSelection($(conn_sel).toArray()); return gse.apply(this, arguments); } - + var mse = svgCanvas.moveSelectedElements; - + svgCanvas.moveSelectedElements = function() { svgCanvas.removeFromSelection($(conn_sel).toArray()); var cmd = mse.apply(this, arguments); updateConnectors(); return cmd; } - + se_ns = svgCanvas.getEditorNS(); }()); - + // Do on reset function init() { // Make sure all connectors have data set - $(svgcontent).find('*').each(function() { + $(svgcontent).find('*').each(function() { var conn = this.getAttributeNS(se_ns, "connector"); if(conn) { this.setAttribute('class', conn_sel.substr(1)); @@ -285,18 +285,18 @@ }); // updateConnectors(); } - + // $(svgroot).parent().mousemove(function(e) { -// // if(started +// // if(started // // || svgCanvas.getMode() != "connector" // // || e.target.parentNode.parentNode != svgcontent) return; -// +// // console.log('y') // // if(e.target.parentNode.parentNode === svgcontent) { -// // +// // // // } // }); - + return { name: "Connector", svgicons: "images/conn.svg", @@ -326,27 +326,27 @@ start_x = opts.start_x, start_y = opts.start_y; var mode = svgCanvas.getMode(); - + if(mode == "connector") { - + if(started) return; - + var mouse_target = e.target; - + var parents = $(mouse_target).parents(); - + if($.inArray(svgcontent, parents) != -1) { // Connectable element - + // If child of foreignObject, use parent var fo = $(mouse_target).closest("foreignObject"); start_elem = fo.length ? fo[0] : mouse_target; - + // Get center of source element var bb = svgCanvas.getStrokedBBox([start_elem]); var x = bb.x + bb.width/2; var y = bb.y + bb.height/2; - + started = true; cur_line = addElem({ "element": "polyline", @@ -374,27 +374,27 @@ var e = opts.event; var x = opts.mouse_x/zoom; var y = opts.mouse_y/zoom; - + var diff_x = x - start_x, diff_y = y - start_y; - + var mode = svgCanvas.getMode(); - + if(mode == "connector" && started) { - + var sw = cur_line.getAttribute('stroke-width') * 3; // Set start point (adjusts based on bb) var pt = getBBintersect(x, y, elData(cur_line, 'start_bb'), getOffset('start', cur_line)); start_x = pt.x; start_y = pt.y; - + setPoint(cur_line, 0, pt.x, pt.y, true); - + // Set end point setPoint(cur_line, 'end', x, y, true); } else if(mode == "select") { var slen = selElems.length; - + while(slen--) { var elem = selElems[slen]; // Look for selected connector elements @@ -408,9 +408,9 @@ if(connections.length) { updateLine(diff_x, diff_y); - + } - } + } }, mouseUp: function(opts) { var zoom = svgCanvas.getZoom(); @@ -418,11 +418,11 @@ x = opts.mouse_x/zoom, y = opts.mouse_y/zoom, mouse_target = e.target; - + if(svgCanvas.getMode() == "connector") { var fo = $(mouse_target).closest("foreignObject"); if(fo.length) mouse_target = fo[0]; - + var parents = $(mouse_target).parents(); if(mouse_target == start_elem) { @@ -432,7 +432,7 @@ keep: true, element: null, started: started - } + } } else if($.inArray(svgcontent, parents) === -1) { // Not a valid target element, so remove line $(cur_line).remove(); @@ -445,7 +445,7 @@ } else { // Valid end element end_elem = mouse_target; - + var start_id = start_elem.id, end_id = end_elem.id; var conn_str = start_id + " " + end_id; var alt_str = end_id + " " + start_id; @@ -462,9 +462,9 @@ started: false } } - + var bb = svgCanvas.getStrokedBBox([end_elem]); - + var pt = getBBintersect(start_x, start_y, bb, getOffset('start', cur_line)); setPoint(cur_line, 'end', pt.x, pt.y, true); $(cur_line) @@ -490,16 +490,16 @@ selectedChanged: function(opts) { // TODO: Find better way to skip operations if no connectors are in use if(!$(svgcontent).find(conn_sel).length) return; - + if(svgCanvas.getMode() == 'connector') { svgCanvas.setMode('select'); } - + // Use this to update the current selected elements selElems = opts.elems; - + var i = selElems.length; - + while(i--) { var elem = selElems[i]; if(elem && elData(elem, 'c_start')) { @@ -523,7 +523,7 @@ svgcontent = elem; init(); } - + // Has marker, so change offset if(elem && ( elem.getAttribute("marker-start") || @@ -537,16 +537,16 @@ $(elem) .data("start_off", !!start) .data("end_off", !!end); - + if(elem.tagName == "line" && mid) { // Convert to polyline to accept mid-arrow - + var x1 = elem.getAttribute('x1')-0; var x2 = elem.getAttribute('x2')-0; var y1 = elem.getAttribute('y1')-0; var y2 = elem.getAttribute('y2')-0; var id = elem.id; - + var mid_pt = (' '+((x1+x2)/2)+','+((y1+y2)/2) + ' '); var pline = addElem({ "element": "polyline", diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-eyedropper.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-eyedropper.js index 8c960c4..ae766d2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-eyedropper.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-eyedropper.js @@ -70,7 +70,7 @@ buttons: [{ id: "tool_eyedropper", type: "mode", - title: "鍚哥宸ュ叿", + title: "Eye Dropper Tool", position: 8, key: "I", icon: "extensions/eyedropper.png", diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-foreignobject.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-foreignobject.js index e5a04c8..58af5a8 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-foreignobject.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-foreignobject.js @@ -3,8 +3,8 @@ * * Licensed under the Apache License, Version 2 * - * Copyright(c) 2010 Jacques Distler - * Copyright(c) 2010 Alexis Deveria + * Copyright(c) 2010 Jacques Distler + * Copyright(c) 2010 Alexis Deveria * */ @@ -23,8 +23,8 @@ svgdoc = S.svgroot.parentNode.ownerDocument, started, newFO; - - + + var properlySourceSizeTextArea = function(){ // TODO: remove magic numbers here and get values from CSS var height = $('#svg_source_container').height() - 80; @@ -35,7 +35,7 @@ var fc_rules = $('#fc_rules'); if(!fc_rules.length) { fc_rules = $('<style id="fc_rules"><\/style>').appendTo('head'); - } + } fc_rules.text(!on?"":" #tool_topath { display: none !important; }"); $('#foreignObject_panel').toggle(on); } @@ -44,8 +44,8 @@ $('#tool_source_save, #tool_source_cancel').toggle(!on); $('#foreign_save, #foreign_cancel').toggle(on); } - - + + // Function: setForeignString(xmlString, elt) // This function sets the content of element elt to the input XML. // @@ -69,7 +69,7 @@ console.log(e); return false; } - + return true; }; @@ -86,13 +86,13 @@ properlySourceSizeTextArea(); $('#svg_source_textarea').focus(); } - + function setAttr(attr, val) { svgCanvas.changeSelectedAttribute(attr, val); S.call("changed", selElems); } - - + + return { name: "foreignObject", svgicons: "extensions/foreignobject-icons.xml", @@ -116,7 +116,7 @@ } } }], - + context_tools: [{ type: "input", panel: "foreignObject_panel", @@ -154,8 +154,8 @@ } } } - - + + ], callback: function() { $('#foreignObject_panel').hide(); @@ -168,12 +168,12 @@ } // TODO: Needs to be done after orig icon loads - setTimeout(function() { + setTimeout(function() { // Create source save/cancel buttons var save = $('#tool_source_save').clone() .hide().attr('id', 'foreign_save').unbind() .appendTo("#tool_source_back").click(function() { - + if (!editingforeign) return; if (!setForeignString($('#svg_source_textarea').val())) { @@ -184,20 +184,20 @@ } else { endChanges(); } - // setSelectMode(); + // setSelectMode(); }); - + var cancel = $('#tool_source_cancel').clone() .hide().attr('id', 'foreign_cancel').unbind() .appendTo("#tool_source_back").click(function() { endChanges(); }); - + }, 3000); }, mouseDown: function(opts) { var e = opts.event; - + if(svgCanvas.getMode() == "foreign") { started = true; @@ -245,14 +245,14 @@ } } - + }, selectedChanged: function(opts) { // Use this to update the current selected elements selElems = opts.elems; - + var i = selElems.length; - + while(i--) { var elem = selElems[i]; if(elem && elem.tagName == "foreignObject") { @@ -260,7 +260,7 @@ $('#foreign_font_size').val(elem.getAttribute("font-size")); $('#foreign_width').val(elem.getAttribute("width")); $('#foreign_height').val(elem.getAttribute("height")); - + showPanel(true); } else { showPanel(false); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-grid.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-grid.js index 76c95b5..26f716b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-grid.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-grid.js @@ -21,7 +21,7 @@ var svgCanvas = methodDraw.canvas; var showGrid = false; var assignAttributes = s.assignAttributes; - + var hcanvas = document.createElement('canvas'); $(hcanvas).hide().appendTo('body'); @@ -35,11 +35,11 @@ 'overflow': 'visible', 'display': 'none' }); - + var canvBG = $('#canvas_background'); canvBG.after(canvasgrid); - - + + // grid-pattern var gridPattern = svgdoc.createElementNS(svgns, "pattern"); @@ -51,7 +51,7 @@ 'width': 100, 'height': 100 }); - + var gridimg = svgdoc.createElementNS(svgns, "image"); assignAttributes(gridimg, { 'x': 0, @@ -59,7 +59,7 @@ 'width': 100, 'height': 100 }); - + gridPattern.appendChild(gridimg); $('#svgroot defs').append(gridPattern); @@ -81,25 +81,25 @@ function updateGrid(zoom) { // TODO: Try this with <line> elements, then compare performance difference - + var bgwidth = +canvBG.attr('width'); var bgheight = +canvBG.attr('height'); - + var units = svgedit.units.getTypeMap(); var unit = units[methodDraw.curConfig.baseUnit]; // 1 = 1px var r_intervals = [.01, .1, 1, 10, 100, 1000]; - + var d = 0; var is_x = (d === 0); var dim = is_x ? 'x' : 'y'; var lentype = is_x?'width':'height'; var c_elem = svgCanvas.getContentElem(); var content_d = c_elem.getAttribute(dim)-0; - + var hcanv = hcanvas; - + var u_multi = unit * zoom; - + // Calculate the main number interval var raw_m = 100 / u_multi; var multi = 1; @@ -110,7 +110,7 @@ break; } } - + var big_int = multi * u_multi; // Set the canvas size to the width of the container @@ -118,9 +118,9 @@ hcanv.height = big_int; var ctx = hcanv.getContext("2d"); - var ruler_d = 0; + var ruler_d = 0; var cur_d = .5; - + var part = big_int / 10; ctx.globalAlpha = 0.2; @@ -135,7 +135,7 @@ ctx.lineTo(line_num ,sub_d); } ctx.stroke(); - ctx.beginPath(); + ctx.beginPath(); ctx.globalAlpha = 0.5; ctx.moveTo(cur_d, big_int); ctx.lineTo(cur_d, 0); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-helloworld.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-helloworld.js index 419e9e2..f5705a1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-helloworld.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-helloworld.js @@ -6,13 +6,13 @@ * Copyright(c) 2010 Alexis Deveria * */ - -/* + +/* This is a very basic SVG-Edit extension. It adds a "Hello World" button in the left panel. Clicking on the button, and then the canvas will show the user the point on the canvas that was clicked on. */ - + methodDraw.addExtension("Hello World", function() { return { @@ -20,55 +20,55 @@ // For more notes on how to make an icon file, see the source of // the hellorworld-icon.xml svgicons: "extensions/helloworld-icon.xml", - + // Multiple buttons can be added in this array buttons: [{ // Must match the icon ID in helloworld-icon.xml - id: "hello_world", - + id: "hello_world", + // This indicates that the button will be added to the "mode" // button panel on the left side - type: "mode", - + type: "mode", + // Tooltip text - title: "Say 'Hello World'", - + title: "Say 'Hello World'", + // Events events: { 'click': function() { // The action taken when the button is clicked on. - // For "mode" buttons, any other button will + // For "mode" buttons, any other button will // automatically be de-pressed. svgCanvas.setMode("hello_world"); } } }], - // This is triggered when the main mouse button is pressed down + // This is triggered when the main mouse button is pressed down // on the editor canvas (not the tool panels) mouseDown: function() { // Check the mode on mousedown if(svgCanvas.getMode() == "hello_world") { - - // The returned object must include "started" with + + // The returned object must include "started" with // a value of true in order for mouseUp to be triggered return {started: true}; } }, - + // This is triggered from anywhere, but "started" must have been set // to true (see above). Note that "opts" is an object with event info mouseUp: function(opts) { // Check the mode on mouseup if(svgCanvas.getMode() == "hello_world") { var zoom = svgCanvas.getZoom(); - + // Get the actual coordinate by dividing by the zoom value var x = opts.mouse_x / zoom; var y = opts.mouse_y / zoom; - - var text = "Hello World!\n\nYou clicked here: " + + var text = "Hello World!\n\nYou clicked here: " + x + ", " + y; - + // Show the text using the custom alert function $.alert(text); } diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.js index d609574..542c2e2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.js @@ -10,7 +10,7 @@ methodDraw.addExtension("imagelib", function() { var uiStrings = methodDraw.uiStrings; - + $.extend(uiStrings, { imagelib: { select_lib: 'Select an image library', @@ -25,20 +25,20 @@ name: 'Demo library (local)', url: 'extensions/imagelib/index.html', description: 'Demonstration library for SVG-edit on this server' - }, + }, { name: 'IAN Symbol Libraries', url: 'http://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php', description: 'Free library of illustrations' } ]; - + var xlinkns = "http://www.w3.org/1999/xlink"; function closeBrowser() { $('#imgbrowse_holder').hide(); } - + function importImage(url) { var newImage = svgCanvas.addSvgElementFromJson({ "element": "image", @@ -61,26 +61,26 @@ var cur_meta; var tranfer_stopped = false; var pending = {}; - + window.addEventListener("message", function(evt) { // Receive postMessage data var response = evt.data; - + if(!response) { // Do nothing return; } - + var char1 = response.charAt(0); - + var svg_str; var img_str; - + if(char1 != "{" && tranfer_stopped) { tranfer_stopped = false; return; } - + if(char1 == '|') { var secondpos = response.indexOf('|', 1); var id = response.substr(1, secondpos-1); @@ -88,28 +88,28 @@ char1 = response.charAt(0); } - - + + // Hide possible transfer dialog box $('#dialog_box').hide(); - + switch (char1) { case '{': // Metadata tranfer_stopped = false; var cur_meta = JSON.parse(response); - + pending[cur_meta.id] = cur_meta; - + var name = (cur_meta.name || 'file'); - + var message = uiStrings.notification.retrieving.replace('%s', name); - + if(mode != 'm') { $.process_cancel(message, function() { tranfer_stopped = true; // Should a message be sent back to the frame? - + $('#dialog_box').hide(); }); } else { @@ -117,7 +117,7 @@ preview.append(entry); cur_meta.entry = entry; } - + return; case '<': svg_str = true; @@ -137,10 +137,10 @@ default: // TODO: See if there's a way to base64 encode the binary data stream // var str = 'data:;base64,' + svgCanvas.Utils.encode64(response, true); - + // Assume it's raw image data // importImage(str); - + // Don't give warning as postMessage may have been used by something else if(mode !== 'm') { closeBrowser(); @@ -156,7 +156,7 @@ // }); return; } - + switch (mode) { case 's': // Import one @@ -203,7 +203,7 @@ } else { var entry = '<img src="' + response + '">'; } - + if(cur_meta) { preview.children().each(function() { if($(this).data('id') == id) { @@ -231,11 +231,11 @@ break; } }, true); - + var preview, submit; function toggleMulti(show) { - + $('#lib_framewrap, #imglib_opts').css({right: (show ? 200 : 10)}); if(!preview) { preview = $('<div id=imglib_preview>').css({ @@ -247,7 +247,7 @@ background: '#fff', overflow: 'auto' }).insertAfter('#lib_framewrap'); - + submit = $('<button disabled>Import selected</button>').appendTo('#imgbrowse').click(function() { $.each(multi_arr, function(i) { var type = this[0]; @@ -269,7 +269,7 @@ }); } - + preview.toggle(show); submit.toggle(show); } @@ -286,14 +286,14 @@ var lib_opts = $('<ul id=imglib_opts>').appendTo(browser); var frame = $('<iframe/>').prependTo(browser).hide().wrap('<div id=lib_framewrap>'); - + var header = $('<h1>').prependTo(browser).text(all_libs).css({ position: 'absolute', top: 0, left: 0, width: '100%' }); - + var cancel = $('<button>' + uiStrings.common.cancel + '</button>').appendTo(browser).click(function() { $('#imgbrowse_holder').hide(); }).css({ @@ -301,9 +301,9 @@ top: 5, right: -10 }); - + var leftBlock = $('<span>').css({position:'absolute',top:5,left:10}).appendTo(browser); - + var back = $('<button hidden>' + uiStrings.imagelib.show_list + '</button>').appendTo(leftBlock).click(function() { frame.attr('src', 'about:blank').hide(); lib_opts.show(); @@ -312,8 +312,8 @@ }).css({ 'margin-right': 5 }).hide(); - - var type = $('<select><option value=s>' + + + var type = $('<select><option value=s>' + uiStrings.imagelib.import_single + '</option><option value=m>' + uiStrings.imagelib.import_multi + '</option><option value=o>' + uiStrings.imagelib.open + '</option></select>').appendTo(leftBlock).change(function() { @@ -323,7 +323,7 @@ case 'o': toggleMulti(false); break; - + case 'm': // Import multiple toggleMulti(true); @@ -331,10 +331,10 @@ }).css({ 'margin-top': 10 }); - + cancel.prepend($.getSvgIcon('cancel', true)); back.prepend($.getSvgIcon('tool_imagelib', true)); - + $.each(img_libs, function(i, opts) { $('<li>').appendTo(lib_opts).text(opts.name).click(function() { frame.attr('src', opts.url).show(); @@ -343,12 +343,12 @@ back.show(); }).append('<span>' + opts.description + '</span>'); }); - + } else { $('#imgbrowse_holder').show(); } } - + return { buttons: [{ id: "tool_imagelib", @@ -361,7 +361,7 @@ } }], callback: function() { - + $('<style>').text('\ #imgbrowse_holder {\ position: absolute;\ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.xml index 42f9509..97129f4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-imagelib.xml @@ -11,4 +11,4 @@ </g> </svg> </g> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-markers.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-markers.js index 4024203..1b3d9e1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-markers.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-markers.js @@ -3,26 +3,26 @@ * * Licensed under the Apache License, Version 2 * - * Copyright(c) 2010 Will Schleter + * Copyright(c) 2010 Will Schleter * based on ext-arrows.js by Copyright(c) 2010 Alexis Deveria * * This extension provides for the addition of markers to the either end - * or the middle of a line, polyline, path, polygon. - * + * or the middle of a line, polyline, path, polygon. + * * Markers may be either a graphic or arbitary text - * + * * to simplify the coding and make the implementation as robust as possible, * markers are not shared - every object has its own set of markers. * this relationship is maintained by a naming convention between the * ids of the markers and the ids of the object - * + * * The following restrictions exist for simplicty of use and programming * objects and their markers to have the same color * marker size is fixed * text marker font, size, and attributes are fixed * an application specific attribute - se_type - is added to each marker element * to store the type of marker - * + * * TODO: * remove some of the restrictions above * add option for keeping text aligned to horizontal @@ -39,15 +39,15 @@ var marker_prefix = 'se_marker_'; var id_prefix = 'mkr_'; - + // note - to add additional marker types add them below with a unique id // and add the associated icon(s) to marker-icons.svg // the geometry is normallized to a 100x100 box with the origin at lower left // Safari did not like negative values for low left of viewBox // remember that the coordinate system has +y downward var marker_types = { - nomarker: {}, - leftarrow: + nomarker: {}, + leftarrow: {element:'path', attr:{d:'M0,50 L100,90 L70,50 L100,10 Z'}}, rightarrow: {element:'path', attr:{d:'M100,50 L0,90 L30,50 L0,10 Z'}}, @@ -71,8 +71,8 @@ mcircle: {element:'circle', attr:{r:30, cx:50, cy:50}} } - - + + var lang_list = { "en":[ {id: "start_marker_list", title: "Select start marker type" }, @@ -104,7 +104,7 @@ $.each(['leftarrow','rightarrow','box','star','mcircle','triangle'],function(i,v) { marker_types[v+'_o'] = marker_types[v]; }); - + // elem = a graphic element will have an attribute like marker-start // attr - marker-start, marker-mid, or marker-end // returns the marker element that is linked to the graphic element @@ -149,24 +149,24 @@ txtbox.hide() // hide text box } } - txtbox.val(val); + txtbox.val(val); setIcon(pos,ci); }) } - } + } function addMarker(id, val) { var txt_box_bg = '#ffffff'; var txt_box_border = 'none'; var txt_box_stroke_width = 0; - + var marker = S.getElem(id); if (marker) return; if (val=='' || val=='\\nomarker') return; - var el = selElems[0]; + var el = selElems[0]; var color = el.getAttribute('stroke'); //NOTE: Safari didn't like a negative value in viewBox //so we use a standardized 0 0 100 100 @@ -181,7 +181,7 @@ else se_type='textmarker'; if (!marker_types[se_type]) return; // an unknown type! - + // create a generic marker marker = addElem({ "element": "marker", @@ -239,7 +239,7 @@ marker.setAttribute("orient",0); marker.appendChild(box); marker.appendChild(text); - } + } marker.setAttribute("viewBox",viewBox); marker.setAttribute("markerWidth", markerWidth); @@ -305,11 +305,11 @@ var m = elem.getAttribute(nam); if (m) pline.setAttribute(nam,elem.getAttribute(nam)); }); - + var batchCmd = new S.BatchCommand(); batchCmd.addSubCommand(new S.RemoveElementCommand(elem, elem.parentNode)); batchCmd.addSubCommand(new S.InsertElementCommand(pline)); - + $(elem).after(pline).remove(); svgCanvas.clearSelection(); pline.id = id; @@ -367,14 +367,14 @@ //if (val.substr(0,1)=='\\') txtbox.hide(); //else txtbox.show(); } - + function setIcon(pos,id) { if (id.substr(0,1)!='\\') id='\\textmarker' var ci = '#'+id_prefix+pos+'_'+id.substr(1); methodDraw.setIcon('#cur_' + pos +'_marker_list', $(ci).children()); $(ci).addClass('current').siblings().removeClass('current'); } - + function setMarkerSet(obj) { var parts = this.id.split('_'); var set = parts[2]; @@ -396,28 +396,28 @@ break; } } - + function showTextPrompt(pos) { var def = $('#'+pos+'_marker').val(); if (def.substr(0,1)=='\\') def=''; $.prompt('Enter text for ' + pos + ' marker', def , function(txt) { if (txt) triggerTextEntry(pos,txt); }); } - + // callback function for a toolbar button click function setArrowFromButton(obj) { - + var parts = this.id.split('_'); var pos = parts[1]; var val = parts[2]; if (parts[3]) val+='_'+parts[3]; - + if (val!='textmarker') { triggerTextEntry(pos,'\\'+val); } else { showTextPrompt(pos); } } - + function getTitle(lang,id) { var list = lang_list[lang]; for (var i in list) { @@ -425,8 +425,8 @@ } return id; } - - + + // build the toolbar button array from the marker definitions // TODO: need to incorporate language specific titles function buildButtonList() { @@ -530,7 +530,7 @@ } ], callback: function() { $('#marker_panel').addClass('toolset').hide(); - + }, addLangData: function(lang) { return { data: lang_list[lang] }; @@ -558,7 +558,7 @@ } }, - elementChanged: function(opts) { + elementChanged: function(opts) { //console.log('elementChanged',opts); var elem = opts.elems[0]; if(elem && ( diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_moinsave.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_moinsave.js index dac0c28..c075edf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_moinsave.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_moinsave.js @@ -14,10 +14,10 @@ callback: function() { var save_svg_action = '/+modify'; - + // Create upload target (hidden iframe) var target = $('<iframe name="output_frame" src="#"/>').hide().appendTo('body'); - + methodDraw.setCustomHandlers({ save: function(win, data) { var svg = "<?xml version=\"1.0\"?>\n" + data; @@ -50,7 +50,7 @@ top.window.location = '/'+name; }, }); - + } }); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_opensave.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_opensave.js index 140e920..5e4dddf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_opensave.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-server_opensave.js @@ -12,17 +12,17 @@ //var save_svg_action = 'extensions/filesave.php'; //var save_png_action = 'extensions/filesave.php'; - + // Create upload target (hidden iframe) var target = $('<iframe name="output_frame" />').hide().appendTo('body'); - + //methodDraw.setCustomHandlers({ // save: function(win, data) { // var svg = "<?xml version=\"1.0\"?>\n" + data; - // + // // var title = svgCanvas.getDocumentTitle(); // var filename = title.replace(/[^a-z0-9\.\_\-]+/gi, '_'); - // + // // var form = $('<form>').attr({ // method: 'post', // action: save_svg_action, @@ -34,33 +34,33 @@ // }, // pngsave: function(win, data) { // var issues = data.issues; - // + // // if(!$('#export_canvas').length) { // $('<canvas>', {id: 'export_canvas'}).hide().appendTo('body'); // } // var c = $('#export_canvas')[0]; - // + // // c.width = svgCanvas.contentW; // c.height = svgCanvas.contentH; // canvg(c, data.svg, {renderCallback: function() { // var datauri = c.toDataURL('image/png'); - // + // // var uiStrings = methodDraw.uiStrings; // var note = ''; - // + // // // Check if there's issues // if(issues.length) { // var pre = "\n \u2022 "; // note += ("\n\n" + pre + issues.join(pre)); - // } - // + // } + // // if(note.length) { // alert(note); // } - // + // // var title = svgCanvas.getDocumentTitle(); // var filename = title.replace(/[^a-z0-9\.\_\-]+/gi, '_'); - // + // // var form = $('<form>').attr({ // method: 'post', // action: save_png_action, @@ -71,33 +71,33 @@ // .submit().remove(); // }}); // - // + // // } //}); - + // Do nothing if client support is found if(window.FileReader) return; - + var cancelled = false; - + // Change these to appropriate script file var open_svg_action = 'extensions/fileopen.php?type=load_svg'; var import_svg_action = 'extensions/fileopen.php?type=import_svg'; var import_img_action = 'extensions/fileopen.php?type=import_img'; - + // Set up function for PHP uploader to use methodDraw.processFile = function(str64, type) { if(cancelled) { cancelled = false; return; } - + $('#dialog_box').hide(); - + if(type != 'import_img') { var xmlstr = svgCanvas.Utils.decode64(str64); } - + switch ( type ) { case 'load_svg': svgCanvas.clear(); @@ -106,14 +106,14 @@ break; case 'import_svg': svgCanvas.importSvgString(xmlstr); - methodDraw.updateCanvas(); + methodDraw.updateCanvas(); break; case 'import_img': svgCanvas.setGoodImage(str64); break; } } - + // Create upload form var open_svg_form = $('<form>'); open_svg_form.attr({ @@ -122,31 +122,31 @@ action: open_svg_action, target: 'output_frame' }); - + // Create import form var import_svg_form = open_svg_form.clone().attr('action', import_svg_action); - + // Create image form var import_img_form = open_svg_form.clone().attr('action', import_img_action); - - // It appears necessory to rebuild this input every time a file is + + // It appears necessory to rebuild this input every time a file is // selected so the same file can be picked and the change event can fire. function rebuildInput(form) { form.empty(); var inp = $('<input type="file" name="svg_file">').appendTo(form); - - + + function submit() { // This submits the form, which returns the file data using methodDraw.uploadSVG form.submit(); - + rebuildInput(form); $.process_cancel("Uploading...", function() { cancelled = true; $('#dialog_box').hide(); }); } - + if(form[0] == open_svg_form[0]) { inp.change(function() { // This takes care of the "are you sure" dialog box @@ -165,7 +165,7 @@ }); } } - + // Create the input elements rebuildInput(open_svg_form); rebuildInput(import_svg_form); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.js b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.js index 1d114a0..f5f1dc6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.js @@ -20,18 +20,18 @@ // This populates the category list var categories = { - basic: '鍩烘湰', - object: '鐗╀綋', - symbol: '绗﹀彿', - arrow: '绠ご', - flowchart: '娴佺▼鍥�', - nature: '鑷劧', - game: '绾哥墝涓庤薄妫�', - dialog_balloon: '瀵硅瘽妗�', - music: '闊充箰', - weather: '澶╂皵涓庢椂闂�', - ui: '鐢ㄦ埛鎺ュ彛', - social: '绀句氦缃戠粶' + basic: 'Basic', + object: 'Objects', + symbol: 'Symbols', + arrow: 'Arrows', + flowchart: 'Flowchart', + nature: 'Nature', + game: 'Cards & Chess', + dialog_balloon: 'Dialog balloons', + music: 'Music', + weather: 'Weather & Time', + ui: 'User Interface', + social: 'Social Web' }; var library = { @@ -53,8 +53,12 @@ 'heart': 'm150,73c61,-175 300,0 0,225c-300,-225 -61,-400 0,-225z', "cylinder": "m299.0007,83.77844c0,18.28676 -66.70958,33.11111 -149.00002,33.11111m149.00002,-33.11111l0,0c0,18.28676 -66.70958,33.11111 -149.00002,33.11111c-82.29041,0 -148.99997,-14.82432 -148.99997,-33.11111m0,0l0,0c0,-18.28674 66.70956,-33.1111 148.99997,-33.1111c82.29044,0 149.00002,14.82436 149.00002,33.1111l0,132.44449c0,18.28674 -66.70958,33.11105 -149.00002,33.11105c-82.29041,0 -148.99997,-14.82431 -148.99997,-33.11105z", "arrow_up": "m1.49805,149.64304l148.50121,-148.00241l148.50121,148.00241l-74.25061,0l0,148.71457l-148.5012,0l0,-148.71457z", - "arrow_u_turn": "m1.00059,299.00055l0,-167.62497l0,0c0,-72.00411 58.37087,-130.37499 130.375,-130.37499l0,0l0,0c34.57759,0 67.73898,13.7359 92.18906,38.18595c24.45006,24.45005 38.18593,57.61144 38.18593,92.18904l0,18.625l37.24997,0l-74.49995,74.50002l-74.50002,-74.50002l37.25,0l0,-18.625c0,-30.8589 -25.0161,-55.87498 -55.87498,-55.87498l0,0l0,0c-30.85892,0 -55.875,25.01608 -55.875,55.87498l0,167.62497z", - "arrow_left_up": "m0.99865,224.5l74.50004,-74.5l0,37.25l111.74991,0l0,-111.75l-37.25,0l74.5,-74.5l74.5,74.5l-37.25,0l0,186.25l-186.24989,0l0,37.25l-74.50005,-74.5z", + "piping_left": "m61.06297,135.21906c1.26516,30.57214 1.45736,47.83058 49.70693,48.17825c48.24958,0.34766 84.79024,-0.96742 117.29734,-2.05798c32.5071,-1.09057 42.57196,-6.82504 39.75187,-89.83523l29.71009,-0.09174c4.15832,110.21703 -16.27162,115.96341 -62.08326,119.84398c-45.81163,3.88059 -122.9577,2.75494 -155.18351,0.85096c-32.2258,-1.90396 -49.88012,-29.62204 -49.71715,-67.06613c0.16297,-37.4441 -12.64439,-27.42789 -29.18351,-30.51291l-0.30561,-24.87842c49.64155,-5.12952 58.74164,14.99708 60.0068,45.56922l0,-0.00002l0.00001,0.00001l0,0.00001z", + "piping_right": "m34.77162,144.78038c1.93502,23.59007 0.90063,36.98668 51.7728,39.12084c50.87217,2.13416 49.3661,0.20868 95.80745,0.31737c46.44135,0.10868 46.80596,-16.26537 50.39204,-41.13127c3.58607,-24.8659 9.89537,-41.12805 16.9583,-45.07714c7.06293,-3.94908 26.20271,-3.41801 47.83801,-1.96183l-0.56549,21.42594c-1.95665,3.6252 -32.45161,-7.98981 -32.68677,30.50966c-0.23516,38.49947 -15.74948,61.56741 -84.43714,63.72421c-68.68766,2.15681 -34.0838,1.55507 -97.51854,-0.36787c-63.43474,-1.92294 -79.51644,-17.24319 -79.3467,-58.58433c0.16974,-41.34115 0.12119,-45.63576 -0.32767,-49.13504l30.73149,0.18025c0.17338,20.1933 -0.5528,17.38914 1.38222,40.97921z", + "curve_1": "m12.99218,75.18742c-21.79909,161.7324 270.03537,128.87978 281.3936,129.5404", + "curve_2": "m9.70598,97.53259c60.4983,112.24893 204.38633,128.61647 275.93837,-0.52493", + "S-shaped_arc": "m177.40301,7.84547c-107.70811,-0.87963 -95.07584,134.96412 -25.7545,143.11086c69.32135,8.14675 89.64716,119.18795 -27.73838,144.46005", + "anti_S-shaped_arc": "m133.54237,3.90583c113.54352,-2.11252 100.59557,128.86359 8.96395,144.70747c-91.63162,15.84388 -77.68768,149.98876 37.54903,146.81995", "plaque": "m-0.00197,49.94376l0,0c27.5829,0 49.94327,-22.36036 49.94327,-49.94327l199.76709,0l0,0c0,27.5829 22.36037,49.94327 49.94325,49.94327l0,199.7671l0,0c-27.58289,0 -49.94325,22.36034 -49.94325,49.94325l-199.76709,0c0,-27.58292 -22.36037,-49.94325 -49.94327,-49.94325z", "page": "m249.3298,298.99744l9.9335,-39.73413l39.73413,-9.93355l-49.66763,49.66768l-248.33237,0l0,-298.00001l298.00001,0l0,248.33234", "cross": "m0.99844,99.71339l98.71494,0l0,-98.71495l101.26279,0l0,98.71495l98.71495,0l0,101.2628l-98.71495,0l0,98.71494l-101.26279,0l0,-98.71494l-98.71494,0z", @@ -191,9 +195,9 @@ var shape_cats = $('<div id="shape_cats">'); var cat_str = ''; - $.each(categories, function(id, label) { - cat_str += '<div data-cat=' + id + '>' + label + '</div>'; - }); + // $.each(categories, function(id, label) { + // cat_str += '<div data-cat=' + id + '>' + label + '</div>'; + // }); shape_cats.html(cat_str).children().bind('mouseup', function() { var catlink = $(this); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.xml index 129cb54..6294273 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/ext-shapes.xml @@ -5,4 +5,4 @@ l3.445-6.979l3.447,6.98l7.702,1.121l-5.573,5.434L20.328,24.166z"/> </svg> </g> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/eyedropper-icon.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/eyedropper-icon.xml index 0133ea7..4939d83 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/eyedropper-icon.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/eyedropper-icon.xml @@ -12,6 +12,6 @@ l-2.5,2.482l0.167,0.166c0.46,0.457,0.46,1.197,0,1.655l-1.5,1.489c-0.46,0.456-1.207,0.456-1.667,0l-0.333-0.332L7.708,22.809l-0.223,0.037c-1.787,0.296-3.805,1.978-3.826,1.995l-0.496,0.417L2.702,24.801z"/> </svg> </g> - + <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/fileopen.php b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/fileopen.php index 8aad827..7b44a5c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/fileopen.php +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/fileopen.php @@ -11,15 +11,15 @@ */ // Very minimal PHP file, all we do is Base64 encode the uploaded file and // return it to the editor - + $file = $_FILES['svg_file']['tmp_name']; - + $output = file_get_contents($file); - + $type = $_REQUEST['type']; - + $prefix = ''; - + // Make Data URL prefix for import image if($type == 'import_img') { $info = getimagesize($file); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/filesave.php b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/filesave.php index 9f1d009..26a5ea7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/filesave.php +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/filesave.php @@ -8,7 +8,7 @@ * Copyright(c) 2010 Alexis Deveria * */ - + if(!isset($_POST['output_svg']) && !isset($_POST['output_png'])) { die('post fail'); } @@ -38,7 +38,7 @@ header("Content-Disposition: attachment; filename=" . $file); header("Content-Type: " . $mime); header("Content-Transfer-Encoding: binary"); - + echo $contents; - -?> \ No newline at end of file + +?> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/foreignobject-icons.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/foreignobject-icons.xml index 8001aee..d8919f0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/foreignobject-icons.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/foreignobject-icons.xml @@ -31,7 +31,7 @@ </g> </svg> </g> - + <g id="edit_foreign"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="34 38 170 170" overflow="hidden"> <g fill="#000088"> @@ -91,6 +91,6 @@ </g> </svg> </g> - + <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/grid-icon.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/grid-icon.xml index 68c1421..0d6f1e1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/grid-icon.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/grid-icon.xml @@ -1,10 +1,10 @@ <svg xmlns="http://www.w3.org/2000/svg"> -<!-- +<!-- Sample icons file. This file looks like an SVG file with groups as its children. Each group element has an ID that must match the ID of the button given in the extension. The SVG inside the group makes up the actual icon, and needs use a viewBox instead of width/height for it to scale properly. - + Multiple icons can be included, each within their own group. --> <g id="view_grid"> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/helloworld-icon.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/helloworld-icon.xml index f08bd1f..e43a1d1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/helloworld-icon.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/helloworld-icon.xml @@ -1,10 +1,10 @@ <svg xmlns="http://www.w3.org/2000/svg"> -<!-- +<!-- Sample icons file. This file looks like an SVG file with groups as its children. Each group element has an ID that must match the ID of the button given in the extension. The SVG inside the group makes up the actual icon, and needs use a viewBox instead of width/height for it to scale properly. - + Multiple icons can be included, each within their own group. --> <g id="hello_world"> @@ -18,4 +18,4 @@ </g> </svg> </g> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/index.html b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/index.html index 7cc4d36..9e8f363 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/index.html +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/index.html @@ -15,7 +15,7 @@ $('a').click(function() { var href = this.href; var target = window.parent; - // Convert Non-SVG images to data URL first + // Convert Non-SVG images to data URL first // (this could also have been done server-side by the library) if(this.href.indexOf('.svg') === -1) { @@ -24,7 +24,7 @@ id: href }); target.postMessage(meta_str, "*"); - + var img = new Image(); img.onload = function() { var canvas = document.createElement("canvas"); @@ -55,7 +55,7 @@ data = '|' + href + '|' + data; // This is where the magic happens! target.postMessage(data, "*"); - + }, 'html'); // 'html' is necessary to keep returned data as a string } return false; diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/smiley.svg b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/smiley.svg index 21a798d..048a1f6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/smiley.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/imagelib/smiley.svg @@ -9,4 +9,4 @@ <stop stop-color="#ffff00" offset="1"/> </linearGradient> </defs> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/markers-icons.xml b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/markers-icons.xml index 9fe5ad4..4dcad98 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/markers-icons.xml +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/markers-icons.xml @@ -87,7 +87,7 @@ </g> <g id="textmarker"> <svg viewBox="-60 -60 120 120" xmlns="http://www.w3.org/2000/svg"> - <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="120" y="40" x="0" stroke-width="0" stroke="#ff7f00" fill="#ff7f00">T</text> + <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="120" y="40" x="0" stroke-width="0" stroke="#ff7f00" fill="#ff7f00">T</text> </svg> </g> <g id="mkr_markers_off"> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/arrow.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/arrow.json index 4296fc7..74fbe7b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/arrow.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/arrow.json @@ -33,8 +33,8 @@ "u_turn": "m1.00059,299.00055l0,-167.62497l0,0c0,-72.00411 58.37087,-130.37499 130.375,-130.37499l0,0l0,0c34.57759,0 67.73898,13.7359 92.18906,38.18595c24.45006,24.45005 38.18593,57.61144 38.18593,92.18904l0,18.625l37.24997,0l-74.49995,74.50002l-74.50002,-74.50002l37.25,0l0,-18.625c0,-30.8589 -25.0161,-55.87498 -55.87498,-55.87498l0,0l0,0c-30.85892,0 -55.875,25.01608 -55.875,55.87498l0,167.62497z", "up": "m1.49805,149.64304l148.50121,-148.00241l148.50121,148.00241l-74.25061,0l0,148.71457l-148.5012,0l0,-148.71457z", "3_ways": "m1,159.61292l52.87097,-52.87097l0,26.43549l69.69355,0l0,-79.30646l-26.43549,0l52.87096,-52.87097l52.87097,52.87097l-26.43549,0l0,79.30646l69.69356,0l0,-26.43549l52.87096,52.87097l-52.87096,52.87097l0,-26.43549l-192.25807,0l0,26.43549l-52.87097,-52.87097z", - + "maximize_2": "m1,149.99998l67.05,-67.05l0,33.52501l48.425,0l0,-48.425l-33.52501,0l67.05,-67.05l67.04999,67.05l-33.52499,0l0,48.425l48.42502,0l0,-33.52501l67.04997,67.05l-67.04997,67.04999l0,-33.52499l-48.42502,0l0,48.42502l33.52499,0l-67.04999,67.04997l-67.05,-67.04997l33.52501,0l0,-48.42502l-48.425,0l0,33.52499l-67.05,-67.04999z", "raph_download": "m149.92238,36.82233c-65.72484,0 -119.00005,53.27818 -119.00005,119c0,65.72183 53.27521,119 119.00005,119c65.7218,0 118.99995,-53.27817 118.99995,-119c0,-65.72182 -53.27815,-119 -118.99995,-119zm0,223.73889c-12.68407,0 -22.97548,-10.28841 -22.97548,-22.97537s10.28215,-22.97583 22.97548,-22.97583c12.69009,0 22.97223,10.28247 22.97223,22.97583s-10.28214,22.97537 -22.97223,22.97537zm0,-63.08578l-64.34113,-53.72815l28.40379,0l0,-71.87465l71.88103,0l0,71.87465l28.39413,0l-64.33783,53.72815z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/dialog_balloon.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/dialog_balloon.json index 8600e4e..8a95f67 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/dialog_balloon.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/dialog_balloon.json @@ -11,4 +11,4 @@ "raph_talkq": "m151.95413,37.83469c-77.87229,0 -140.99913,47.34782 -140.99913,105.75328c0,19.94707 7.46298,38.60376 20.30468,54.52449l-20.30468,44.51276l56.5302,-14.49918c23.55888,13.25453 52.74399,21.2072 84.46893,21.2072c77.87204,0 141.00085,-47.3481 141.00085,-105.74527s-63.12881,-105.75328 -141.00085,-105.75328zm8.74214,165.54159l-19.83006,0l0,-19.02583l19.83006,0l0,19.02583zm-0.96628,-33.04105l-17.89746,0l-1.77126,-81.41087l21.28053,0l-1.61182,81.41087z", "raph_talke": "m151.46997,37.82469c-78.14881,0 -141.49997,47.50852 -141.49997,106.12126c0,20.02579 7.4895,38.74088 20.37584,54.71835l-20.37584,44.67868l56.73113,-14.55873c23.6405,13.30168 52.9314,21.29042 84.76884,21.29042c78.149,0 141.50003,-47.51628 141.50003,-106.12872s-63.35103,-106.12126 -141.50003,-106.12126zm9.92621,166.12944l-19.90253,0l0,-19.09268l19.90253,0l0,19.09268zm0,-39.48112l0,6.31543l-19.90253,0l0,-7.77286c0,-23.45735 26.69424,-27.17406 26.69424,-43.83023c0,-7.60336 -6.79172,-13.43297 -15.69612,-13.43297c-9.21872,0 -17.31352,6.79367 -17.31352,6.79367l-11.32195,-14.0807c0,0 11.15999,-11.65153 30.41292,-11.65153c18.29469,0 35.27467,11.32766 35.27467,30.41285c0.0097,26.71156 -28.14772,29.78053 -28.14772,47.24634z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/flowchart.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/flowchart.json index 335e17b..ca878f3 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/flowchart.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/flowchart.json @@ -17,4 +17,4 @@ "punched_tape": "m1.00047,30.80047l0,0c0,16.45808 33.35479,29.8 74.50001,29.8c41.1452,0 74.49998,-13.34192 74.49998,-29.8l0,0c0,-16.45809 33.3548,-29.8 74.50002,-29.8c41.14522,0 74.49998,13.34192 74.49998,29.8l0,238.4c0,-16.45808 -33.35477,-29.80002 -74.49998,-29.80002c-41.14522,0 -74.50002,13.34193 -74.50002,29.80002c0,16.45807 -33.35478,29.79999 -74.49998,29.79999c-41.14522,0 -74.50001,-13.34192 -74.50001,-29.79999z", "wave": "m1,37.20809c99.33355,-125.42461 198.66708,125.4246 298.00061,0l0,225.76426c-99.33353,125.42462 -198.66706,-125.42459 -298.00061,0z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/game.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/game.json index ebad41f..62cd1f4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/game.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/game.json @@ -10,4 +10,4 @@ "chess_queen": "m59.54884,298.46313c-11.18457,2.51251 -19.80814,-14.30008 -5.94004,-16.129c12.20336,0.23074 -3.0349,-11.94995 7.98012,-16.05304c12.67021,-12.36537 25.23749,-25.26018 33.3575,-41.17609c-4.09126,-5.42482 -10.84344,-10.60782 -9.96117,-18.03085c7.964,-2.71161 19.82806,-0.87375 20.29981,-13.44502c7.24239,-22.68985 9.1741,-46.67986 10.76167,-70.3136c-7.99255,-6.33596 -24.45116,-0.33371 -35.62089,-3.56097c-16.94488,-4.5746 6.31873,-13.33291 13.78075,-12.6113c6.70493,0.01006 16.63324,-4.12222 5.41084,-7.2804c9.46686,-0.43687 23.08297,-12.44518 7.51486,-16.77373c11.54188,-8.28655 2.64816,-26.31929 -2.17102,-36.68976c-7.265,-12.52285 -19.21146,-21.59242 -32.71435,-26.42871c-2.18616,-12.77 18.63421,-8.99565 27.07909,-9.65835c12.78728,0.48775 25.82639,-0.15282 36.96732,-7.11507c15.05278,-6.96464 27.8495,4.65901 41.61934,7.11611c13.92807,0.89699 28.41634,-2.50577 41.97807,1.44028c4.20209,2.98911 11.18788,7.71034 2.77457,9.97613c-16.06789,8.94404 -31.07338,22.15693 -35.10127,40.92605c-6.0766,10.44077 4.6955,19.50048 -5.15381,26.98807c-0.10249,8.80961 22.85634,10.04067 10.00395,14.37878c8.80815,4.77542 27.69864,1.76332 29.62625,12.3696c-7.99612,6.2903 -19.2092,3.80788 -28.79007,4.39512c-3.2489,1.10706 -11.41316,-2.70125 -10.17032,2.89742c-0.6366,25.08775 5.87923,49.75521 12.1806,73.83221c0.00804,11.79608 29.09497,5.10777 12.92737,18.49597c-11.94247,10.28146 5.56685,24.68452 11.63272,33.82986c8.25099,10.03221 22.89711,15.11021 21.67468,29.8362c8.40468,0.60507 18.40166,13.69095 6.78131,16.95151c-62.8902,1.31946 -125.82766,2.22778 -188.72791,1.83258z", "chess_rock": "m70.40736,299.11804c-15.60727,2.87628 -15.90823,-19.81082 -1.8931,-20.53482c-4.2011,-9.73361 -0.98556,-21.67557 5.22356,-30.68398c8.90442,-15.05035 22.29623,-30.00999 19.52936,-48.8515c-0.95786,-9.8022 -13.10349,-27.37677 5.72565,-24.85997c5.09087,-9.77498 2.13017,-24.16621 5.9483,-35.39389c3.33424,-21.28385 10.75552,-43.9948 2.86147,-65.09612c-4.97705,-11.23243 -17.62387,-18.62589 -16.26645,-32.35733c-1.42947,-13.39034 -0.95647,-26.88279 0.60455,-40.23392c6.07738,0.50975 12.84039,-1.27954 18.38155,1.475c-0.04153,12.96106 12.26991,10.08973 10.7935,-0.92486c3.23881,-1.28251 8.60017,-0.18413 12.6562,-0.55014c18.03256,0 36.06522,0 54.09778,0c-2.06311,7.51434 3.5195,17.19948 10.5887,8.35272c-1.93379,-11.75267 14.25911,-7.86334 10.37854,2.24694c0.22855,13.39515 1.87041,27.25403 -1.89201,40.29753c-6.12787,5.2086 -6.22449,15.45995 -13.90137,21.60233c-6.16908,11.51656 -3.45045,25.43306 -2.7644,37.9428c2.61279,18.51363 6.92676,36.79671 8.00221,55.52328c-0.76923,10.18126 20.18948,7.18474 11.15244,19.71645c-9.87662,8.41151 -4.0954,22.61668 -0.18413,32.66171c7.71916,17.36203 23.99019,32.95758 21.5343,53.32025c-1.94743,8.89606 14.16618,5.88821 9.97758,17.34372c-0.12151,14.11871 -21.10172,5.04239 -30.39526,8.00793c-46.7146,0.56656 -93.44374,1.44144 -140.159,0.99585z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/math.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/math.json index 156cdd9..5577b90 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/math.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/math.json @@ -5,4 +5,4 @@ "times": "m1.00089,73.36786l72.36697,-72.36697l76.87431,76.87368l76.87431,-76.87368l72.36765,72.36697l-76.87433,76.87431l76.87433,76.87431l-72.36765,72.36765l-76.87431,-76.87433l-76.87431,76.87433l-72.36697,-72.36765l76.87368,-76.87431l-76.87368,-76.87431z", "plus": "m1.00211,102.40185l101.39974,0l0,-101.39975l95.45412,0l0,101.39975l101.3997,0l0,95.45412l-101.3997,0l0,101.3997l-95.45412,0l0,-101.3997l-101.39974,0z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/music.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/music.json index 0d10878..74e60d5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/music.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/music.json @@ -18,4 +18,4 @@ "note_half": "m126.15042,298.46863c-16.82465,-2.00256 -23.94094,-21.72537 -20.50175,-36.48892c5.91676,-23.32147 29.06407,-39.43811 52.28738,-42.05833c8.81128,-0.72736 18.52644,-0.60411 25.78337,4.94891c5.95566,-2.36537 1.76544,-11.69408 2.85246,-17.2854c0,-68.81003 0,-137.6201 0,-206.43012c14.97716,-2.18183 5.30603,19.02521 7.94768,27.71113c-0.09924,75.95386 0.62134,151.91534 -0.76007,227.86198c-7.30341,28.38443 -39.39244,46.36703 -67.60907,41.74075zm2.8452,-12.40747c22.98492,-7.3089 44.37535,-22.56259 55.31068,-44.49013c0.95541,-13.55527 -16.00528,-10.73553 -23.6718,-6.15868c-13.5024,6.76553 -26.21068,15.65268 -36.74068,26.51123c-6.99238,6.4256 -15.89267,26.17618 0.78696,25.05563l2.30408,-0.3252l2.01074,-0.59286l0,0z", "note_whole": "m130.51953,195.65829c-18.47874,-2.9818 -38.13104,-9.41365 -49.81914,-24.96915c-4.87284,-6.5025 -6.85786,-14.78229 -6.23731,-22.81049c-0.81288,-10.41815 5.23877,-19.78279 13.11027,-26.04227c15.71593,-12.69998 36.4436,-17.12403 56.18739,-18.21444c21.01479,-0.84168 42.85126,2.6237 61.20964,13.32044c11.19275,6.86285 21.10484,18.66567 20.54733,32.45548c0.612,8.09668 -0.91914,16.68852 -6.59294,22.84065c-11.24144,13.63681 -28.92738,19.59387 -45.72455,22.87505c-14.06622,2.54445 -28.55254,2.69426 -42.68069,0.54472zm34.33258,-7.95905c9.06644,-1.9348 15.01314,-11.03741 14.88672,-20.03276c1.54852,-18.89767 -4.73529,-39.56404 -20.09192,-51.52234c-8.61502,-6.06224 -20.8895,-6.65757 -30.00668,-1.42353c-6.79661,4.10276 -9.33514,12.23845 -9.31819,19.7824c-0.73656,16.04378 3.97748,32.8201 14.66045,45.0217c7.49542,7.87076 19.3475,12.08484 29.86963,8.17453z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/nature.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/nature.json index 799643e..23087c6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/nature.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/nature.json @@ -19,18 +19,18 @@ "shark": "M 0.0576 184.3533 C -1 180.6667 16.109 171.9119 28.5757 164.4365 C 38.4736 158.5251 49.2812 151.3596 59.5749 145.0374 C 68.1791 139.7532 87.1667 130.8333 89.3069 125.0559 C 91.8073 118.3062 96.2785 105.8677 101.081 96.5857 C 104.7343 89.4927 111.6667 80.1667 115.4351 80.0032 C 116.8965 79.9398 118.1484 83.3223 118.1484 83.3223 C 118.1484 83.3223 122.1099 105.8601 130.8815 116.7246 C 134.3825 121.0713 144.5294 120.8968 148.261 120.6279 C 173.1667 118.8333 205.8755 122.4387 205.8755 122.4387 C 205.8755 122.4387 216.5042 115.1404 218.2813 114.3643 C 222.787 112.4434 218.2767 117.0532 229.4009 125.4153 C 235.5 130 238.8499 128.6677 243.6637 127.1807 C 245.6044 126.5642 246.7613 124.552 248.3672 123.3879 C 250.4222 121.9041 291.7726 94.0098 295.9696 92.7549 C 300.1667 91.5 299.9836 99.5272 299.2917 101.4797 C 291.6667 123 270.9678 137.8057 270.9678 137.8057 C 270.9678 137.8057 269.3696 140.9553 270.0887 144.2822 C 270.7395 147.3027 281.8333 169.5 276.0176 168.1533 C 273.6004 168.4127 267.6419 165.6692 267.6419 165.6692 C 267.6419 165.6692 261.6635 162.3462 257.3862 157.6331 C 254.3608 154.2813 252.5989 149.0752 252.5989 149.0752 C 252.5989 149.0752 251.2239 144.8431 247.1571 143.6204 C 237.3333 140.6667 229.9983 144.0425 227.4753 146.9565 C 225.3138 149.4482 226.6418 153.6443 226.6418 153.6443 C 226.6418 153.6443 229.6977 156.9539 227.8292 157.125 C 219.7236 157.823 215.9372 151.9265 210.3013 148.6626 C 208.3377 147.5349 205.3333 145.6667 200.2473 149.5073 C 197.6903 151.4382 195.8333 161.3333 191.8562 164.625 C 189.1771 166.8424 184.8923 164.2864 184.8923 164.2864 C 184.8923 164.2864 178.3735 162.0303 173.7651 161.9048 C 152.75 172.25 114.5828 181.7512 114.5828 181.7512 C 114.5828 181.7512 119.6706 187.7639 122.3383 191.9104 C 123.6625 193.978 123.6093 195.7603 123.6093 195.7603 C 123.6093 195.7603 124.9374 198.5923 122.1708 198.9861 C 120.5306 199.2144 104.5744 196.5801 96.0502 193.2532 C 88.873 190.4495 83.203 186.3447 83.203 186.3447 C 83.203 186.3447 57.0849 188.4819 40.3333 189.1667 C 30.5761 189.551 1.5102 189.4165 0.0576 184.3533 Z", "dolphin": "M151.054, 51.526c-5.487, 2.029-10.494, 4.734-15.541, 7.145c-1.72, 0.821-3.674, 2.126-5.268, 2.525c-4.062, 1.013-10.418-0.759-15.596-0.944c-12.942-0.459-21.321, 0.493-31.96, 2.097c-4.979, 0.749-10.134, 1.451-14.504, 2.732c-3.733, 1.095-8.013, 3.542-12.19, 5.6c-6.601, 3.253-11.097, 6.316-16.244, 10.238 c-8.603, 6.551-14.019, 14.798-20.314, 23.859c-2.749, 3.955-6.708, 9.848-6.905, 14.528c-3.639, 5.515-9.168, 8.882-10.555, 16.955c1.939, 4.721, 6.964, 0.523, 9.992-1.049c2.504-1.304, 5.198-2.862, 7.417-3.487c11.533-3.251, 27.605, 1.396, 38.834-1.583c3.98-1.055, 7.428-3.185, 11.382-4.087c3.755-0.859, 6.627, 0.662, 9.304, 1.818c1.422, 0.616, 2.92, 1.45, 4.212, 2.113 c8.366, 4.323, 16.728, 8.906, 27.96, 10.632c9.015, 1.383, 16.847-1.256, 24.175-2.682c1.86-0.363, 4.263-0.231, 5.674-1.819 c-5.849-1.321-10.703-3.574-16.811-5.979c-8.023-3.156-14.255-5.291-17.287-11.627c3.591-0.94, 7.75-0.243, 11.488, 0.412 c4.082, 0.712, 8.133, 1.381, 12.05, 2.025c16.539, 2.723, 28.995, 7.294, 41.585, 13.224c6.116, 2.877, 11.752, 6.886, 16.936, 10.251 c10.617, 6.9, 19.68, 15.468, 28.228, 24.802c3.869, 4.226, 7.325, 9.518, 11.521, 14.562c1.834, 2.205, 3.678, 4.665, 5.638, 7.388 c1.873, 2.587, 4.731, 5.758, 5.127, 8.021c0.446, 2.499-0.881, 5.239-1.549, 7.97c-1.155, 4.744-2.007, 9.833-1.62, 14.704 c0.506, 6.3, 1.914, 12.436, 4.866, 17.209c1.281-1.139, 1.804-3.144, 2.464-4.98c3.236-4.136, 7.541-8.267, 7.648-15.15 c8.839, 4.568, 26.008, 4.185, 36.316, 4.066c3.099-0.036, 6.256, 0.292, 8.823-0.913c-5.414-3.138-9.388-7.109-14.094-11.163c-7.12-6.125-13.009-11.285-23.505-14.562c-3.402-1.062-7.297-1.637-9.161-3.605c-1.433-1.506-1.869-4.842-2.596-8.055 c-1.955-8.687-4.497-17.904-6.765-25.215c-6.806-21.976-17.194-41.507-31.015-56.675c-7.004-7.692-15.368-13.956-24.386-20.921 c-1.541-2.416-4.428-5.675-5.024-9.359c-0.61-3.793, 0.49-7.122, 2.834-9.67c5.128-3.742, 13.185-4.156, 16.669-9.757 c-4.555-3.279-10.207-4.24-15.753-4.776C171.573, 47.185, 160.348, 48.085, 151.054, 51.526z", "he_hen": "m176.04681,296.29803c-8.82596,-3.77927 -18.43298,1.74493 -27.86224,-3.75964c7.62581,-0.4744 19.08463,-0.03574 17.06104,-11.34488c3.33665,-13.20654 -3.43475,-27.06163 2.20258,-38.55534c-8.82878,-8.42361 -18.09561,-18.39673 -22.80272,-30.16238c-0.9447,4.74663 -1.81537,8.52257 -3.158,0.33916c-0.76965,-4.00471 -0.30261,9.89931 -3.24527,0.14346c-3.10373,-8.67493 -11.4597,-31.29446 -14.05236,-10.31462c-1.0768,10.8262 -4.45592,3.14465 -6.0004,-3.72562c-1.56924,-13.22943 -7.23737,-25.48523 -8.72193,-38.68883c5.80227,-8.36407 -0.82715,-9.5029 -3.91098,-1.15848c-3.39584,13.23767 -6.30494,26.33923 -2.7624,39.9769c-4.70789,3.85124 -13.79493,-17.92216 -9.61541,-26.27414c3.62592,-9.45018 2.81974,-19.09607 3.42313,-25.48878c3.31529,-7.21146 -3.22571,-15.04807 0.25123,-22.73853c-8.88477,9.68631 -16.83011,16.38615 -14.33428,31.58234c-1.10283,3.79079 3.703,25.58844 0.64231,17.56184c-5.77861,-15.66916 -5.78305,-33.02271 -1.43442,-49.01125c0.00535,-12.20366 -9.89253,21.0744 -9.16187,4.76299c-0.93676,-12.30159 4.13303,-25.82869 8.93452,-35.55499c-5.46675,-6.50523 -23.17289,-1.89566 -14.79648,-15.70558c8.24343,-7.01884 7.35999,-16.67057 -3.85936,-8.18394c-17.3246,12.72424 -31.69814,29.07174 -47.58007,43.52234c15.25898,-19.61487 32.46107,-38.59572 53.7519,-51.75492c20.64337,-12.99951 50.5769,-14.34346 68.38963,4.28573c4.53072,7.97979 15.06177,13.26968 17.57275,20.45337c-1.84586,10.76744 5.10652,16.10654 5.85289,25.57021c4.38731,7.30244 -3.95828,20.43125 8.52597,16.64671c14.20137,-0.01996 33.63664,-3.16645 34.74754,-20.87874c5.66772,-25.50935 8.27689,-54.0092 26.4256,-74.31131c10.08655,-5.89642 3.82147,-4.32716 -3.54926,-5.29837c-6.51613,-7.58361 6.57724,-19.75743 13.02319,-21.14511c-1.112,-17.9227 10.53479,10.74471 13.86426,-2.41437c4.99586,0.09501 7.43144,12.08141 10.46855,2.29789c9.05719,7.66376 18.6297,19.25661 6.66562,29.92943c13.61102,6.52517 -13.86911,2.29947 -2.14532,12.29652c9.6759,9.35194 2.83621,26.62759 -5.10654,34.15639c-0.3085,5.66077 9.31277,13.88494 11.24728,20.75249c9.99454,19.34809 11.9986,42.36646 8.16797,63.56847c-5.39346,19.98318 -25.46588,28.67906 -39.65833,41.37386c-12.12337,9.93893 -7.85776,27.37115 -13.59781,40.42342c0.57072,7.5369 4.77751,16.1196 10.7547,20.66925c8.66214,4.84064 18.81006,7.96561 25.81393,15.05286c-6.39667,3.34055 -19.43893,-10.21753 -19.56508,0.39017c-9.50252,-12.34393 -23.7677,-4.06104 -34.21234,-13.55405c8.69193,1.65643 19.99033,0.8027 10.47188,-9.61145c-3.75841,-8.80696 -15.07852,-11.84618 -15.37883,-22.49022c-10.66643,6.69647 -17.92447,15.81358 -25.66988,24.90395c-12.85808,-0.80322 -13.41248,25.11618 0.47165,24.73163c5.7019,1.45825 27.10161,9.40335 10.25006,7.35107c-5.02289,-0.89746 -10.47203,-4.04099 -10.31842,1.85727c-2.30338,-0.41431 -4.35982,-1.56003 -6.48019,-2.47418z", - "hen": "m131.70792,299.20142c-2.65045,-8.04401 -50.59061,2.01245 -25.50379,-8.40613c9.71836,-2.24731 29.67359,0.57056 9.8335,-5.50568c22.5928,7.62228 32.60569,-19.08859 34.06422,-37.09636c-21.02885,-6.55212 -24.67069,-31.02429 -46.83106,-37.61485c-16.88445,-13.23645 -41.63732,-12.83168 -52.35418,-33.24014c-10.17476,-18.17259 -4.4284,-40.29292 -2.74405,-59.92338c4.00956,-20.72375 12.14967,-41.69897 10.53991,-62.75727c-16.41068,9.44812 -22.4106,-11.67328 -22.78485,-18.27062c-12.07958,3.08904 -19.7317,3.22594 -6.59584,-7.5194c5.87008,-8.14037 8.78346,-25.92081 18.16113,-23.25189c2.47408,-10.763 9.04029,4.89351 16.30021,-4.61621c4.44867,3.35889 13.85731,7.10325 3.42817,13.02555c18.83147,9.50194 34.07959,23.95835 41.92437,42.43233c7.86127,18.77559 23.52317,39.06593 48.8149,33.98585c22.90038,3.93186 49.73083,-9.80992 48.68822,-32.86776c0.44391,-16.33654 16.52325,-54.48924 38.19395,-35.09801c16.24046,6.22802 34.92778,21.65468 31.09642,39.16159c-2.21887,18.0508 -0.50452,36.25767 1.60162,54.45551c-13.60181,10.0825 -11.15982,27.59631 -20.65894,40.7838c7.8804,18.56862 0.29095,38.62871 -12.60841,53.70848c-12.90314,13.89935 -31.76248,26.24356 -52.66508,24.4381c-7.98578,13.29396 9.42929,24.99069 15.57339,25.73553c-16.01053,-5.1321 -13.75549,4.70874 -8.47672,15.2244c4.94576,19.6875 -10.58037,-17.53909 -20.60904,0.27255c-7.77597,7.68976 -38.86531,10.29276 -13.69539,1.07587c21.48048,-7.96875 -24.12099,-12.95142 -13.99879,5.00586c3.34996,7.49203 22.77361,10.79092 2.32814,7.93628c-9.02753,-4.74515 -13.85625,12.10397 -21.02202,8.92599zm43.09088,-34.62769c7.8596,-9.56569 10.12141,-37.24054 -6.87671,-17.06372c-13.43553,10.88889 -18.29311,29.6301 6.87671,17.06372z", + "hen": "m131.70792,299.20142c-2.65045,-8.04401 -50.59061,2.01245 -25.50379,-8.40613c9.71836,-2.24731 29.67359,0.57056 9.8335,-5.50568c22.5928,7.62228 32.60569,-19.08859 34.06422,-37.09636c-21.02885,-6.55212 -24.67069,-31.02429 -46.83106,-37.61485c-16.88445,-13.23645 -41.63732,-12.83168 -52.35418,-33.24014c-10.17476,-18.17259 -4.4284,-40.29292 -2.74405,-59.92338c4.00956,-20.72375 12.14967,-41.69897 10.53991,-62.75727c-16.41068,9.44812 -22.4106,-11.67328 -22.78485,-18.27062c-12.07958,3.08904 -19.7317,3.22594 -6.59584,-7.5194c5.87008,-8.14037 8.78346,-25.92081 18.16113,-23.25189c2.47408,-10.763 9.04029,4.89351 16.30021,-4.61621c4.44867,3.35889 13.85731,7.10325 3.42817,13.02555c18.83147,9.50194 34.07959,23.95835 41.92437,42.43233c7.86127,18.77559 23.52317,39.06593 48.8149,33.98585c22.90038,3.93186 49.73083,-9.80992 48.68822,-32.86776c0.44391,-16.33654 16.52325,-54.48924 38.19395,-35.09801c16.24046,6.22802 34.92778,21.65468 31.09642,39.16159c-2.21887,18.0508 -0.50452,36.25767 1.60162,54.45551c-13.60181,10.0825 -11.15982,27.59631 -20.65894,40.7838c7.8804,18.56862 0.29095,38.62871 -12.60841,53.70848c-12.90314,13.89935 -31.76248,26.24356 -52.66508,24.4381c-7.98578,13.29396 9.42929,24.99069 15.57339,25.73553c-16.01053,-5.1321 -13.75549,4.70874 -8.47672,15.2244c4.94576,19.6875 -10.58037,-17.53909 -20.60904,0.27255c-7.77597,7.68976 -38.86531,10.29276 -13.69539,1.07587c21.48048,-7.96875 -24.12099,-12.95142 -13.99879,5.00586c3.34996,7.49203 22.77361,10.79092 2.32814,7.93628c-9.02753,-4.74515 -13.85625,12.10397 -21.02202,8.92599zm43.09088,-34.62769c7.8596,-9.56569 10.12141,-37.24054 -6.87671,-17.06372c-13.43553,10.88889 -18.29311,29.6301 6.87671,17.06372z", "mythic_unicorn_2": "m182.0204,297.85391c-5.77818,-7.90314 -14.7635,-8.80438 -16.9241,-20.05347c-1.69348,-6.11859 -17.65829,-14.32483 -8.20955,-3.3428c7.2961,6.61768 15.96432,31.02682 -1.98563,23.31473c-13.65228,-5.01041 -14.2377,-20.48209 -17.89716,-32.06519c-11.90031,-8.25644 3.07674,-25.71408 -9.73651,-36.29276c-10.87482,-11.04288 -3.30119,-31.72456 -18.8404,-39.55457c-7.79965,-3.16566 -11.1757,18.69177 -12.48895,2.70163c-4.27309,-16.17242 -19.36451,7.86156 -29.42789,5.31358c-8.12057,-0.70595 13.58361,-6.35143 3.22626,-7.87068c-6.08933,3.33348 -11.72343,9.09727 -12.68681,-0.44351c-7.3251,-4.35046 -22.68599,-11.29797 -22.28696,-18.20909c6.3611,-1.99829 27.83545,3.78387 24.11403,-4.25029c-6.38573,-2.42343 -7.54573,-9.04803 0.27553,-4.60205c15.41352,0.48352 33.48255,-5.66917 46.30758,6.09853c6.68958,4.11612 13.26701,18.87857 16.84827,4.53223c11.5443,-13.92389 34.83883,-15.10329 41.95536,-33.13124c1.72211,-8.72215 -5.28903,-13.69839 -11.24521,-15.46512c-1.15878,-2.86641 -3.13139,-15.03612 -8.05675,-8.8949c0.22449,-5.37502 4.84473,-18.22859 -5.38927,-12.53831c-1.03801,-11.44846 8.74879,-22.87025 -4.19783,-31.20716c12.13029,2.25027 9.73825,-11.57887 7.09616,-13.77212c7.19073,-1.02106 15.62939,-7.49186 11.66467,-15.50808c7.80894,14.17675 8.07971,-17.19902 14.50877,-3.67512c11.83272,1.93988 -3.67599,-10.57163 7.20721,-7.77902c6.21443,0.21264 4.83423,-6.80917 10.41692,-1.50957c7.3886,-4.03149 -5.66409,-16.21531 6.26559,-7.74985c4.01033,3.484 16.77809,12.60911 14.48726,0.56772c11.33586,12.0923 20.25659,-11.23169 29.67625,-16.06186c3.73633,-4.47003 11.8613,-9.20071 4.36795,-0.66791c-4.97461,10.87669 -21.85179,22.64296 -17.31131,33.45053c-4.10985,3.74163 8.29224,8.44421 -1.58034,7.02768c-5.8488,6.31351 7.84134,18.1257 8.93388,28.06219c-3.13588,6.80826 -15.07657,14.53744 -19.90688,14.29315c1.76543,-8.76564 -2.06178,-20.19066 -13.24036,-15.23595c6.26202,11.45789 14.72818,22.40379 20.03253,34.86404c5.18462,12.24902 13.59059,26.39416 24.64981,10.62966c7.04883,-10.04763 27.18559,-9.90218 21.65419,6.41521c-2.82767,16.0232 4.74286,37.1706 -9.80374,48.20794c-8.77531,16.90973 -18.50392,-6.2874 -11.60965,-15.06308c-1.75673,-2.50781 -3.11575,-4.27809 2.02489,-7.7061c-1.06146,-2.57137 14.7939,-12.24554 6.80286,-18.18176c-9.0885,10.30594 -22.38708,22.23511 -18.69125,37.55475c2.99957,10.26601 -21.73944,27.86615 -19.76117,10.82875c0.44312,-6.62131 9.89648,-19.45415 7.72044,-21.10741c-6.90181,12.95006 -16.71997,25.39136 -31.55621,29.23625c-12.34084,0.73132 -18.80547,10.66779 -12.94504,21.69241c1.11998,15.62238 -7.12646,29.76141 -9.02499,44.972c3.52914,16.13283 25.01552,19.39287 27.93198,35.84959c5.01138,11.05234 -7.52405,9.41898 -13.36446,6.32639zm-30.55545,-48.12944c-1.80891,-7.29253 -5.53151,18.95699 -0.94273,5.02481l0.68695,-2.46143l0.25578,-2.56339z", - + "rhino":"M 31.2973 189.1916 C 30.374 186.1509 30.2876 182.8892 30.2876 182.8892 C 30.2876 182.8892 18.6488 172.7592 12.9338 167.0182 C 8.1162 162.1747 0.1206 148.2926 0.1206 148.2926 C 0.1206 148.2926 -0.3045 144.7842 0.4415 144.6859 C 1.6515 144.5302 7.9245 150.0048 14.0462 153.201 C 20.3518 156.4936 27.5875 158.6592 27.5875 158.6592 L 35.5018 158.6592 C 35.5018 158.6592 29.0012 141.5758 37.34 143.8147 C 40.3528 144.0688 42.0178 150.5315 46.6067 151.2422 C 51.9836 149.9209 54.6313 134.4272 54.6313 134.4272 C 54.6313 134.4272 52.9961 131.5424 53.0697 128.803 C 53.129 126.9918 54.9114 124.9244 54.9114 124.9244 C 54.9114 124.9244 51.1096 125.5576 48.5035 124.7196 C 46.155 123.9635 42.5672 121.0233 41.6173 118.8496 C 40.4416 116.1589 40.7466 113.1821 39.4977 111.4715 C 39.3738 110.1291 41.1021 109.6715 42.02 110.3015 C 45.4753 112.6733 50.0547 112.9256 51.043 113.4111 C 55.1783 115.443 62.1528 115.7264 63.1698 115.3193 C 54.0175 103.9211 65.6289 101.5547 67.2467 101.3131 C 69.2713 103.514 72.3221 106.16 73.1967 108.5642 C 74.3559 110.0273 74.2616 107.9475 74.2616 107.9475 C 74.2616 107.9475 74.3209 101.8131 76.9637 97.2195 C 77.5729 96.1479 80.9405 92.7265 83.1856 92.4271 C 83.9995 92.3186 85.7254 92.0741 87.5618 90.4255 C 92.2537 86.2132 105.0561 86.9177 105.0561 86.9177 C 105.0561 86.9177 106.0924 87.3971 108.0301 87.3889 C 109.7409 87.3788 139.8456 85.6026 152.1574 90.03 C 160.433 93.0059 175.2345 92.1159 193.0635 87.0243 C 198.6909 85.4173 214.9442 85 214.9442 85 C 214.9442 85 221.0913 85.3409 226.0806 87.0274 C 233.8591 89.6567 248.6718 88.6388 257.7491 89.6018 C 261.2524 89.9747 267.9599 93.2576 273.5101 96.3221 C 290.9601 105.9565 301.1294 127.5316 299.8999 134.8799 C 297.5037 149.2014 283.2316 173.735 276.9266 184.5226 C 274.3758 188.8869 273.0623 195.5137 273.6205 200.5527 C 273.7831 202.0202 271.6895 205.6906 267.7195 208.1928 C 262.1246 211.7193 266.3419 216.8904 266.8591 219.2671 C 267.3741 221.6376 267.2024 224.6782 265.6837 225.3544 C 264.1713 226.0263 242.5547 229.81 241.9206 224.7663 C 238.7548 219.072 254.3001 210.4229 252.5226 200.3702 C 247.4359 193.6818 246.2545 178.7816 245.4402 176.4947 C 244.5885 166.2041 227.9237 182.3253 219.5206 185.6245 C 195.3696 195.1066 168.116 190.8322 165.9726 190.0358 C 163.0314 198.9738 166.1362 203.3924 166.3365 204.4804 C 165.6754 210.5755 172.1837 220.3454 173.6375 226.3336 C 174.8277 231.1329 154.4893 231.1329 148.9116 230.9416 C 144.3201 229.7082 151.2226 220.7226 152.3475 219.7199 C 153.8791 212.0003 145.337 205.08 145.337 205.08 C 145.337 205.08 144.7269 212.0003 143.029 217.8104 C 143.0998 220.549 145.8231 222.5392 146.2197 224.9814 C 146.6408 227.5896 144.6581 227.9297 144.6581 227.9297 C 144.6581 227.9297 129.0663 230.7259 125.1382 227.4769 C 123.1681 226.8586 121.4508 227.8662 120.0711 226.7946 C 119.1125 226.0447 120.6945 221.7545 121.8821 220.5681 C 122.8979 219.5479 129.6764 219.3277 129.7289 211.1167 C 128.0493 196.5313 114.2192 190.4252 113.1891 184.7516 C 106.4906 187.3721 99.4475 182.4468 99.4475 182.4468 C 99.4475 182.4468 97.6059 184.5796 95.5782 184.9831 C 93.9512 185.3028 87.9826 181.4695 85.9838 179.2361 C 85.3387 187.9827 78.1289 185.6491 78.1289 185.6491 C 78.1289 185.6491 75.58 189.9465 71.5288 192.0231 C 61.5427 197.142 59.7122 196.7349 55.59 200.6408 C 53.2684 202.8405 49.1881 199.5904 46.4922 200.6021 C 36.7298 204.2658 30.8317 199.5844 31.2973 189.1916 Z", - + "tree": "M 27.2254 74.2515 C 25.9396 74.2515 25.2787 72.9597 25.2787 71.4106 C 25.2787 70.1191 25.6091 68.8652 26.5645 68.8652 C 27.2254 68.8652 28.2203 70.1191 28.5507 71.4106 C 29.2116 73.291 28.5507 74.2515 27.2254 74.2515 ZM 247.0194 147.96 C 249.9611 147.96 250.6219 148.2913 248.9661 150.5051 C 248.0107 152.0542 246.0245 153.3457 245.0691 153.3457 C 244.0743 153.3457 243.0829 152.0542 243.0829 150.5051 C 243.0829 148.918 244.4083 147.96 247.0194 147.96 ZM 41.6425 57.7979 C 38.7009 57.1711 38.3704 53.9971 41.6425 53.0388 C 43.2982 52.7437 44.2537 53.6655 44.2537 55.5842 C 44.2537 57.1711 43.2982 58.0933 41.6425 57.7979 ZM 4.9748 158.0671 C 8.9113 157.1448 8.9113 156.4819 7.586 154.3042 C 6.5946 152.719 6.2642 150.8005 6.9251 150.1736 C 7.2555 149.2136 8.9113 150.1736 9.8667 152.0542 C 11.192 154.5996 12.1833 154.9329 14.7945 153.3457 C 16.4144 152.3875 17.7361 151.759 17.7361 152.719 C 17.7361 153.3457 18.731 152.719 20.0168 151.4275 C 22.0031 149.5469 22.3335 145.4146 20.3473 143.2007 C 18.731 141.3201 10.5276 141.947 8.2469 144.1589 C 6.9251 145.7461 5.9302 145.4146 4.6444 142.574 C 2.6582 137.8508 2.6582 137.1877 7.2555 136.8926 C 11.192 136.8926 11.192 136.8926 7.9164 134.9741 C 6.2642 134.0518 4.6444 132.1335 4.6444 130.8796 C 4.6444 127.7058 9.2058 125.8252 11.192 128.0391 C 11.8529 128.9612 13.1388 129.9197 14.4641 129.9197 C 17.0753 129.9197 29.542 119.1853 29.542 116.9714 C 29.542 116.0115 30.8314 115.3848 32.1532 116.0115 C 33.773 116.3447 36.7147 115.3848 39.6958 113.7976 C 43.9232 111.2524 43.9232 110.957 41.6425 106.8264 C 40.0262 103.9858 38.04 103.0256 33.4426 103.0256 C 28.2203 103.0256 26.895 103.6526 25.2787 107.4534 C 24.6142 109.9985 22.6281 111.8792 21.3422 111.8792 C 19.0615 111.8792 18.4006 109.0403 20.6813 107.4534 C 21.6726 106.8264 22.3335 104.6128 22.3335 102.3989 C 22.3335 98.9312 21.6726 98.3044 17.4057 99.2268 C 13.1388 99.8535 13.1388 99.5581 14.1336 94.7988 C 14.7945 91.9583 15.7499 89.4131 16.4144 89.1177 C 17.0753 88.7864 17.7361 85.9456 17.7361 83.105 C 17.7361 77.4233 19.6864 76.4651 23.2925 80.5596 C 24.9446 82.7734 25.9396 83.105 26.5645 81.1863 C 27.2254 79.9326 29.542 79.6372 33.1481 80.2639 C 38.04 81.5178 38.3704 81.1863 37.7095 77.4233 C 37.3791 75.2097 37.0451 72.6643 36.7147 72.0376 C 36.7147 71.0791 35.0984 69.8237 33.1481 68.8652 C 29.2116 67.2786 28.2203 63.4795 31.8228 63.4795 C 32.8177 63.4795 33.773 62.8525 33.773 61.5969 C 33.773 60.6384 35.7593 60.0117 38.3704 60.3052 C 41.9765 60.6384 43.9232 59.3833 48.851 52.7437 C 52.4571 47.9844 55.0682 45.4392 55.3987 46.7307 C 55.7291 48.3159 57.3849 49.238 59.0047 49.238 C 61.6159 49.238 61.9464 48.3159 60.991 44.1853 C 60.657 41.3445 59.0047 37.8772 58.0099 36.29 C 55.0682 32.7849 55.0682 28.6904 58.0099 29.9438 C 60.3265 31.1995 67.535 27.7319 67.535 25.5181 C 67.535 24.5581 68.494 23.9312 69.8157 23.9312 C 71.1411 23.9312 71.766 25.8496 71.766 28.3589 C 71.766 31.531 72.4269 32.7849 74.0827 31.8625 C 75.3685 31.1995 76.3635 29.3171 76.3635 28.0635 C 76.3635 24.2625 86.844 17.6228 89.4551 19.5051 C 90.4501 20.1323 91.4413 19.5051 91.7755 17.2915 C 92.7308 12.8638 98.6499 9.3962 101.261 11.6101 C 102.5864 12.5322 103.8723 12.2371 104.2063 11.2788 C 104.8671 10.0232 107.4783 9.0649 110.4199 8.7693 C 113.3615 8.438 117.298 7.1824 118.9538 5.8909 C 125.1674 1.7964 131.3847 2.0918 133.9958 6.5198 C 135.6516 9.6917 136.3124 9.6917 136.3124 7.4778 C 136.3124 4.637 137.6019 4.3057 145.4713 5.2642 C 157.9381 6.5198 159.8884 6.5198 164.4858 4.9326 C 167.4274 4.0103 168.4222 4.3057 168.4222 6.8508 C 168.4222 8.438 169.3777 9.6917 170.703 9.6917 C 171.6943 9.6917 172.6497 8.7693 172.6497 7.8093 C 172.6497 5.2642 177.9116 4.0103 182.5089 5.2642 C 186.0755 6.5198 186.4059 6.8508 185.4505 15.373 C 185.1201 20.4636 185.4505 23.9312 186.0755 23.9312 C 186.7363 23.9312 187.4008 21.7173 187.4008 18.5452 C 187.4008 13.1953 191.0033 10.9832 192.3286 15.373 C 192.6591 16.9583 193.6144 16.3313 194.2753 13.824 C 195.9312 7.1824 199.5372 10.6499 198.5422 17.9185 C 197.551 23.9312 197.551 23.9312 200.4926 21.7173 C 202.1483 20.759 203.4341 18.25 203.4341 16.6646 C 203.4341 15.0776 204.4291 13.1953 205.7509 12.5322 C 208.3619 11.2788 211.3072 16.0361 210.3482 19.5051 C 210.0178 21.0906 210.0178 22.3459 210.9731 22.3459 C 211.6376 22.3459 212.2985 21.4238 212.2985 20.759 C 212.2985 19.8367 213.9183 19.5051 215.9045 20.1323 C 220.1679 21.0906 220.7928 23.6357 217.1904 25.1848 C 216.235 25.8496 215.2401 27.3987 215.2401 28.6904 C 215.2401 30.9043 215.9045 30.9043 219.507 28.6904 C 225.3902 24.8914 228.0013 25.1848 228.9963 29.3171 C 229.6571 31.531 230.9465 32.491 232.2683 31.531 C 233.5936 31.1995 236.5352 32.491 238.816 34.7031 C 240.8022 36.5854 243.7438 38.1707 245.0691 38.1707 C 247.0194 38.1707 247.0194 39.7578 246.3549 44.1853 C 245.6941 48.9446 245.6941 49.5713 247.6803 47.6531 C 250.2914 44.5168 251.2828 44.812 252.2418 49.238 C 252.5722 51.4519 254.8888 53.0388 257.5 53.9971 C 260.4416 54.626 262.0615 56.2109 262.0615 58.0933 C 262.0615 60.0117 263.0527 62.2239 264.0477 63.4795 C 266.6589 65.6931 265.9944 72.3328 263.0527 74.5466 C 262.0615 75.2097 260.7721 74.8782 260.4416 73.9199 C 259.7808 72.9597 257.5 72.9597 253.233 73.9199 C 246.3549 76.1318 245.0691 76.7605 246.6854 79.6372 C 247.6803 81.5178 259.1198 80.8911 265.3694 78.6772 C 267.3197 77.7188 267.9806 78.6772 267.9806 83.105 C 267.9806 86.2769 267.3197 88.7864 266.3284 88.7864 C 265.6639 88.7864 265.039 89.7446 265.039 91.3315 C 265.039 95.1321 266.6589 94.7988 270.9258 90.373 C 273.2029 87.8279 274.5282 87.1992 276.1481 88.7864 C 277.8003 90.373 278.1343 90.373 278.1343 87.8279 C 278.1343 86.2769 277.4698 84.9873 276.4786 84.9873 C 275.8536 84.9873 275.1891 83.7317 275.1891 82.4778 C 275.1891 80.8911 276.1481 79.6372 277.4698 79.6372 C 278.4647 79.6372 279.7865 80.2639 279.7865 81.1863 C 279.7865 82.1467 281.0759 83.4001 282.7317 83.7317 C 285.0089 84.6919 285.6733 85.9456 285.3428 89.7446 C 284.6784 97.0127 286.0038 99.2268 290.8956 97.9731 C 293.2123 97.3442 294.498 97.9731 293.5068 99.2268 C 293.2123 99.8535 293.5068 101.4407 294.1677 102.1033 C 296.8183 103.9858 295.8234 108.4119 292.8818 108.4119 C 289.2758 108.4119 288.2844 109.9985 290.2348 112.8394 C 291.5565 114.4263 292.5514 114.72 293.8372 113.4663 C 296.8183 110.2942 297.4433 112.8394 297.7737 125.4939 C 297.7737 131.8379 298.4346 136.8926 299.0955 136.8926 C 300.7153 136.8926 300.0904 143.8655 297.7737 146.7061 C 296.4843 148.2913 296.4843 149.8403 297.4433 151.1318 C 299.7599 153.9727 297.4433 162.1995 294.498 162.1995 C 291.887 162.1995 286.9591 168.2122 286.9591 171.053 C 286.9591 174.5225 282.7317 171.053 281.7368 167.2539 C 280.7455 163.7864 280.7455 163.7864 280.081 166.2939 C 279.4561 169.1724 283.0262 178.0259 286.0038 180.5349 C 287.954 182.4536 284.348 185.6255 281.7368 184.334 C 280.4114 183.7073 279.7865 181.8267 279.7865 179.9082 C 279.7865 174.5225 271.5866 160.9456 265.3694 155.8552 C 262.0615 153.3457 259.1198 150.5051 259.1198 149.5469 C 259.1198 147.6284 248.6357 141.6516 242.7525 139.7332 C 239.4768 138.7732 238.4855 139.1064 238.4855 141.6516 C 238.4855 143.5322 237.8606 144.1589 236.5352 143.5322 C 233.5936 142.2783 232.2683 145.1194 234.8795 147.96 C 238.4855 151.4275 237.8606 155.5596 233.9241 153.9727 C 231.277 153.0144 230.9465 153.3457 231.9379 158.7319 C 232.2683 161.8679 232.9328 166 232.9328 167.8806 C 232.9328 169.7991 233.5936 171.053 234.2545 171.053 C 235.2136 171.053 235.5439 170.426 234.8795 169.4678 C 234.5491 168.5076 235.2136 167.5854 236.5352 167.5854 C 237.5302 167.5854 238.4855 168.8408 238.4855 170.0945 C 238.4855 171.3862 237.1962 172.6396 234.8795 172.3086 C 232.9328 172.3086 231.277 171.3862 231.277 170.7593 C 231.277 167.8806 222.4486 148.2913 219.8375 145.4146 C 216.8958 142.2783 218.8461 141.3201 195.6006 156.1865 C 191.9982 158.4004 188.0617 163.1594 186.0755 166.6272 C 184.4556 170.0945 181.8445 173.6001 180.5227 174.2268 C 179.1974 174.8538 174.3055 179.9082 170.0385 185.2942 C 151.6849 209.0139 154.666 211.8547 155.9519 260.2944 C 161.5082 297 161.5082 297 161.5082 297 C 148.4129 297 148.4129 297 148.4129 297 C 137.6019 297 137.6019 297 137.6019 297 C 138.5932 263.1331 138.5932 263.1331 138.5932 263.1331 C 139.254 260.2944 139.5881 254.5752 139.9186 251.4028 C 140.249 249.5205 130.7238 241.2937 131.0543 239.4133 C 131.0543 237.8264 140.9099 242.2542 140.9099 240.667 C 142.5297 217.574 140.9099 199.2021 136.6429 189.4246 C 135.6516 183.4116 127.4482 164.0818 126.1624 164.0818 C 125.8319 164.0818 123.5153 162.1995 121.2346 159.9856 C 117.298 155.8552 115.6818 155.5596 93.7221 154.3042 C 70.1462 153.0144 70.1462 153.0144 70.1462 153.0144 C 64.5575 157.4404 64.5575 157.4404 64.5575 157.4404 C 61.2855 160.3188 58.0099 162.1995 57.0544 162.1995 C 55.0682 162.1995 46.8648 168.8408 43.2982 172.6396 C 42.9678 172.6396 42.6374 172.3086 42.6374 172.0129 C 42.3069 172.0129 42.3069 172.0129 42.3069 171.6814 C 41.9765 170.7593 41.6425 169.7991 40.9816 168.8408 C 42.9678 167.2539 44.5876 166.2939 45.2485 166.6272 C 46.2398 167.2539 47.1988 166.6272 47.1988 165.04 C 47.1988 163.4548 45.2485 162.8262 40.0262 163.4548 C 33.773 164.4133 32.1532 164.7446 31.1619 168.5076 C 29.542 170.426 29.2116 173.2668 30.1706 175.4807 C 29.8365 178.3213 29.8365 180.2397 30.1706 180.2397 C 30.501 180.2397 30.8314 179.613 31.8228 178.9482 C 31.8228 179.2798 32.1532 179.613 32.4872 179.9082 C 29.2116 180.8665 27.5558 183.7073 27.8898 186.5479 C 26.2341 187.8394 24.6142 188.4663 22.6281 189.4246 C 22.6281 189.4246 22.6281 189.0933 22.3335 189.0933 C 23.6229 186.2527 24.2838 183.0803 24.6142 178.3213 C 25.2787 172.9712 24.9446 169.4678 23.9534 169.4678 C 23.2925 169.4678 22.6281 170.7593 22.6281 172.6396 C 22.9584 174.2268 22.3335 175.812 21.0117 176.1074 C 20.0168 176.4387 19.356 175.812 19.356 174.2268 C 19.356 170.426 18.0701 170.426 15.1249 173.8936 C 13.8032 175.1851 11.192 176.7344 8.9113 177.3992 C 5.9302 178.3213 4.9748 177.6943 3.6495 174.2268 C 2.6582 171.3862 1.9973 168.2122 2.6582 166.9585 C 2.9886 165.3716 2.9886 164.0818 1.7028 164.0818 C -1.9033 164.0818 0.7079 159.0271 4.9748 158.0671 ZM 33.1481 85.3186 C 31.1619 84.9873 29.542 84.0649 28.8812 82.7734 C 28.5507 80.8911 28.2203 80.8911 28.2203 82.7734 C 28.2203 84.0649 26.895 84.9873 25.6091 85.3186 C 23.2925 85.3186 23.2925 85.6501 25.9396 86.9058 C 27.5558 87.5325 29.2116 88.4907 29.542 88.4907 C 29.8365 88.4907 31.4923 87.5325 33.1481 86.9058 C 36.0897 85.3186 36.0897 85.3186 33.1481 85.3186 ZM 292.8818 136.2656 C 293.5068 136.8926 294.1677 135.9324 294.1677 134.3472 C 294.1677 133.0918 293.5068 131.8379 292.8818 131.8379 C 291.887 131.8379 291.2261 132.4648 291.2261 133.387 C 291.2261 134.3472 291.887 135.6387 292.8818 136.2656 ZM 290.5652 139.1064 C 290.2348 138.1462 288.6149 136.8926 287.2896 136.8926 C 286.3342 136.8926 285.6733 138.1462 286.3342 139.1064 C 286.6287 140.0647 287.954 140.6917 289.2758 140.6917 C 290.5652 140.6917 290.8956 140.0647 290.5652 139.1064 ZM 287.6236 153.3457 C 288.6149 153.3457 289.9402 153.0144 289.9402 152.719 C 289.9402 152.0542 288.6149 151.4275 287.6236 150.8005 C 286.3342 150.1736 285.3428 150.5051 285.3428 151.4275 C 285.3428 152.3875 286.3342 153.3457 287.6236 153.3457 ZM 290.2348 123.28 C 291.5565 122.6528 292.2209 121.6929 291.887 120.7705 C 290.8956 118.5208 285.3428 118.5208 285.3428 120.7705 C 285.3428 123.28 287.2896 124.2383 290.2348 123.28 ZM 272.2476 99.5581 C 270.5918 100.5183 269.6005 102.3989 269.9308 103.3589 C 271.5866 105.8665 273.537 105.2395 275.1891 101.145 C 276.809 97.3442 276.1481 96.7175 272.2476 99.5581 ZM 265.9944 148.2913 C 274.5282 156.8132 274.8587 157.1448 274.8587 154.3042 C 274.8587 152.719 274.1978 151.4275 273.2029 151.4275 C 272.2476 151.4275 270.5918 149.8403 269.6005 147.96 C 268.645 146.0774 266.6589 144.1589 265.039 144.1589 C 262.0615 144.1589 262.0615 144.4922 265.9944 148.2913 ZM 259.1198 133.387 C 261.1025 133.387 262.0615 132.7603 260.7721 132.4648 C 259.7808 131.8379 258.1609 131.8379 257.1696 132.4648 C 256.1746 132.7603 257.1696 133.387 259.1198 133.387 ZM 249.6306 90.373 C 250.6219 91.3315 253.5635 92.5852 256.1746 93.2139 C 260.7721 94.1721 261.1025 94.1721 258.4913 91.627 C 255.5138 88.4907 247.3499 87.5325 249.6306 90.373 ZM 229.6571 37.8772 C 228.6658 38.7993 228.3354 40.7178 228.6658 41.9714 C 229.3267 44.5168 231.277 42.303 231.277 38.5039 C 231.277 36.5854 230.9465 36.29 229.6571 37.8772 ZM 239.4768 106.1997 C 242.088 107.7847 243.0829 107.7847 244.4083 105.571 C 247.0194 102.1033 245.3636 100.5183 240.4717 102.7305 C 236.5352 104.2813 236.5352 104.2813 239.4768 106.1997 ZM 232.9328 90.373 C 237.8606 86.9058 237.8606 86.9058 233.9241 86.9058 C 231.277 86.9058 229.3267 88.1592 228.3354 90.373 C 227.7104 92.5852 227.046 93.8408 227.3764 93.8408 C 227.3764 93.8408 229.9876 91.9583 232.9328 90.373 ZM 225.7242 141.6516 C 228.0013 145.1194 231.9379 145.1194 230.652 141.3201 C 230.3216 140.0647 229.9876 138.4795 229.9876 138.1462 C 229.9876 137.8508 228.6658 137.8508 227.046 138.4795 C 224.3989 139.1064 224.3989 140.0647 225.7242 141.6516 ZM 215.5705 128.6658 C 218.1816 132.1335 219.507 132.4648 222.4486 129.9197 C 224.3989 128.3345 224.3989 128.3345 222.4486 128.0391 C 221.4573 128.0391 218.8461 127.7058 216.5654 127.0789 C 213.2898 125.8252 213.2898 125.8252 215.5705 128.6658 ZM 215.2401 94.1721 C 216.8958 94.1721 218.8461 89.1177 217.8513 87.5325 C 216.5654 85.9456 213.9183 88.4907 213.9183 91.3315 C 213.9183 92.9185 214.5792 94.1721 215.2401 94.1721 ZM 199.2067 115.6799 C 197.2205 116.9714 197.551 117.2671 200.1622 117.2671 C 201.8179 117.2671 203.7646 116.6382 204.4291 115.6799 C 205.4203 113.1709 202.1483 113.1709 199.2067 115.6799 ZM 199.5372 143.5322 C 199.8317 143.8655 200.823 143.2007 201.8179 141.6516 C 202.8091 140.3601 205.7509 138.7732 208.0315 138.1462 C 210.9731 137.1877 212.2985 135.6387 212.2985 133.387 C 212.2985 128.0391 207.7011 129.624 202.8091 136.561 C 200.823 140.0647 199.2067 142.9055 199.5372 143.5322 ZM 195.9312 128.9612 C 198.8727 125.4939 198.8727 124.865 196.556 123.9067 C 193.9449 122.6528 191.9982 125.4939 191.9982 130.5464 C 191.6642 134.3472 191.6642 134.3472 195.9312 128.9612 ZM 190.6729 91.627 C 191.0033 94.1721 191.6642 93.8408 193.6144 89.1177 C 195.9312 84.0649 195.9312 83.4001 193.9449 83.4001 C 192.6591 83.4001 191.3337 84.3586 191.0033 85.9456 C 190.3424 87.1992 190.3424 90.0779 190.6729 91.627 ZM 189.053 65.6931 C 189.053 66.9829 189.6779 70.1191 190.3424 72.3328 C 191.3337 76.7605 191.3337 76.7605 192.3286 72.9597 C 193.6144 69.1609 192.3286 63.4795 190.3424 63.4795 C 189.3834 63.4795 189.053 64.4375 189.053 65.6931 ZM 166.1056 76.1318 C 164.4858 78.3457 164.4858 80.5596 165.7716 87.1992 C 166.4361 91.9583 168.0919 96.7175 169.0472 97.6399 C 170.703 99.2268 171.0334 97.6399 171.3638 87.8279 C 171.3638 75.8381 169.7081 72.0376 166.1056 76.1318 ZM 169.0472 109.6672 C 169.3777 110.2942 170.0385 109.0403 169.7081 107.158 C 169.7081 105.2395 169.3777 104.9441 168.7168 106.1997 C 168.4222 107.4534 168.4222 109.0403 169.0472 109.6672 ZM 180.8531 79.9326 C 180.5227 80.5596 180.5227 84.9873 181.514 89.7446 C 182.5089 97.9731 182.8034 98.3044 183.1339 92.2915 C 183.4643 82.4778 182.8034 77.7188 180.8531 79.9326 ZM 169.7081 169.1724 C 171.6943 165.3716 174.9664 159.0271 177.2471 155.2266 C 179.8582 151.1318 181.514 145.7461 182.1749 140.3601 C 183.1339 131.8379 183.1339 131.8379 183.1339 131.8379 C 179.1974 136.561 179.1974 136.561 179.1974 136.561 C 177.2471 139.1064 175.9253 141.947 175.9253 142.9055 C 175.9253 145.4146 169.7081 161.241 167.7578 164.0818 C 166.7665 165.6667 165.1107 169.1724 164.8162 171.6814 C 163.1604 178.9482 166.1056 177.6943 169.7081 169.1724 ZM 146.4626 201.7476 C 147.4575 208.0557 147.4575 208.0557 150.7296 194.4792 C 152.6799 187.1746 155.6215 175.4807 157.6077 168.2122 C 160.2188 159.0271 161.2137 151.4275 161.2137 140.6917 C 161.2137 126.7473 160.8797 126.4519 158.2686 128.0391 C 152.3494 132.1335 149.0738 143.5322 147.752 165.6667 C 147.1271 177.0676 146.4626 188.4663 145.8018 190.9756 C 145.4713 193.5208 145.8018 198.28 146.4626 201.7476 ZM 147.1271 120.7705 C 148.4129 123.9067 149.7383 126.4519 149.7383 126.4519 C 150.0687 126.4519 151.6849 124.5334 153.0103 122.0244 C 154.666 119.8123 157.2772 117.2671 158.2686 116.3447 C 162.1691 113.4663 163.1604 104.6128 159.8884 98.5999 C 157.2772 93.2139 150.0687 87.1992 148.7433 89.1177 C 148.0825 89.7446 147.1271 95.7593 146.4626 102.7305 C 145.1409 113.1709 145.1409 116.3447 147.1271 120.7705 ZM 145.1409 48.3159 C 145.8018 48.9446 146.4626 48.6113 146.4626 47.6531 C 146.4626 46.3975 145.8018 45.1436 145.1409 44.5168 C 144.146 43.8521 143.521 44.1853 143.521 45.4392 C 143.521 46.3975 144.146 47.6531 145.1409 48.3159 ZM 39.0313 133.387 C 43.5927 133.7202 43.5927 133.7202 43.5927 133.7202 C 48.1901 133.7202 52.7875 129.624 52.7875 126.1206 C 52.7875 123.9067 52.4571 123.9067 39.0313 133.387 ZM 40.9816 124.5334 C 40.9816 125.4939 41.6425 126.4519 42.6374 126.4519 C 44.2537 126.4519 48.851 120.7705 47.8597 119.8123 C 46.8648 118.5208 40.9816 122.6528 40.9816 124.5334 ZM 44.5876 102.7305 C 49.5155 109.0403 51.7962 109.6672 54.4073 105.571 C 57.0544 101.7722 54.7378 99.2268 46.8648 98.3044 C 40.3207 97.3442 40.3207 97.3442 44.5876 102.7305 ZM 40.9816 84.9873 C 40.9816 85.6501 43.2982 87.1992 45.9094 88.4907 C 58.0099 94.5037 60.3265 94.5037 59.996 88.7864 C 59.996 85.3186 55.0682 77.7188 53.1179 77.7188 C 50.8013 77.7188 40.9816 83.7317 40.9816 84.9873 ZM 58.6743 129.9197 C 62.2768 129.9197 62.6072 128.9612 59.6656 127.4121 C 58.3403 127.0789 57.0544 127.4121 56.724 128.3345 C 56.0595 129.2925 57.0544 129.9197 58.6743 129.9197 ZM 61.2855 55.5842 C 59.0047 53.9971 56.0595 53.3704 54.7378 53.9971 C 52.4571 55.2527 52.7875 55.5842 56.0595 56.5422 C 57.6794 57.1711 60.991 57.7979 62.6072 58.0933 C 64.5575 58.0933 64.5575 57.4646 61.2855 55.5842 ZM 60.991 66.9829 C 62.9376 66.9829 63.2717 66.6514 61.9464 65.6931 C 60.991 65.3979 59.6656 65.3979 59.0047 66.0247 C 58.6743 66.6514 59.6656 67.2786 60.991 66.9829 ZM 62.9376 74.2515 C 58.3403 74.2515 58.3403 74.5466 60.991 77.092 C 64.263 79.9326 65.2184 80.2639 66.5438 78.3457 C 68.8244 75.8381 67.2046 74.2515 62.9376 74.2515 ZM 69.4854 38.5039 C 68.16 36.917 67.8296 39.7578 68.494 43.2253 C 68.8244 45.4392 70.1462 47.3574 70.8107 47.3574 C 72.0965 47.3574 71.1411 40.3845 69.4854 38.5039 ZM 79.9659 80.2639 C 79.3051 80.5596 80.9608 82.4778 82.9111 84.0649 C 84.8973 85.6501 86.5135 86.2769 86.5135 85.3186 C 86.5135 83.105 80.9608 78.9727 79.9659 80.2639 ZM 71.766 82.4778 C 68.8244 84.6919 70.4802 90.373 74.7436 91.3315 C 77.0243 91.9583 80.6304 94.5037 82.9111 97.0127 C 84.8973 99.5581 86.5135 100.5183 86.5135 99.5581 C 86.5135 96.386 73.4218 81.1863 71.766 82.4778 ZM 85.1918 108.7451 C 83.2416 103.6526 80.9608 101.145 76.6938 99.5581 C 73.4218 98.3044 70.1462 97.6399 69.1549 97.9731 C 68.16 98.3044 72.0965 102.3989 77.6888 107.158 C 88.1693 115.3848 88.1693 115.3848 85.1918 108.7451 ZM 102.5864 60.0117 C 101.9255 60.0117 101.261 61.2656 101.261 62.5193 C 101.261 64.1062 101.9255 65.0647 102.5864 65.0647 C 103.5418 65.0647 104.2063 64.1062 104.2063 62.5193 C 104.2063 61.2656 103.5418 60.0117 102.5864 60.0117 ZM 99.6089 85.9456 C 99.6089 88.1592 105.1976 86.5725 107.4783 83.7317 C 110.7504 78.9727 110.4199 77.7188 106.153 77.7188 C 103.2114 77.7188 99.6089 82.1467 99.6089 85.9456 ZM 109.1341 17.6228 C 108.1392 21.7173 107.4783 25.1848 107.8088 25.5181 C 108.8036 26.772 111.4149 17.2915 111.4149 13.4907 C 111.4149 11.9055 110.4199 13.824 109.1341 17.6228 ZM 126.1624 81.5178 C 124.5066 81.5178 123.2207 82.1467 123.2207 83.4001 C 123.2207 84.3586 124.1761 84.9873 125.1674 84.9873 C 126.4927 84.9873 127.7786 84.3586 128.1126 83.4001 C 128.7735 82.1467 127.7786 81.5178 126.1624 81.5178 ZM 122.2258 140.9868 C 124.1761 146.7061 127.1177 152.0542 128.7735 153.3457 C 130.4293 154.3042 133.7013 158.7319 135.6516 163.1594 C 137.6019 167.5854 139.5881 171.053 139.9186 171.053 C 141.5348 171.053 138.2628 141.947 135.9821 133.0918 C 133.9958 125.4939 133.3708 118.5208 133.7013 107.4534 C 133.9958 99.2268 133.7013 91.9583 133.0405 91.3315 C 132.71 90.7046 130.4293 90.7046 128.4431 91.3315 C 124.837 92.5852 124.5066 93.5454 124.5066 100.5183 C 124.5066 105.8665 123.8456 108.7451 122.2258 109.9985 C 117.6285 112.8394 117.9589 128.9612 122.2258 140.9868 ZM 112.7366 98.5999 C 112.0757 93.8408 111.4149 93.2139 107.8088 93.2139 C 103.5418 93.2139 103.5418 93.5454 103.8723 100.1851 C 103.8723 104.2813 104.5367 109.0403 104.8671 111.2524 C 105.1976 113.4663 106.487 115.6799 107.8088 116.0115 C 110.4199 117.5986 113.3615 106.5313 112.7366 98.5999 ZM 107.8088 130.5464 C 104.8671 126.7473 102.881 122.6528 102.5864 121.6929 C 102.5864 120.4392 100.9307 117.2671 98.9839 114.4263 C 96.9977 111.5857 94.717 108.0803 93.7221 106.8264 C 90.4501 102.3989 91.1109 106.1997 94.717 116.0115 C 96.9977 122.6528 100.9307 128.6658 105.528 133.7202 C 114.0259 142.2783 115.0173 140.6917 107.8088 130.5464 ZM 102.5864 146.0774 C 106.153 146.0774 105.8585 145.7461 100.9307 140.6917 C 97.6586 137.5193 95.3779 134.0518 95.3779 132.4648 C 95.3779 131.2112 91.1109 126.7473 86.1832 122.6528 C 81.2912 118.5208 76.6938 114.4263 76.033 113.1709 C 75.3685 111.5857 75.0381 111.5857 75.0381 113.4663 C 75.0381 115.3848 73.4218 115.6799 68.16 114.72 C 64.5575 114.093 61.6159 114.093 61.6159 114.4263 C 61.6159 115.0532 62.9376 118.8523 64.263 122.6528 C 66.5438 128.9612 67.535 130.2529 74.7436 132.7603 C 79.3051 134.3472 86.5135 138.1462 91.1109 140.9868 C 95.3779 143.8655 100.6002 146.0774 102.5864 146.0774 ZM 51.4622 156.8132 C 52.7875 156.8132 54.7378 156.1865 56.0595 155.2266 C 58.3403 153.0144 56.3936 153.0144 52.1266 155.2266 C 50.1763 156.1865 49.8459 156.4819 51.4622 156.8132 ZM 47.8597 148.918 C 51.1318 147.6284 61.6159 146.3728 71.1411 146.3728 C 89.1248 146.0774 92.7308 145.1194 85.5222 143.2007 C 83.2416 142.574 78.0192 140.9868 73.7523 139.4016 C 66.2133 136.561 50.8013 137.5193 49.185 140.6917 C 48.851 141.3201 47.1988 141.6516 45.579 141.3201 C 42.3069 140.3601 39.0313 142.9055 38.04 147.96 C 36.7147 152.0542 39.0313 152.3875 47.8597 148.918 ZM 21.6726 156.1865 C 22.3335 158.7319 25.6091 159.0271 28.2203 156.8132 C 29.8365 155.5596 29.8365 154.9329 28.2203 153.0144 C 26.895 151.1318 25.9396 151.1318 23.9534 152.719 C 22.6281 153.6414 21.6726 155.2266 21.6726 156.1865 ZM 11.192 178.3213 C 12.4779 178.3213 13.1388 179.2798 12.4779 181.1621 C 12.1833 182.4536 11.192 183.7073 10.5276 183.7073 C 9.5363 183.7073 8.9113 182.4536 8.9113 181.1621 C 8.9113 179.613 9.8667 178.3213 11.192 178.3213 Z", "maple-leaf": "M 82.7949 242.2583 C 77.6862 252.9512 74.1093 258.564 56.7309 264.1697 C 53.66 265.6975 57.7499 269.2642 59.8018 268.7527 C 75.1283 262.6421 78.7051 257.541 85.8658 246.3296 C 89.4427 260.6033 97.6154 269.7756 111.4169 275.3813 L 112.4428 272.3191 C 131.3531 282.5146 145.6606 284.554 157.9232 282.0032 C 169.6797 279.4526 183.4743 277.4204 194.7248 278.9482 C 187.571 273.342 183.4743 266.7134 181.9492 258.564 C 193.6989 246.3296 216.699 250.9192 227.9426 243.7856 L 225.3847 238.1729 C 249.9168 230.0234 270.872 216.7727 300 220.8511 L 251.9617 186.1934 L 252.9807 181.6035 C 238.6732 170.9036 222.3208 168.3528 203.9166 175.4932 C 210.0513 157.6528 203.9166 138.2915 220.7888 124.5298 C 216.699 116.8848 220.7888 106.1848 227.9426 96.5007 C 228.9686 78.1558 234.0704 61.8464 243.2691 47.0679 C 228.4487 56.752 213.6351 65.4128 198.3017 73.0613 L 195.7438 67.4521 C 189.616 77.1394 180.9233 84.2729 169.1668 88.3442 L 167.1219 82.7385 C 151.2755 98.5398 132.3721 106.6892 120.6155 129.6306 C 124.1924 107.2007 117.5447 85.2891 108.3461 67.4521 L 104.7692 71.0222 C 98.1284 49.1072 74.6222 34.8369 59.8018 17 C 65.9296 65.9243 48.0383 72.0383 48.5581 99.0513 L 42.4165 99.5557 C 51.1091 127.0801 39.3525 139.8193 44.9744 158.6758 C 30.6669 151.5422 12.2626 156.6365 0 145.425 C 14.8204 168.8713 19.9362 197.4048 44.9744 216.7727 L 41.3975 218.3005 C 50.5961 228.489 62.3527 237.157 82.7949 242.2583 Z", - + "butterfly": "M 132.1899 141.4731 C 133.2701 142.188 135.5561 140.834 136.6667 140.6667 C 135.4167 139.0417 140.125 131.125 138.5 128.25 C 138 121.75 125.3439 107.0776 123.75 105.375 C 124.358 104.2332 131.1718 105.2957 130.9684 105.4595 C 128.125 107.75 140.5635 120.8953 142 128.5 C 144.6469 128.3535 148.1237 127.3618 149.6667 129 C 151.1076 127.4255 162.2255 115.3953 162.8333 105 C 162.9204 103.5103 168.9546 104.4531 167.8195 105.3611 C 166 111.8333 153.1691 130.0051 152.1667 130.6667 C 153.3333 136.3333 152.861 136.7217 160.3125 141.1279 C 163.666 133.2534 170.8113 126.5691 177.3557 119.9163 C 184.7454 112.4465 189.7048 105.2905 197.845 97.5144 C 208.5609 87.6365 222.2463 78.6233 234.7805 73.2429 C 243.5 69.5 258.1094 66.2913 260.349 66.0813 C 264.498 65.6785 268.25 65.75 273.1679 66.4807 C 280.4244 67.5588 287.5098 68.1609 295.1284 71.7371 C 302.2921 76.3269 299.8157 82.0793 298.48 87.4675 C 287.4467 99.6348 276.1462 114.2068 272.5872 129.1147 C 271.3906 134.6348 269.2391 144.147 264.1613 150.1221 C 255.9979 159.313 246.0071 158.9731 236.6201 160.219 C 242.3398 161.8567 248.5434 167.2041 254.1089 172.5776 C 262.7908 181.0295 267.0212 189.697 264.7792 199.1331 C 264.3019 201.1123 256.0239 216.1243 251.975 220.8347 C 236.6072 238.771 215.6852 250.9351 198.8225 248.9609 C 192.75 248.25 176 235.5 172.9885 231.7378 C 165.5126 222.3984 159.372 211.1333 159.1196 201.2981 C 158.1903 200.3696 157.0538 200.301 157.5549 199.0588 C 156.6237 201.9033 153.6667 211.1667 149.289 217.0229 C 142.9601 225.4893 137.1667 212.8333 134.8217 202.5698 C 134.0178 199.0515 134.6078 198.4424 133.6702 196.3386 C 129.2367 198.0208 131.5711 202.8984 129.8312 206.8386 C 128.3561 210.2698 121.75 220.75 119.9257 223.1392 C 114.0942 230.7764 101 242.3333 91.5037 245.1064 C 82.69 247.6802 75.22 247.3191 68.1365 243.686 C 59 239 46.124 228.1169 38.2026 219.2678 C 28.1746 208.3184 19.4099 191.8674 27.7518 180.2795 C 33.0762 173.0493 43.0985 162.2744 52.8922 159.6267 C 45.9788 158.78 30.683 154.2236 24.9946 141.5679 C 23.1688 137.5554 22.4915 131.3167 22.0271 126.853 C 21.2715 119.4836 17.9091 111.0168 15.1179 103.7605 C 12.8741 97.1265 8.9083 88.6335 4.7579 81.3755 C 0.4083 73.759 -3.1577 61.1648 4.4119 54.9631 C 7.0561 52.7964 15.2436 50.2693 16.9547 50.0891 C 22.936 49.4504 31.085 52.3877 37.1343 54.1499 C 41.0975 55.314 58.487 61.5269 63.2961 64.9478 C 95 87.5 117.5438 115.5918 132.1899 141.4731 Z", "leaf_1": "m35.63904,285.5213c9.77121,-31.99348 23.14531,-59.08864 35.83149,-72.59245c13.5912,-14.46718 7.56125,-20.74258 -6.45918,-6.72212c-5.89857,5.89853 -7.58387,1.61555 -7.58387,-19.2735c0,-49.83961 25.83589,-80.67891 87.99842,-105.04016c52.59872,-20.61333 91.37741,-43.79435 107.45589,-64.23479l13.10197,-16.65652l0,28.9807c0,35.83507 -11.11781,89.97318 -23.42422,114.0641c-13.0549,25.55626 -57.80217,72.72934 -79.76038,84.08435c-19.67261,10.17316 -61.687,13.16808 -84.14172,5.99792c-11.19011,-3.57314 -14.7415,-0.84308 -20.53963,15.78944c-3.8556,11.06018 -7.0102,26.79501 -7.0102,34.96616c0,9.27652 -3.72057,14.8566 -9.90572,14.8566c-7.3461,0 -8.78352,-3.67429 -5.56284,-14.21973z", "drop": "m115.15536,295.759c-42.01334,-15.78687 -72.12711,-65.94934 -65.28346,-108.74701c4.3154,-26.98718 95.35947,-190.81818 103.3105,-185.90417c2.59511,1.60386 25.68835,39.79974 51.31831,84.87975c41.0565,72.21342 46.5999,85.67899 46.5999,113.19665c0,55.77716 -44.6394,101.46498 -98.23825,100.54555c-15.6409,-0.26834 -32.60906,-2.05518 -37.707,-3.97076zm42.09262,-28.05386c1.39066,-7.22116 -1.85785,-10.74289 -9.90955,-10.74289c-18.35065,0 -43.80598,-23.24161 -49.49309,-45.18889c-6.0666,-23.41179 -22.15186,-26.19615 -24.52774,-4.24574c-4.57746,42.29059 76.21872,100.22086 83.93037,60.17752z", "feather":"M 188.7044 276.8495 C 188.7044 276.8495 159.7298 274.7077 144.3849 266.5197 C 129.04 258.3316 121.8791 247.8918 121.8791 247.8918 C 121.8791 247.8918 129.932 256.8966 141.2327 263.7194 C 148.1224 267.879 156.2198 271.2277 164.4356 271.2277 C 164.4356 271.2277 151.7511 264.0633 142.2365 269.1805 C 142.2365 269.1805 149.0907 264.4724 160.9574 268.0547 C 172.8248 271.6369 178.7574 269.5897 178.7574 269.5897 C 178.7574 269.5897 158.7075 269.4874 150.0116 263.7557 C 141.3156 258.024 139.1672 254.7494 139.1672 254.7494 C 139.1672 254.7494 148.1699 264.0633 155.1263 265.1892 C 162.0827 266.3151 174.0517 264.9839 174.0517 264.9839 C 174.0517 264.9839 161.6738 265.2915 157.7859 263.5511 C 153.8987 261.8116 138.5538 258.3316 135.792 265.5983 C 135.792 265.5983 138.8605 257.9217 152.8756 260.1735 C 166.8907 262.4253 168.2213 261.7093 168.2213 261.7093 C 168.2213 261.7093 143.3618 252.0877 129.449 257.5126 C 115.5361 262.9374 116.4569 267.5432 116.4569 267.5432 C 116.4569 267.5432 117.3778 251.5763 151.3414 254.4418 C 151.3414 254.4418 135.4853 252.0877 129.6534 247.3797 C 123.8231 242.6716 123.4134 239.6015 123.4134 239.6015 C 123.4134 239.6015 130.0624 249.7337 138.2471 249.836 C 146.4311 249.939 148.784 249.2223 148.784 249.2223 C 148.784 249.2223 132.825 245.5378 125.2544 246.356 C 117.6845 247.1751 105.4089 249.836 98.9636 238.168 C 98.9636 238.168 104.9992 249.3246 121.4702 245.4355 C 137.9404 241.5457 148.2721 245.8446 148.2721 245.8446 C 148.2721 245.8446 123.3111 241.0342 118.1957 236.2239 C 113.081 231.4135 112.4676 223.1224 112.4676 223.1224 C 112.4676 223.1224 114.616 237.0421 125.1521 238.3734 C 135.6898 239.7038 151.6481 239.3962 155.8427 244.2073 C 155.8427 244.2073 145.3058 236.4284 134.3592 237.452 C 123.4134 238.4756 106.5335 252.5999 97.9405 248.9154 C 89.3476 245.2309 85.4597 248.301 85.4597 248.301 C 85.4597 248.301 89.0409 244.7188 95.1779 246.356 C 101.3165 247.9941 102.6463 250.4504 113.1832 243.1837 C 123.7201 235.917 141.6224 226.91 152.9779 234.6881 C 152.9779 234.6881 99.9193 219.9849 94.1912 190.099 C 94.1912 190.099 99.2355 210.0254 125.1521 218.8946 C 151.0695 227.7638 152.5689 227.0827 152.5689 227.0827 C 152.5689 227.0827 112.6046 222.8512 93.9171 186.8237 C 93.9171 186.8237 110.148 214.8002 135.3831 218.4847 C 135.3831 218.4847 114.1041 211.1158 97.599 188.5989 C 81.0962 166.0812 80.4116 158.5744 80.4116 158.5744 C 80.4116 158.5744 100.4645 194.6018 138.3849 201.0169 C 138.3849 201.0169 108.6819 192.5198 87.4036 165.3971 C 66.1254 138.2744 72.7751 132.9519 72.7751 132.9519 C 72.7751 132.9519 68.1716 123.2288 71.649 121.0793 C 71.649 121.0793 64.7948 113.3004 66.7388 106.955 C 66.7388 106.955 71.649 131.0069 96.713 146.7693 C 121.7769 162.5309 123.9253 164.4758 123.9253 164.4758 C 123.9253 164.4758 97.9405 146.667 89.7565 138.0691 C 81.5725 129.4719 72.3654 122.8189 67.0455 104.3964 C 67.0455 104.3964 72.161 122.6143 88.3245 135.1013 C 104.4873 147.5883 107.6595 147.383 107.6595 147.383 C 107.6595 147.383 74.5138 130.3932 66.6366 102.2469 C 66.6366 102.2469 71.2401 123.0242 107.7618 142.8802 C 107.7618 142.8802 71.1379 121.2839 66.6366 98.2548 C 66.6366 98.2548 65.8187 94.8772 67.3529 93.2399 C 67.3529 93.2399 65.5112 88.8386 66.1254 83.3115 C 66.7388 77.7851 67.4552 71.8489 67.4552 71.8489 C 67.4552 71.8489 65.8187 95.1848 88.529 113.1982 C 88.529 113.1982 61.7263 81.0583 71.2757 54.5849 C 71.2757 54.5849 69.228 69.1872 75.6392 75.8736 C 75.6392 75.8736 70.1822 64.1389 72.7751 50.3548 C 72.7751 50.3548 72.0921 64.9572 78.9129 78.1943 C 85.7338 91.4314 107.5573 117.0872 107.5573 117.0872 C 107.5573 117.0872 81.9148 87.0635 77.8224 70.1419 C 73.7308 53.2203 76.0481 42.1668 76.0481 42.1668 C 76.0481 42.1668 73.7308 57.9959 83.6876 73.8271 C 93.6444 89.6577 97.0552 91.4314 97.0552 91.4314 C 97.0552 91.4314 69.6369 62.9085 80.0027 31.249 C 80.0027 31.249 79.3219 63.3184 90.6426 77.1018 C 101.9655 90.8858 105.3733 91.295 105.3733 91.295 C 105.3733 91.295 82.0489 72.8717 82.8668 47.0795 C 83.6861 21.2872 88.0526 19.9227 88.0526 19.9227 C 88.0526 19.9227 78.3662 41.7555 93.9156 62.7729 C 109.4657 83.7903 106.329 79.8316 106.329 79.8316 C 106.329 79.8316 84.2329 51.1739 88.5979 28.7926 C 92.9629 6.4114 101.2824 6.6849 101.2824 6.6849 C 101.2824 6.6849 92.145 12.6886 92.5539 26.4719 C 92.9629 40.2553 106.0578 67.0029 106.0578 67.0029 C 106.0578 67.0029 91.4619 30.2943 95.418 18.9665 C 99.3726 7.6395 107.6944 4.2285 107.6944 4.2285 C 107.6944 4.2285 91.4604 13.5084 100.872 38.3459 C 100.872 38.3459 95.0076 14.7387 110.6925 3.6845 C 110.6925 3.6845 99.5089 14.3296 104.1458 34.1167 C 104.1458 34.1167 102.7819 9.8239 117.6489 1.5002 C 117.6489 1.5002 108.1033 9.0071 107.9662 24.1549 C 107.9662 24.1549 110.0124 8.8692 121.3324 0.272 C 121.3324 0.272 112.7387 13.3727 113.2854 32.2051 C 113.2854 32.2051 119.6966 13.6477 122.8348 0 C 122.8348 0 123.3786 7.3697 121.0605 16.5117 C 118.7424 25.6551 117.6512 26.4734 117.6512 26.4734 C 117.6512 26.4734 125.9707 14.1917 126.3804 2.1828 C 126.3804 2.1828 126.7894 13.9197 123.2437 23.7458 C 123.2437 23.7458 129.9972 18.3128 130.8477 6.2743 C 130.861 6.0949 130.8714 5.914 130.8817 5.7317 C 130.8817 5.7317 132.7901 23.3344 125.8337 38.2103 C 118.8773 53.0869 115.6035 54.4507 115.6035 54.4507 C 115.6035 54.4507 131.0188 39.8476 133.3369 19.6514 C 133.3369 19.6514 133.6095 30.9769 129.5179 40.8023 C 125.4262 50.6283 121.0605 58.1352 121.0605 58.1352 C 121.0605 58.1352 141.6564 39.437 138.2471 5.8681 C 138.2471 5.8681 142.2017 24.5626 138.6561 38.7558 C 135.1104 52.949 117.6489 74.7833 117.6489 74.7833 C 117.6489 74.7833 144.7946 50.764 146.0214 12.6901 C 146.0214 12.6901 149.2952 35.207 136.8143 55.6767 C 136.8143 55.6767 155.2285 34.7978 154.8196 14.9418 C 154.8196 14.9418 158.912 24.9717 155.433 38.6869 C 151.9555 52.402 135.3831 84.5397 118.1957 92.3186 C 118.1957 92.3186 164.8446 67.14 161.776 23.9489 C 161.776 23.9489 166.8907 43.5996 160.5485 62.6373 C 154.2062 81.6742 130.0624 110.7418 130.0624 110.7418 C 130.0624 110.7418 164.6401 78.8087 169.7556 44.0087 C 169.7556 44.0087 171.3921 33.3651 169.3459 27.0189 C 169.3459 27.0189 177.7351 30.7034 178.3485 46.4658 C 178.9619 62.2274 170.7787 83.5168 165.0498 98.4594 C 159.3209 113.4027 147.0453 133.2587 147.0453 133.2587 C 147.0453 133.2587 186.9422 72.258 181.2126 42.3714 C 181.2126 42.3714 191.4435 55.2675 190.2152 72.0535 C 188.9884 88.8386 180.3947 135.5105 156.4568 156.5946 C 156.4568 156.5946 182.2364 136.1249 189.3973 98.8693 C 189.3973 98.8693 193.08 79.0133 192.4659 68.1636 C 192.4659 68.1636 197.5806 91.0904 195.7396 108.2855 C 193.8986 125.4806 174.6658 163.9644 174.6658 163.9644 C 174.6658 163.9644 195.7396 131.826 197.1716 111.7654 C 197.1716 111.7654 199.4223 123.8425 197.7858 134.8968 C 196.1493 145.9503 186.7377 166.6253 178.7574 178.7024 C 178.7574 178.7024 195.5351 154.5482 199.0133 143.9031 C 202.4916 133.2587 201.8774 127.1179 201.8774 127.1179 C 201.8774 127.1179 205.9698 160.2799 199.4223 175.8369 C 192.8748 191.3939 172.2107 214.5253 170.7787 225.3742 C 170.7787 225.3742 180.3947 200.1964 201.264 196.3066 C 222.1333 192.4175 234 198.3538 234 198.3538 C 234 198.3538 202.2871 188.1186 185.3049 207.3608 C 185.3049 207.3608 176.712 217.8006 176.5068 227.2168 C 176.5068 227.2168 198.6044 211.6598 202.0819 190.3703 C 205.5608 169.0816 221.7244 165.8062 221.7244 165.8062 C 221.7244 165.8062 203.7191 172.5615 203.9236 190.9848 C 204.1281 209.408 183.4632 231.1059 178.553 230.4922 C 178.553 230.4922 195.3307 225.7841 201.264 211.6598 C 201.264 211.6598 197.3761 225.9886 188.9884 234.279 C 180.5992 242.5693 183.361 246.1515 183.361 246.1515 C 183.361 246.1515 186.2258 237.2475 194.6143 229.7754 C 203.0035 222.3041 214.0515 209.408 214.1538 200.7078 C 214.256 192.0084 223.3609 183.3082 223.3609 183.3082 C 223.3609 183.3082 216.2 192.4175 215.8925 198.9682 C 215.5858 205.5182 216.6089 215.7534 204.64 224.3513 C 192.6703 232.9485 187.6578 248.4033 187.8623 255.1585 C 187.8623 255.1585 196.2174 231.0377 220.7702 226.2621 C 220.7702 226.2621 197.3079 230.9013 188.9884 257.377 C 188.9884 257.377 204.537 230.9028 225.2707 223.9429 C 225.2707 223.9429 203.1739 233.3591 192.5347 256.4223 C 192.5347 256.4223 198.8089 240.044 218.4499 239.3629 C 218.4499 239.3629 202.0819 241.5457 195.3996 256.9671 C 195.3996 256.9671 198.3999 250.4186 209.5851 248.0979 C 220.7702 245.7772 230.1803 237.7255 227.8622 230.0823 C 227.8622 230.0823 230.7263 240.7252 216.1326 247.8229 C 201.5374 254.9206 195.4055 271.9161 195.4055 271.9161 C 195.4055 271.9161 207.2904 283.1744 216.8995 292.6617 C 216.1409 297.9746 213.5212 299.4365 211.0835 299.9987 C 210.2119 300.1997 189.8638 277.3056 188.7044 276.8495 Z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/object.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/object.json index 07d06a9..70cba95 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/object.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/object.json @@ -4,8 +4,8 @@ "raph_boy": "m210.33144,143.89894c-6.95941,-12.57172 -15.47375,-22.74984 -24.01424,-29.86983c-9.96541,7.29803 -22.10274,11.74199 -35.33479,11.74199c-13.25803,0 -25.41282,-4.45262 -35.36066,-11.74199c-8.54047,7.11999 -17.06351,17.29811 -24.04,29.86983c-16.19487,29.18793 -17.97591,59.1273 -3.98808,66.89018c6.26434,3.49693 12.83241,0.89052 19.61797,-5.6474c-1.19028,6.62904 -1.88538,13.81406 -1.88538,21.32939c0,33.38869 12.97153,60.43492 28.95753,60.43492c9.6353,0 14.40506,-9.84814 16.69862,-24.92639c2.2851,15.07825 7.05482,24.92639 16.6552,24.92639c16.01227,0 28.98392,-27.04623 28.98392,-60.43492c0,-7.51534 -0.69533,-14.70035 -1.91148,-21.32939c6.80278,6.53792 13.36221,9.14433 19.64394,5.6474c13.97922,-7.76288 12.17188,-37.70226 -4.02254,-66.89018zm-59.36613,-29.51799c26.89833,0 48.71428,-21.8159 48.71428,-48.72745s-21.81595,-48.72751 -48.71428,-48.72751c-26.90748,0 -48.74066,21.82024 -48.74066,48.72751s21.83318,48.72745 48.74066,48.72745z", "raph_girl": "m210.47775,159.31802c-6.5556,-11.85419 -14.5853,-21.4483 -22.63556,-28.15549c-9.39328,6.87933 -20.83389,11.06407 -33.31883,11.06407c-12.49292,0 -23.95,-4.19719 -33.33109,-11.06407c-8.05025,6.70718 -16.07988,16.3013 -22.66017,28.15549c-15.26108,27.50842 -16.94806,55.72913 -3.76718,63.05058c5.9046,3.29617 12.09998,0.83537 18.49591,-5.32317c-1.12607,6.24446 -1.79353,13.01715 -1.79353,20.10512c0,31.47218 12.22685,56.96574 27.29962,56.96574c9.078,0 13.57817,-9.28665 15.73595,-23.49945c2.15787,14.2128 6.65384,23.49945 15.71159,23.49945c15.09309,0 27.3199,-25.49356 27.3199,-56.96574c0,-7.08797 -0.65509,-13.86066 -1.80157,-20.10512c6.41638,6.15854 12.59937,8.61934 18.5162,5.32317c13.20151,-7.32146 11.4939,-35.54216 -3.77124,-63.05058zm-55.96663,-27.82361c25.36684,0 45.93047,-20.56793 45.93047,-45.93063s-20.56363,-45.93048 -45.93047,-45.93048c-25.36276,0 -45.94283,20.56364 -45.94283,45.93048s20.58006,45.93063 45.94283,45.93063zm31.37788,-94.27703c13.25461,4.88095 5.27805,-7.78414 5.27805,-16.43626s8.1813,-19.23294 -5.27805,-14.92929c-14.12682,4.52865 -25.57977,7.01829 -25.57977,15.68267s11.45296,10.47439 25.57977,15.68288zm-31.29187,-6.16252c8.39418,0 3.70572,-4.25034 3.70572,-9.48752c0,-5.24121 4.70074,-9.47933 -3.70572,-9.47933s-4.01289,4.25037 -4.01289,9.47933c0,5.24941 -4.38142,9.48752 4.01289,9.48752zm-31.47208,6.16252c14.12683,-5.1963 25.57968,-7.02252 25.57968,-15.68288s-11.45285,-11.15402 -25.57968,-15.68267c-13.45937,-4.31592 -5.28221,6.26888 -5.28221,14.92929s-7.98471,21.30898 5.28221,16.43626z", "raph_pen": "m146.83684,115.71881c-0.45042,-0.67755 -1.00925,-1.34163 -1.72177,-1.85109c-3.04871,-2.2215 -7.351,-1.54391 -9.58611,1.52216c-2.23131,3.07336 -1.52603,7.36902 1.52969,9.59677c2.77647,2.01186 6.48155,1.52948 8.8457,-0.83739l-64.87093,89.42747l-20.16745,73.20351l63.32053,-41.89926l144.20293,-198.7902l-43.17049,-31.31054l-13.91629,19.18622c-0.79611,-3.19165 -2.57372,-6.18823 -5.45471,-8.29767c-6.68427,-4.84662 -16.02917,-3.38049 -20.87282,3.3172c-27.75597,38.28942 -12.36926,48.48591 -38.13829,86.73282zm-31.75805,119.69107l-32.57163,21.55399l10.37183,-37.68758l22.19981,16.13359zm38.36887,-121.63963c19.98219,-29.52283 18.07886,-37.52791 35.18015,-63.73244c2.82889,1.94135 6.07655,2.62617 9.2648,2.45808l-44.44495,61.27437z", - "raph_clip": "m254.98035,21.30912c-21.11665,-15.11687 -50.51465,-10.26612 -65.65204,10.86102l-118.72278,165.76295c-10.80711,15.07626 -7.34069,36.07983 7.75584,46.88922c15.09648,10.78922 36.07957,7.32249 46.88668,-7.77365l83.82764,-117.02809l-10.92749,-7.83544l-83.81487,117.03815l0,0c-6.49191,9.03548 -19.08845,11.1275 -28.12135,4.6667c-9.04539,-6.47157 -11.11713,-19.07556 -4.63807,-28.13162l0,0l118.70741,-165.75288l0.01529,-0.01052l-0.02554,-0.01006c10.79433,-15.04511 31.84402,-18.52175 46.89943,-7.74307c15.05548,10.78889 18.53748,31.84415 7.75841,46.89928l0,-0.01001l-130.12462,181.67987l0.01277,0.02063c-15.10905,21.08588 -44.57393,25.95731 -65.66481,10.86099c-21.09067,-15.12738 -25.94428,-44.56136 -10.84798,-65.66789l94.56806,-132.03191l-10.93002,-7.82487l-94.56529,132.03193c-19.45266,27.15742 -13.20177,64.92889 13.96575,84.37384c27.16738,19.46548 64.93915,13.20953 84.39181,-13.93738l130.12166,-181.69052c15.09668,-21.11655 10.25589,-50.49928 -10.87589,-65.63668z", - "raph_tshirt": "m191.01682,41.7402c-6.65135,16.37186 -22.65103,27.93963 -41.39505,27.93963c-18.75568,0 -34.7588,-11.56777 -41.3954,-27.93963l-101.36017,42.98543l28.51685,67.20866l31.32125,-13.28813l0,137.02332l166.93693,0l0,-136.53912l30.19667,12.81158l28.52783,-67.2086l-101.34891,-42.99313z", + "raph_clip": "m254.98035,21.30912c-21.11665,-15.11687 -50.51465,-10.26612 -65.65204,10.86102l-118.72278,165.76295c-10.80711,15.07626 -7.34069,36.07983 7.75584,46.88922c15.09648,10.78922 36.07957,7.32249 46.88668,-7.77365l83.82764,-117.02809l-10.92749,-7.83544l-83.81487,117.03815l0,0c-6.49191,9.03548 -19.08845,11.1275 -28.12135,4.6667c-9.04539,-6.47157 -11.11713,-19.07556 -4.63807,-28.13162l0,0l118.70741,-165.75288l0.01529,-0.01052l-0.02554,-0.01006c10.79433,-15.04511 31.84402,-18.52175 46.89943,-7.74307c15.05548,10.78889 18.53748,31.84415 7.75841,46.89928l0,-0.01001l-130.12462,181.67987l0.01277,0.02063c-15.10905,21.08588 -44.57393,25.95731 -65.66481,10.86099c-21.09067,-15.12738 -25.94428,-44.56136 -10.84798,-65.66789l94.56806,-132.03191l-10.93002,-7.82487l-94.56529,132.03193c-19.45266,27.15742 -13.20177,64.92889 13.96575,84.37384c27.16738,19.46548 64.93915,13.20953 84.39181,-13.93738l130.12166,-181.69052c15.09668,-21.11655 10.25589,-50.49928 -10.87589,-65.63668z", + "raph_tshirt": "m191.01682,41.7402c-6.65135,16.37186 -22.65103,27.93963 -41.39505,27.93963c-18.75568,0 -34.7588,-11.56777 -41.3954,-27.93963l-101.36017,42.98543l28.51685,67.20866l31.32125,-13.28813l0,137.02332l166.93693,0l0,-136.53912l30.19667,12.81158l28.52783,-67.2086l-101.34891,-42.99313z", "ball": "m1.36762,144.54343c-0.61252,-24.33647 11.43968,-48.24649 31.71385,-61.85355c33.0555,-25.12355 76.68359,-36.57172 117.69406,-29.65477c20.30775,-3.13354 29.29549,17.94864 22.15137,34.18353c-11.04268,10.79923 -30.25032,0.52836 -44.5518,6.11385c-46.3661,5.97041 -92.1348,26.12911 -123.47163,61.54787c-0.19116,-3.78908 -5.04203,-6.31387 -3.53584,-10.33693zm0.56006,21.59657c2.46893,-17.16783 19.59014,-26.10648 31.49495,-36.53964c40.07716,-28.36518 90.31613,-39.61352 138.89854,-37.70576c1.20387,19.56051 -8.00084,38.23036 -19.07559,53.7263c-15.20721,8.47826 -34.11861,-1.17561 -50.23914,6.54221c-28.27367,6.8441 -59.74523,15.46761 -77.84163,40.11734c-6.57559,19.79451 -20.47401,-0.35286 -21.54921,-12.00313c-1.52846,-4.62877 -1.3158,-9.384 -1.6879,-14.13731zm7.76269,-58.70418c2.42006,-21.53997 16.61662,-39.35048 29.64042,-55.76294c14.68114,-17.49181 34.66698,-30.31521 57.12629,-35.01287c17.80165,-4.64955 36.14864,-6.58389 54.39959,-8.53692c13.84103,10.63111 22.64574,29.11792 20.32661,46.60463c-10.75017,2.72292 -29.7578,-6.48294 -44.25362,-4.23798c-41.11142,0.38721 -83.13954,16.86419 -110.9226,47.60359c-2.31326,2.96635 -4.3931,6.11006 -6.31669,9.34248zm-2.20363,84.97105c15.37329,12.3277 15.8773,33.69405 25.32488,49.77684c-11.32475,-14.57886 -21.29314,-31.61081 -25.32488,-49.77684zm12.17333,11.7446c4.82258,-13.28815 19.94093,-31.96367 32.55468,-30.57486c5.04242,12.98813 7.22698,27.06129 15.42273,38.77007c22.00548,40.39473 62.27551,75.33984 110.15025,76.43997c7.82913,1.58691 28.58411,-3.6853 27.74063,-1.50394c-20.00963,9.82742 -43.17618,11.98239 -65.22374,11.19174c-40.94611,-2.71915 -81.7309,-22.38535 -106.34646,-55.65858c-6.96676,-11.95032 -10.92698,-25.33659 -14.29809,-38.66251zm33.70255,-33.88084c11.04849,-5.13829 31.74819,-20.7682 40.05036,-8.17067c20.26116,39.90601 54.51507,73.83781 96.68548,89.7942c21.8947,7.30453 46.52556,7.18939 67.87685,-1.92662c-8.90472,13.82597 -23.64018,22.69292 -37.52655,30.83714c-35.49046,15.14874 -78.39111,6.93469 -108.29421,-16.68286c-28.94243,-22.9118 -51.66176,-55.70389 -58.71476,-92.285l-0.04169,-0.84726l-0.03548,-0.71893l0,0l0,0zm14.80587,-143.69432c26.85995,-18.47492 60.14433,-27.13922 92.60995,-24.83766c-16.61871,10.60714 -37.47179,6.57748 -55.695,12.32051c-12.71339,2.76803 -25.33243,6.4903 -36.91495,12.51714zm23.19239,130.17215c17.68391,-8.37067 37.80864,-8.2348 56.92004,-7.08942c11.52194,17.94525 19.73788,38.80402 37.6284,51.74121c20.84937,18.617 51.18832,23.87227 77.45898,15.12419c9.02167,-6.09496 19.03778,-2.20023 14.1109,9.88971c-5.93085,20.07378 -26.98962,28.88977 -46.28781,29.86346c-39.48146,3.94382 -75.60028,-18.48682 -102.27098,-45.57831c-15.55914,-15.57706 -28.70033,-33.74123 -37.55954,-53.95085zm59.9713,-149.25921c14.39017,-11.41684 33.98842,-1.08634 48.71259,4.37706c14.6449,12.52997 16.60739,33.37817 20.47758,51.17717c6.47049,41.78263 3.85324,86.6684 -15.69031,124.8082c-4.67027,13.36929 -18.09242,20.61154 -26.69522,6.15724c-9.99724,-11.02568 -17.64142,-23.85532 -24.85538,-36.77173c-4.26648,-12.35977 9.69913,-21.07201 12.62395,-32.37317c5.6987,-11.2672 7.1479,-23.94022 7.7876,-36.27168c2.68518,-18.44756 0.04341,-37.58501 -4.80806,-55.44724c-3.40224,-9.88385 -8.92734,-19.45691 -17.55275,-25.65586zm41.36089,197.33399c28.32747,-32.0033 32.81847,-77.44762 30.6862,-118.36129c-1.29825,-24.12249 -4.96657,-49.05092 -17.68674,-70.0582c13.14473,0.40704 27.28206,12.75397 37.58124,21.8466c29.18982,37.11403 37.77368,91.40852 15.58273,134.05255c-8.72922,17.24329 -20.55305,32.80717 -34.43375,46.22929c-11.62009,-0.9548 -23.39864,-5.3515 -31.72969,-13.70895zm32.30334,13.89389c30.50691,-29.40305 52.59978,-71.66214 46.00664,-114.99303c-2.62479,-20.29454 -10.03497,-39.89902 -21.13239,-57.06778c20.32477,12.66527 31.62595,35.09759 41.79111,55.93748c14.61285,36.42265 6.66864,80.8159 -19.44537,109.92648c-13.41086,7.60643 -32.33356,8.77071 -47.21999,6.19685zm50.22404,-6.80072c10.46527,-18.28113 22.34006,-36.81323 23.43076,-58.50224c1.62656,-7.25171 -0.89633,14.22787 -1.77191,18.74721c-2.78329,15.96013 -6.41766,32.99399 -16.3092,46.01608c-2.27573,-1.26239 -1.2605,-7.4102 -5.34964,-6.26105z", "bolt": "m178.14388,74.00616l-108.49727,68.79685l107.15599,23.63498l-99.04335,73.85934l-39.98779,-12.47227l28.36194,71.19228l112.7131,-31.06076l-47.58928,-12.98325l129.22581,-106.08589l-118.12698,-19.22734l114.07071,-71.6874l-65.0681,-10.76349l70.86891,-45.56109l-26.03423,-0.65478l-109.97452,62.50492l51.92505,10.50792z", "car_smart": "m28.92024,238.37814c-20.54175,-8.15092 -27.36674,-32.3504 -27.6178,-52.52942c-2.7836,-14.94118 14.71887,-25.93048 8.95686,-41.2937c-2.18657,-22.71175 4.68564,-45.20703 14.9548,-65.22043c0.32475,-12.85873 10.87969,-17.84956 22.37955,-17.11762c37.15603,-4.71741 74.98359,-4.84966 112.15372,-0.39277c22.18198,4.11681 39.85953,19.32546 58.61859,30.81274c11.63586,8.63808 25.21985,14.32888 36.92355,22.63131c12.64026,10.62529 24.51556,22.47708 33.27448,36.57193c3.15143,14.09033 7.38165,28.09947 9.54742,42.2829c4.39661,13.27223 -4.6037,21.62047 -11.41214,30.84103c-10.34,12.57306 -29.90723,17.53416 -44.71561,10.78313c-10.28528,-3.75465 -14.07077,-19.70746 -25.7968,-18.60466c-44.20906,-0.65964 -88.41812,-1.31926 -132.62719,-1.97884c-10.24168,13.44736 -24.40165,28.14365 -42.91705,26.05086c-4.02312,-0.33679 -7.97831,-1.33774 -11.7224,-2.83646z", @@ -19,7 +19,7 @@ "dagger": "m1.57422,47.21264c-2.775,14.24454 5.08469,27.79975 11.2199,40.10517c13.07098,21.70464 28.2358,42.59465 47.26681,59.46329c12.98537,10.6889 24.68548,22.99878 39.38902,31.4678c19.22253,12.95224 39.86254,23.55869 61.26455,32.3793c15.9138,6.93546 32.60274,11.85577 49.65401,15.08282c4.95967,1.28564 18.82625,4.91663 10.19991,-3.60251c-7.15544,-3.02133 -14.76756,-5.22583 -21.96236,-8.37695c-34.92769,-14.34082 -72.04247,-26.94104 -100.21951,-53.10463c-4.66899,-6.20064 8.95855,3.3492 11.3067,5.96803c23.50703,16.73581 50.36192,27.95749 76.84653,39.04178c13.47301,4.46384 28.20039,13.97903 42.51408,7.22675c12.36502,-4.72467 -2.95702,-5.44891 -8.42033,-7.24844c-24.28337,-6.90491 -48.85286,-13.54227 -71.13893,-25.76019c-12.72568,-4.65573 -23.42126,-13.22678 -34.85331,-20.29132c-12.35065,-8.53128 -23.65424,-18.49934 -35.67798,-27.49634c-7.86864,-5.96642 -15.68669,-11.98865 -22.20108,-19.46664c-11.01625,-11.02383 -21.70009,-22.36108 -31.68482,-34.33246c-6.52307,-7.36439 -13.86146,-14.10685 -18.44664,-22.93894l-5.05655,-8.11652zm256.45175,139.13108c-1.50562,-0.04745 -3.06,0.28214 -4.36211,1.15021c-9.72246,4.86124 -7.63908,13.88922 -13.19478,20.83386c-4.16678,5.55569 -9.028,8.33356 -15.97261,10.41693c1.38892,2.77783 4.16675,6.94461 4.16675,10.41693c0,7.63907 -9.02798,14.58368 -15.97261,13.88922c-2.77786,-0.69446 -9.028,-4.16678 -11.11139,0c-0.69446,1.38895 -0.69446,2.77786 0,3.47232c0,2.77786 3.47231,4.16678 6.25015,5.55569c7.63908,2.08337 15.97263,-0.69446 22.22279,-4.86124c4.86122,-2.77783 8.33353,-7.63907 9.72246,-13.19479l1.38892,-9.02798c0.69446,-2.77783 3.47232,-3.47232 6.94463,-8.33353c4.16676,-5.55569 8.33354,-15.2782 13.88924,-19.44495c2.08337,-1.38892 4.16675,-2.0834 6.94461,-2.77786c-1.38892,-2.08337 -2.77786,-3.47229 -4.16678,-5.55566c-1.38892,-0.69449 -2.77783,-2.0834 -4.16675,-2.0834c-0.78128,-0.26041 -1.6792,-0.42728 -2.58252,-0.45575zm29.4061,26.21594c-2.61084,-0.02899 -5.33868,0.54254 -8.07312,1.32382l5.55569,3.47232c-1.38895,2.77783 -4.86121,8.33353 -4.16678,11.80585c0.69449,6.94461 10.41693,6.94461 14.58371,2.77783c4.86124,-5.55569 4.86124,-13.88922 -2.08337,-18.056c-1.82297,-0.91147 -3.78549,-1.30127 -5.81613,-1.32382zm-13.39011,3.40723c-0.54364,0.00192 -1.07498,0.00705 -1.60593,0.0217c-3.8486,0.21091 -7.69568,0.50116 -11.54541,0.67276c-2.41867,0.03116 -4.88754,-0.00473 -7.22676,0.69446c-3.17285,2.02515 -5.29396,5.38272 -6.53229,8.87607c-0.16666,0.50345 -0.30807,1.02072 -0.41234,1.54083c3.86218,1.74924 8.17189,1.5618 12.30499,1.41064c2.50439,-0.06696 5.00949,0.24561 7.50888,0.36893c1.7876,0.07916 3.57104,0.32327 5.36038,0.26044c2.19412,-0.07278 4.22598,-1.3168 5.38205,-3.16849c0.99927,-1.58255 1.9447,-3.21933 2.56085,-4.99146c0.49768,-1.59048 0.5896,-3.80087 -1.06339,-4.75272c-1.43857,-0.79446 -3.10013,-0.93906 -4.73105,-0.93317zm2.53915,15.9726c-0.69449,0.69446 -1.38892,0.69446 -2.0834,1.38892c-0.69446,3.47232 8.33356,11.80588 9.72247,4.16678c-3.47232,-1.38892 -5.55573,-2.77786 -7.63907,-5.55569z", "menorah": "m86.17095,270.72717c9.02267,-23.09398 33.59461,-36.70894 57.45916,-38.45409c0,-4.91623 0,-9.83244 0,-14.74866c-38.305,-2.75075 -76.20534,-18.86525 -101.66333,-48.29793c-23.2569,-24.97108 -35.58256,-58.55817 -37.27682,-92.42073c-13.45491,-9.58464 12.56556,-16.55834 15.7355,-5.95607c-7.24909,8.79617 -0.22592,22.59306 0.80432,33.36646c11.47956,50.91395 56.38975,91.60496 107.78628,98.82449c13.14264,5.82442 16.6395,-2.00252 14.39308,-13.99509c2.81267,-9.48175 -7.44086,-6.60333 -13.57417,-8.37358c-40.52152,-7.1041 -75.7263,-38.65041 -86.11595,-78.75394c-2.97659,-11.47399 -3.94458,-24.11363 -7.5694,-33.51495c7.70256,-6.02401 26.19639,-1.60448 15.97076,9.15671c1.09565,45.56244 38.91488,85.76277 83.65269,91.48959c9.24995,4.52249 8.18915,-3.21457 7.85701,-9.40932c4.90146,-15.06035 -9.71606,-12.79654 -19.53952,-16.50067c-27.62657,-9.39215 -47.87568,-36.35101 -49.79039,-65.51331c-13.2153,-11.51691 15.74928,-17.53994 15.95383,-5.55531c-7.59098,8.84892 0.96818,23.21689 5.54156,32.6564c10.3335,16.84724 28.24842,28.22102 47.83452,30.47823c0,-7.52246 0,-15.04491 0,-22.56738c-18.20905,-2.81535 -32.7534,-18.72141 -34.8131,-36.97318c-12.40635,-10.10166 14.58986,-14.97282 16.53119,-5.29626c-6.736,5.28018 -1.66743,13.75206 2.28733,19.47478c2.82583,3.38407 16.81124,15.16281 15.99458,6.28913c0,-10.03232 0,-20.06463 0,-30.09695c-8.52963,-5.41637 3.21713,-9.02356 -1.91258,-15.41792c2.95047,-6.63559 4.28693,-23.79965 6.49635,-24.00391c7.40089,10.5439 4.63795,25.17949 11.62167,34.34932c-3.85376,4.14688 -4.52328,8.74758 -3.86568,14.89357c0,8.05796 0,16.11592 0,24.17388c11.03737,-3.24367 21.02812,-12.42406 21.72646,-24.48188c-12.61211,-14.80839 30.69243,-11.52931 12.71999,1.59949c-1.87195,17.85434 -17.0993,32.57059 -34.44644,35.57887c0,7.49281 0,14.98562 0,22.47842c29.68999,-2.98224 55.87296,-29.1582 56.39926,-59.47436c-12.36238,-13.6567 27.91393,-12.75137 14.12813,-0.52898c-3.16423,14.80594 -6.23018,30.54218 -16.29872,42.63571c-12.70108,17.1765 -33.04718,27.37456 -53.98901,29.78134c0.16994,9.14496 -4.65584,28.46082 11.13493,20.75519c39.31322,-6.69104 72.74197,-39.63307 78.74797,-79.43351c5.73982,-8.84732 -8.70837,-25.00382 8.28397,-22.77648c10.50046,-2.44997 11.98193,6.34405 5.8692,11.72792c-2.04736,35.89314 -21.91298,70.45303 -53.09749,88.60141c-15.52945,9.13074 -33.16388,14.88533 -51.17824,15.85547c0.17836,7.53169 -0.4761,15.16116 0.61618,22.6142c35.31798,-2.81911 70.08339,-18.10321 93.11932,-45.67516c20.51892,-23.04272 31.08511,-53.43816 32.84753,-84.00375c-10.43478,-10.04525 11.39471,-11.61442 16.59445,-7.04305c-5.883,11.66189 -5.21661,27.04671 -9.11984,40.52295c-12.68921,53.08224 -58.41412,95.84925 -111.85593,105.51876c-7.32545,1.56883 -14.77785,2.36348 -22.20172,3.29227c-0.71042,9.09981 -0.50818,18.35449 11.59822,16.61531c20.59241,4.32626 40.36211,18.55411 46.94081,39.19469c-43.09088,0 -86.18179,0 -129.2727,0c0.31159,-0.88608 0.62314,-1.77219 0.93477,-2.65823zm-82.88959,-208.5947c-0.54892,-8.1144 4.33617,-25.42208 5.66115,-27.43132c2.27143,7.42761 12.58555,23.78434 4.72879,28.60384c-3.29131,-0.38358 -8.04816,1.57556 -10.38994,-1.17252zm34.52483,0.55147c-1.7146,-10.01769 5.4567,-19.41309 4.51432,-29.75311c3.2196,8.43034 16.36395,29.47998 1.96646,30.42084c-2.16732,-0.0773 -4.38702,0.03559 -6.48078,-0.66772zm35.62526,-0.17229c-1.52428,-9.82734 5.20364,-19.12723 4.61758,-29.264c3.98769,8.50923 17.39558,32.7104 -0.82941,30.07944l-1.91212,-0.12625l-1.87605,-0.68919l0,0zm34.60818,0.26421c-1.9521,-10.01891 5.40411,-19.48301 4.43661,-29.84504c3.27068,8.4848 16.29427,29.36411 1.98981,30.63179c-2.15335,-0.08198 -4.37302,0.0215 -6.42642,-0.78675zm69.2087,-0.38279c-1.5544,-10.07727 5.31645,-19.6095 4.34973,-30.05398c2.70531,5.08463 6.32187,13.73424 7.91895,20.50951c4.77353,11.03205 -3.95122,12.51878 -12.26868,9.54446zm35.71176,0.44493c-2.89404,-9.75608 5.30412,-19.55815 4.07715,-29.90718c3.42241,8.32418 12.40758,23.15913 6.53528,30.337c-3.53609,0.01955 -7.13571,0.41735 -10.61243,-0.42982zm34.8703,-0.20629c-2.23303,-8.13288 4.34842,-24.82986 5.07388,-28.23849c3.49849,8.39077 16.5291,33.58521 -2.7937,28.93562l-2.28018,-0.69713l0,0zm35.10023,-0.15336c-1.90784,-8.93159 5.20419,-21.786 4.83258,-28.71239c3.47043,8.02287 16.97986,32.30244 -0.94669,29.60343l-1.89111,-0.14957l-1.99478,-0.74147l0,0z", "chair": "m118.11539,289.55515c-7.47328,-14.4328 15.76004,-21.83389 9.75156,-35.26642c-9.58212,-8.59285 -23.93785,-6.58557 -35.88018,-5.92961c-12.89955,-1.58955 -16.67669,11.62587 -24.11323,17.11729c-14.66394,-4.57965 -9.41961,-23.5907 3.95336,-25.69879c17.48831,-7.56879 36.79559,-3.21786 54.96046,-6.57193c13.14571,-7.65541 -3.09947,-24.09541 -13.42245,-25.84244c-17.08451,-6.9008 -38.18468,-7.0844 -51.24073,-21.62146c-5.1916,-11.32457 -3.84497,-32.04767 10.15321,-36.01445c6.34414,-10.73523 5.01785,-24.55999 3.35027,-36.47948c1.42348,-12.67513 -26.70474,-5.25126 -14.90233,-18.24577c10.64336,-8.15804 24.36629,-13.15867 37.81105,-12.959c10.96933,0.36309 11.71716,12.99065 -0.37628,9.89848c-12.30081,6.18077 -7.72121,23.86169 -7.25122,35.16668c5.93514,11.39347 22.04794,5.36764 32.49831,7.07384c14.8665,0.39955 21.73593,0.44463 35.83476,5.23605c14.25958,-1.05464 8.64325,-20.61657 0.17079,-21.97119c-13.03212,-2.87206 -25.91483,-10.25501 -33.20317,-21.62909c-4.07215,-13.26593 1.69855,-27.24597 4.77583,-40.18096c9.18196,-28.0861 34.13237,-54.57027 65.33606,-54.63913c19.15414,0.28833 38.85675,14.48402 42.13089,33.82922c2.48616,20.34066 -5.57245,41.0622 -0.32005,61.11538c12.75343,7.04288 -8.70227,17.78406 -9.16336,27.50478c-5.43883,14.13736 6.97403,30.55498 -3.65417,43.29654c-6.64983,9.38159 -22.16026,14.5639 -22.43275,27.04953c-3.81845,11.24202 -21.47061,10.39703 -30.28923,17.71931c-9.74564,2.86838 -15.08257,19.17726 -0.15649,15.9317c14.55153,-0.35892 29.03516,-5.81784 43.55118,-3.3181c10.39314,7.10063 -0.45073,21.22018 -10.9113,14.54475c-5.46445,0.08383 -25.63857,2.80356 -18.76688,8.69054c17.18895,4.015 35.8273,9.2104 46.95854,24.0352c10.43184,13.90863 -12.73763,17.22995 -17.34935,5.0022c-19.29245,-15.75378 -48.30531,-24.24933 -70.97163,-10.48508c-13.71143,5.73386 -10.53542,20.53958 -11.98199,31.56015c-5.57972,6.09451 -13.26627,-2.5275 -14.84946,-7.91876zm100.26077,-153.99353c-4.62421,-8.64436 -27.69229,-17.16811 -30.82967,-4.71919c1.76141,12.68575 19.62196,15.68971 29.15408,10.51048c1.73547,-1.32053 2.45361,-3.74493 1.67558,-5.79129z", - + "bone": "m273.3559,119.27242c-11.58661,5.90293 -23.89537,9.95385 -36.67676,12.27164c-53.42084,0.2984 -105.13121,0.41397 -158.74251,2.97562c-14.28426,-2.65407 -30.58815,0.18161 -42.82426,-9.13783c-9.06827,-7.25944 -28.17529,-2.4415 -25.05096,11.36483c6.17649,14.08824 -14.61965,21.70474 -7.59176,36.00003c6.11589,14.67987 24.54805,9.02721 35.59484,4.1729c20.29636,-4.79665 40.55842,-9.8537 60.92737,-14.38416c42.52868,-4.82219 82.54949,-1.83121 124.59118,1.02063c11.68694,2.54654 23.55803,4.03351 35.45654,5.38187c10.1839,0.16006 18.34979,7.46698 27.92017,8.65919c12.6539,-1.22533 16.41983,-19.19981 7.59747,-27.17406c-13.18918,-8.72406 6.75436,-24.14882 -8.14166,-31.38885c-4.25287,-2.31086 -8.733,-0.75754 -13.05966,0.23817z", "raph_gear2": "m162.95016,254.38129c-2.80937,0.26439 -5.68164,0.44717 -8.63573,0.44717l0,0c-2.64238,0 -5.20918,-0.14467 -7.71307,-0.35916l0,0l-21.68047,27.86606l-5.33187,-1.51157c-6.25791,-1.75732 -12.33638,-3.96201 -18.18163,-6.60748l0,0l-5.06733,-2.29276l1.30382,-35.00255c-4.60764,-3.22517 -8.90648,-6.81548 -12.88757,-10.75204l0,0l-34.27816,7.36342l-3.13052,-4.59854c-3.67223,-5.39792 -6.80273,-11.05444 -9.57725,-16.77345l0,0l-2.40936,-4.99521l23.2742,-25.7621c-1.45512,-5.4549 -2.41877,-11.08614 -2.91638,-16.82405l0,0l-30.84222,-16.30753l0.56056,-5.52432c0.66148,-6.60759 1.94003,-12.93144 3.46751,-19.00977l0,0l1.36378,-5.39204l34.401,-4.76184c2.45332,-5.17765 5.34148,-10.08439 8.59473,-14.69526l0,0l-13.12671,-32.31919l3.96201,-3.8801c4.65784,-4.53519 9.64348,-8.64822 14.84618,-12.40874l0,0l4.50686,-3.24997l29.69582,18.65062c5.00454,-2.30524 10.23878,-4.20122 15.66204,-5.65638l0,0l10.76474,-33.40262l5.54927,-0.4219c2.98885,-0.22039 6.20128,-0.47875 9.69389,-0.47875l0,0c3.48323,0 6.68608,0.25836 9.67506,0.47875l0,0l5.54912,0.4219l10.88121,33.74931c5.21544,1.45478 10.27031,3.31305 15.11414,5.56818l0,0l30.11157,-18.91571l4.52254,3.25032c5.20284,3.75422 10.19766,7.8798 14.84639,12.39616l0,0l3.97758,3.8801l-13.52985,33.27679c2.94791,4.28308 5.60591,8.81837 7.87672,13.58657l0,0l35.47502,4.91299l1.37939,5.39169c1.54953,6.07229 2.82196,12.39613 3.46741,19.01633l0,0l0.56073,5.52397l-31.91942,16.87434c-0.47862,5.23462 -1.32898,10.3871 -2.59824,15.40709l0,0l24.04893,26.56871l-2.41867,5.01361c-2.76517,5.73837 -5.88004,11.41356 -9.56799,16.79272l0,0l-3.13049,4.58539l-35.12848,-7.52676c-3.72264,3.72243 -7.75381,7.14909 -12.06235,10.24184l0,0l1.33846,35.68912l-5.07996,2.29913c-5.85167,2.6329 -11.92058,4.84381 -18.17828,6.6012l0,0l-5.351,1.51169l-21.72769,-27.93539l0,0zm27.87856,8.93823c1.87401,-0.62378 3.71637,-1.29791 5.53973,-2.01599l0,0l-1.25342,-33.70486l3.95258,-2.53862c5.92082,-3.84203 11.31258,-8.453 16.09976,-13.68709l0,0l3.18718,-3.48941l33.239,7.11739c0.99838,-1.66928 1.96515,-3.37619 2.89732,-5.12077l0,0l-22.73553,-25.13866l1.41093,-4.49123c2.00607,-6.46886 3.14622,-13.40402 3.48315,-20.64091l0,0l0.20787,-4.71185l30.19965,-15.961c-0.31488,-1.93385 -0.67691,-3.85492 -1.0896,-5.78259l0,0l-33.60109,-4.64815l-1.80759,-4.34639c-2.7023,-6.50063 -6.27693,-12.58513 -10.54437,-18.19731l0,0l-2.82191,-3.74155l12.78032,-31.43731c-1.48026,-1.29786 -2.99829,-2.5574 -4.55721,-3.77935l0,0l-28.5273,17.90761l-4.2014,-2.2175c-6.22311,-3.27536 -12.95352,-5.76342 -20.05234,-7.37577l0,0l-4.59178,-1.0518l-10.30167,-31.94773c-1.00163,-0.05022 -1.97475,-0.07566 -2.92271,-0.07566l0,0c-0.96696,0 -1.94005,0.02544 -2.94794,0.07566l0,0l-10.22914,31.73996l-4.65805,0.99522c-7.22169,1.54925 -14.10935,4.07524 -20.52469,7.39468l0,0l-4.19198,2.17928l-28.06441,-17.62396c-1.54948,1.22195 -3.07073,2.48149 -4.53823,3.77935l0,0l12.44003,30.61225l-2.9225,3.74755c-4.55724,5.8516 -8.34605,12.26398 -11.18684,19.14856l0,0l-1.79825,4.3651l-32.5209,4.49724c-0.41253,1.92767 -0.77778,3.84874 -1.08328,5.78259l0,0l29.15414,15.41315l0.17944,4.74907c0.30542,7.66602 1.58731,15.02303 3.79182,21.90135l0,0l1.44259,4.52234l-22.01771,24.35774c0.92602,1.75093 1.88968,3.45782 2.89761,5.127l0,0l32.33173,-6.96017l3.21879,3.48952c4.96029,5.42989 10.62607,10.14755 16.86828,14.06561l0,0l4.02816,2.51289l-1.23148,33.18852c1.82667,0.71808 3.67535,1.39221 5.54923,2.01599l0,0l20.46497,-26.31657l4.67366,0.57292c3.52736,0.4473 6.96019,0.73706 10.37738,0.73706l0,0c3.67532,0 7.3821,-0.32111 11.17093,-0.85657l0,0l4.71475,-0.66118l20.62231,26.52434l0,0zm9.32855,-68.34235l4.50986,6.92841l-28.59032,18.60074l-10.14731,-15.61513l0,0c-3.69124,0.90065 -7.5713,1.43016 -11.60878,1.43016l0,0c-27.93851,0 -50.57646,-22.64441 -50.57646,-50.55453l0,0c0,-27.93514 22.63795,-50.5733 50.57646,-50.5733l0,0c27.90698,0 50.55104,22.63816 50.55104,50.5733l0,0c0,11.46997 -3.85472,22.09612 -10.31726,30.58083l0,0l5.60277,8.62953m-19.23358,2.66414l0.89128,-0.56667l-8.15065,-12.54086l4.72406,-4.72429c6.17615,-6.1917 9.96483,-14.63838 9.96483,-24.04268l0,0c-0.03468,-18.80183 -15.2589,-34.02641 -34.03877,-34.064l0,0c-18.8241,0.0376 -34.03256,15.24316 -34.06407,34.064l0,0c0.03151,18.78311 15.25571,34.00732 34.06407,34.04527l0,0c4.20117,0 8.24515,-0.86304 12.15982,-2.36212l0,0l6.24211,-2.39357l8.20732,12.58492l0,0z", "raph_gear": "m245.88898,160.48737l33.405,-17.66776c-0.65668,-6.5461 -1.92581,-12.89622 -3.51349,-19.1387l-37.10818,-5.13857c-3.21184,-7.73717 -7.45319,-14.91318 -12.43881,-21.50042l14.14514,-34.78872c-4.65118,-4.53608 -9.67427,-8.67167 -14.96115,-12.47703l-31.50966,19.78136c-7.38905,-3.88574 -15.35004,-6.83701 -23.70718,-8.73246l-11.3871,-35.2773c-3.22949,-0.24387 -6.45805,-0.50152 -9.75151,-0.50152s-6.51289,0.2517 -9.75209,0.50152l-11.27429,34.96482c-8.58116,1.83471 -16.71793,4.82026 -24.29691,8.75396l-31.01895,-19.49038c-5.28019,3.80536 -10.30307,7.94096 -14.95388,12.47703l13.75587,33.82779c-5.36137,6.87132 -9.85005,14.45284 -13.22145,22.62391l-35.93671,4.97007c-1.58098,6.23371 -2.85675,12.5771 -3.50667,19.13792l32.25408,17.06512c0.36542,8.98315 1.85477,17.68929 4.49208,25.88777l-24.33074,26.9024c2.83031,5.87039 5.9814,11.56342 9.6267,16.90457l35.82153,-7.69016c5.87321,6.39034 12.56474,11.98932 19.94749,16.61948l-1.35777,36.65076c5.88309,2.65335 11.99571,4.87399 18.29496,6.64899l22.66223,-29.13004c4.02098,0.51334 8.09276,0.85909 12.24583,0.85909c4.49908,0 8.89894,-0.40645 13.22795,-1.00122l22.78024,29.29164c6.30914,-1.77295 12.41245,-3.99347 18.29494,-6.64697l-1.38397,-37.30896c7.03673,-4.55559 13.41745,-10.00571 19.04277,-16.15907l36.75313,7.88618c3.64532,-5.34033 6.79684,-11.0273 9.62613,-16.9026l-25.11879,-27.78322c2.41295,-7.76558 3.76083,-15.96324 4.15324,-24.41928zm-55.52159,42.4395l-15.83789,10.31044l-9.74136,-14.9669c-5.0676,1.94922 -10.52345,3.13446 -16.2748,3.13446c-25.11868,0 -45.47503,-20.36435 -45.47503,-45.47913c0,-25.1158 20.35635,-45.47227 45.47503,-45.47227c25.11212,0 45.47591,20.35647 45.47591,45.47227c0,12.5506 -5.08424,23.89621 -13.30255,32.12807l9.68069,14.87306z", @@ -27,4 +27,4 @@ "raph_hammer": "m63.36809,285.67313c6.96776,3.59244 16.47661,11.9801 23.84013,8.91132c4.83001,-1.9863 7.65633,-13.23322 10.6572,-19.15341c22.58896,-44.50285 47.13901,-95.11987 65.00839,-138.42389c0,-1.93199 1.02618,-3.42567 -0.49857,-6.05217c9.99582,-16.27104 16.78117,-34.14814 27.70221,-52.25417c3.45876,-5.75348 6.97752,-13.7377 11.82889,-16.03837l8.95993,-3.73985c11.39044,-2.92912 19.71024,-2.82827 27.65184,4.81071c4.0269,3.89508 5.87952,10.31972 9.77467,14.18769c2.63412,2.64196 12.67062,9.14025 16.40283,8.13548c2.89996,-0.78365 5.28986,-3.70498 7.32275,-7.40622l7.07837,-13.07806c1.98428,-3.72042 3.11331,-7.30138 2.18805,-10.16062c-1.19101,-3.68168 -12.12384,-8.54287 -15.78421,-9.30328c-5.37122,-1.15219 -11.73761,0.82254 -17.20779,-0.41896c-10.75037,-2.47131 -15.38852,-9.37697 -19.15163,-20.54245c-26.52289,-15.59208 -62.23056,-25.72946 -103.80629,-12.65136c-11.27793,3.54983 -22.08852,6.24227 -29.50239,13.45449c-1.48589,4.18987 1.45297,5.02407 4.53523,4.97355c-2.41113,2.19592 -6.30618,3.46841 -4.05797,8.62437c25.3744,-11.6543 74.64912,-15.68129 77.99525,8.17434c0.73132,5.31115 -4.01729,12.62416 -6.93675,18.66467c-9.2043,19.05656 -20.45122,34.51673 -28.60803,51.77705c-3.03192,0.17072 -3.72249,1.82726 -5.34029,2.91743c-26.48211,38.64464 -55.43742,86.86412 -80.34243,130.11772c-3.31706,5.75339 -11.16743,14.25751 -10.19173,19.38232c1.46458,7.8407 13.51648,11.49146 20.48232,15.09167z", "raph_lock": "m222.74843,140.97418l0,-31.60164l-0.00876,0c-0.01239,-39.003 -31.62297,-70.60465 -70.62114,-70.60465s-70.62597,31.6186 -70.62597,70.62157l0,0l0,31.58472l-25.54068,0l0,135.66266l192.32891,0l0,-135.66266l-25.53236,0zm-118.94279,-31.58472c0,0 0,0 0,0c0,-26.65088 21.67455,-48.3259 48.3129,-48.3259c26.65535,0 48.32988,21.67502 48.32988,48.30898c0,0 0,0 0,0l0,31.60164l-96.64278,0l0,-31.58472z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/raphael.txt b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/raphael.txt index b688327..0cd8be2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/raphael.txt +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/raphael.txt @@ -9,4 +9,4 @@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -The software is provided 鈥渁s is鈥�, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. \ No newline at end of file +The software is provided 鈥渁s is鈥�, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/social.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/social.json index d8d8026..b87a204 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/social.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/social.json @@ -14,4 +14,4 @@ "logo_apple": "M21.367,4.494c-3.318,0.611-4.42,3.39-4.463,4.979c1.824,0.132,2.967-0.899,3.432-1.502 C21.097,7.115,21.281,5.91,21.367,4.494z M21.775,9.983c-2.399,0-3.739,0.98-4.398,0.991c-0.759-0.059-2.967-0.947-4.255-0.961 c-4.51,0.134-5.8,5.035-5.744,7.142c0.367,8.065,5.289,10.148,6.093,10.343c0.646,0.127,2.821-0.995,4.42-0.943 c1.747,0.182,2.969,0.905,3.669,0.855c0.889-0.062,3.783-2.4,4.656-6.007c-1.758-1.487-2.844-2.836-2.941-4.114 c-0.046-0.579,0.825-3.85,2.212-4.769c0.2-1.13-1.86-2.564-3.476-2.532C21.931,9.985,21.853,9.983,21.775,9.983z", "raph_feed": "M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/symbol.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/symbol.json index 8456002..a8bd0a2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/symbol.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/symbol.json @@ -32,4 +32,4 @@ "skull": "m74.9404,81.44109c-2.88919,16.35929 -10.26919,31.99403 -10.76614,48.86361c0.66122,9.76746 -5.89156,15.01402 -14.86213,14.8293c-9.64813,10.00099 1.19087,25.80647 12.10749,29.84357c11.14103,7.47832 24.96226,-0.87791 35.99846,5.83044c14.65424,11.4554 20.77205,31.76607 15.71635,49.57211c-5.02672,14.69893 20.70476,9.35306 11.02628,-2.39693c-7.47506,-11.48471 14.09103,-7.68764 8.56998,3.21603c-1.04326,8.75262 6.45616,11.58562 3.11867,20.06531c8.69472,4.98558 -0.72885,7.77708 -6.02475,8.71843c-12.40178,6.18225 2.24324,-11.07452 -7.58144,-16.17874c-8.99694,1.95532 -2.90059,17.02136 -5.98875,15.28125c-6.3575,-4.97824 -6.35281,-23.59047 -17.02285,-11.44621c-3.54128,-14.96387 2.92009,-30.54814 -2.05737,-45.42514c2.03897,-11.11034 -15.50281,-14.9426 -13.28409,-2.05647c0.88449,19.66696 -5.0876,39.29475 -1.66005,58.86481c4.72071,12.07065 17.92378,17.50833 26.2104,26.82291c6.80557,7.18207 15.6284,14.86087 26.22089,12.5997c12.0141,-0.52078 24.05035,-1.63034 36.01024,0.2771c15.04311,0.47446 26.52666,-11.41623 39.36443,-17.5242c15.0918,-11.98355 12.71564,-33.38867 11.21118,-50.43889c-1.84476,-10.52664 2.20334,-21.05807 1.44894,-31.48618c-10.88037,-13.31276 -19.80722,10.08708 -16.70779,20.14043c-0.00076,12.64635 2.42783,28.93701 -9.63577,37.17496c-9.95572,-0.25104 -19.43069,3.36517 -29.4632,1.4744c-8.14081,4.83435 -21.32692,4.71021 -24.01404,-6.79811c-1.07281,-10.22015 3.55807,-20.93494 -2.73401,-30.47318c5.52835,4.7614 15.17361,-4.11226 9.79822,6.56248c-6.55643,8.68922 5.55173,22.07874 10.10989,9.25331c1.51227,-8.60512 -6.54141,-20.02596 6.69714,-18.18237c2.6998,3.03528 -9.21959,24.26701 7.07346,18.90152c11.61606,-2.54445 -2.06659,-20.76607 13.66382,-20.82939c7.61295,-8.9626 5.56317,-25.76184 17.20825,-32.56114c12.98419,-8.78706 33.2569,-2.44315 42.52423,-17.32399c7.89911,-7.61507 4.18182,-28.72154 -9.44128,-21.72794c-17.02448,1.65962 -3.51318,-23.0582 -3.98819,-32.32024c4.01126,-8.06691 -4.87137,-25.04774 -1.81268,-26.84933c5.77948,8.84253 7.84946,19.18484 6.60651,29.51878c-0.10681,8.76352 -3.8233,32.51385 8.36014,17.87288c4.12442,-10.20347 2.92487,-21.76073 5.86331,-32.37626c5.66748,-22.91865 -4.48026,-45.85004 -15.79309,-65.262c-9.63495,-10.45038 -21.86679,-18.78104 -33.35342,-26.98327c-19.32092,-7.26658 -40.65421,-8.56836 -61.06006,-6.74718c-18.04979,3.12863 -37.13738,6.42709 -51.51633,18.73374c-14.01352,8.25707 -27.43441,19.22373 -32.97453,35.08961c-4.82798,12.78156 -13.28239,25.798 -9.43994,39.99647c3.67479,11.83601 1.72576,24.12813 2.32075,36.22574c6.26442,13.82637 12.1788,-7.07504 11.59255,-13.98853c0.3468,-13.11021 7.26362,-24.71465 12.36033,-36.35318zm115.06042,28.12622c12.88235,0.92311 29.19336,8.09689 29.54492,23.0528c1.95883,15.00865 -10.16846,29.55684 -25.7099,28.08501c-14.11661,-1.15955 -23.14499,-13.35332 -22.20761,-27.06258c-4.7262,-9.82969 2.6286,-20.35741 12.49942,-22.61709c1.91415,-0.64365 3.88168,-1.12543 5.87317,-1.45815zm-86.93419,1.27835c14.94448,-2.65778 31.94749,6.61306 31.99739,23.15527c1.40359,15.99194 -15.57494,19.12508 -27.15695,23.1313c-8.01422,5.17467 -16.3391,0.35667 -22.99829,-4.85698c-8.63997,-9.0434 -6.10048,-27.26721 3.02245,-35.52229c4.42388,-3.27404 9.90028,-4.56108 15.1354,-5.9073zm51.1378,42.18812c7.2348,9.94383 15.92023,25.10751 6.56407,36.39339c-8.30571,6.66107 -9.35284,-9.47466 -18.07048,-1.8754c-8.17816,-7.1624 -0.63536,-21.73717 5.10291,-29.01329c1.8913,-2.09525 4.05559,-3.93987 6.4035,-5.5047z", "raph_flag": "m240.17992,78.9644c1.22598,-4.74799 1.33473,-12.52493 0.24789,-17.29984l-3.59653,-15.765c-1.08669,-4.77488 -5.91939,-9.3663 -10.74547,-10.20189l-33.14604,-5.72574c-4.82259,-0.83558 -12.72205,-0.80831 -17.53783,0.06101l-35.90382,6.46623c-4.82602,0.8693 -12.72192,0.95758 -17.56489,0.20381l-35.12959,-5.47475c0.04414,0.16981 0.12224,0.31943 0.15971,0.48924l24.04452,114.23236l11.00362,1.90157c4.82584,0.83569 12.71503,0.80153 17.54104,-0.06088l35.89362,-6.47302c4.81578,-0.86253 12.72198,-0.95078 17.56494,-0.19707l38.54257,6.01137c4.84297,0.75369 8.06601,-2.56096 7.18282,-7.38327l-4.31631,-23.36539c-0.88985,-4.81586 -0.61493,-12.63371 0.60435,-17.38171l5.1554,-20.03702zm-172.47275,-52.27992c-4.81902,1.01868 -7.89938,5.72567 -6.88394,10.53465l51.30882,243.74065l18.18635,0l-52.06276,-247.38807c-1.03241,-4.82942 -5.7429,-7.90624 -10.54846,-6.88723z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/ui.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/ui.json index f5b34bd..ed5dd10 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/ui.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/ui.json @@ -52,4 +52,4 @@ "raph_plugin": "M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z", "raph_folder": "M29.124,12.75c-0.004-2.208-1.792-3.997-3.999-4V8.749H12.868c-0.505-1.622-2.011-2.808-3.805-2.811H6.188c-2.208,0.002-3.997,1.792-4.001,4v14.188c0.004,2.206,1.793,3.995,4.001,3.999h18.938c2.205-0.004,3.995-1.793,3.999-3.999V12.75zM6.188,7.937h2.875c1.046-0.004,1.917,0.834,1.983,1.876l0.058,0.937h14.022c1.093,0.002,1.997,0.906,1.999,2v0.495c-0.591-0.345-1.268-0.557-2-0.558H6.187c-0.732,0.001-1.41,0.214-2,0.559V9.937C4.19,8.843,5.094,7.939,6.188,7.937zM25.125,26.125H6.188c-1.093-0.002-1.997-0.908-2.001-2v-7.438h0.001c0.002-1.095,0.906-1.999,2-2.001h18.938c1.093,0.002,1.991,0.901,2,1.991v7.447C27.122,25.219,26.218,26.123,25.125,26.125z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/weather.json b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/weather.json index 7c6f8c3..1cd04ae 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/weather.json +++ b/web/public/SVGOrigin/Method-Draw-master/editor/extensions/shapelib/weather.json @@ -2,7 +2,7 @@ "size": 32, "fill": true, "data": { - "raph_sun": "M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z", + "raph_sun": "M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z", "raph_thunder": "M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z", "raph_snow": "M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z", "raph_hail": "M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z", @@ -19,4 +19,4 @@ "sun": "M29.166,15.999l-5.279,1.878v-3.754L29.166,15.999z M25.333,6.748l-2.405,5.062l-2.654-2.656L25.333,6.748z M16.083,2.917l1.877,5.28h-3.755L16.083,2.917z M6.832,6.748l5.061,2.406l-2.655,2.656L6.832,6.748z M3,15.999l5.28-1.876v3.754 L3,15.999z M6.832,25.25l2.406-5.06l2.655,2.655L6.832,25.25L6.832,25.25z M16.083,29.084l-1.878-5.281h3.755L16.083,29.084z M25.333,25.25l-5.06-2.404l2.654-2.655L25.333,25.25z M9.542,15.999L9.542,15.999c0-3.612,2.929-6.541,6.542-6.541 c3.612,0,6.542,2.929,6.542,6.541c0,3.613-2.93,6.542-6.542,6.542C12.47,22.541,9.542,19.612,9.542,15.999L9.542,15.999z", "umbrella": "M15.009,3.37v2.508C8.637,6.23,3.618,9.962,3.618,14.514c0-0.82,1.387-1.486,3.095-1.486 c1.709,0,3.096,0.666,3.096,1.486c0-0.82,1.386-1.486,3.095-1.486c0.813,0,1.552,0.156,2.105,0.402v12.228 c0,0.547-0.444,0.99-0.99,0.99c-0.547,0-0.991-0.443-0.991-0.99v-0.496h-1.981v0.496c0,1.641,1.332,2.973,2.972,2.973 s2.971-1.332,2.971-2.973V13.43c0.553-0.247,1.293-0.402,2.106-0.402c1.707,0,3.096,0.666,3.096,1.486 c0-0.82,1.387-1.486,3.094-1.486c1.711,0,3.098,0.666,3.098,1.486c0-4.551-5.02-8.283-11.393-8.636V3.37H15.009z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/icons/jquery.svgicons.js b/web/public/SVGOrigin/Method-Draw-master/editor/icons/jquery.svgicons.js index f6a33a8..e4794e2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/icons/jquery.svgicons.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/icons/jquery.svgicons.js @@ -12,10 +12,10 @@ 1. Create the SVG master file that includes all icons: -The master SVG icon-containing file is an SVG file that contains +The master SVG icon-containing file is an SVG file that contains <g> elements. Each <g> element should contain the markup of an SVG -icon. The <g> element has an ID that should -correspond with the ID of the HTML element used on the page that should contain +icon. The <g> element has an ID that should +correspond with the ID of the HTML element used on the page that should contain or optionally be replaced by the icon. Additionally, one empty element should be added at the end with id "svg_eof". @@ -37,10 +37,10 @@ - 'fallback (object literal)': List of raster images with each key being the SVG icon ID to replace, and the value the image file name. - + - 'fallback_path (string)': The path to use for all images listed under "fallback" - + - 'replace (boolean)': If set to true, HTML elements will be replaced by, rather than include the SVG icon. @@ -49,14 +49,14 @@ - 'resize (object literal)': List with selectors for keys and numbers as values. This allows an easy way to resize specific icons. - -- 'callback (function)': A function to call when all icons have been loaded. - Includes an object literal as its argument with as keys all icon IDs and the + +- 'callback (function)': A function to call when all icons have been loaded. + Includes an object literal as its argument with as keys all icon IDs and the icon as a jQuery object as its value. - 'id_match (boolean)': Automatically attempt to match SVG icon ids with corresponding HTML id (default: true) - + - 'no_img (boolean)': Prevent attempting to convert the icon into an <img> element (may be faster, help for browser consistency) @@ -68,7 +68,7 @@ $.getSvgIcon(id (string)); This will return the icon (as jQuery object) with a given ID. - + 6. To resize icons at a later point without using the callback, use this: $.resizeSvgIcons(resizeOptions) (use the same way as the "resize" parameter) @@ -77,8 +77,8 @@ $(function() { $.svgIcons('my_icon_set.svg'); // The SVG file that contains all icons - // No options have been set, so all icons will automatically be inserted - // into HTML elements that match the same IDs. + // No options have been set, so all icons will automatically be inserted + // into HTML elements that match the same IDs. }); Example usage #2: @@ -114,13 +114,13 @@ resize: function() { '#save_icon .svg_icon': 64 // The "save" icon will be resized to 64 x 64px }, - - callback: function(icons) { // Sets background color for "close" icon + + callback: function(icons) { // Sets background color for "close" icon icons['close'].css('background','red'); }, - + svgz: true // Indicates that an SVGZ file is being used - + }) }); @@ -139,7 +139,7 @@ icons_made = false, data_loaded = false, load_attempts = 0, ua = navigator.userAgent, isOpera = !!window.opera, isSafari = (ua.indexOf('Safari/') > -1 && ua.indexOf('Chrome/')==-1), data_pre = 'data:image/svg+xml;charset=utf-8;base64,'; - + if(opts.svgz) { var data_el = $('<object data="' + file + '" type=image/svg+xml>').appendTo('body').hide(); try { @@ -174,11 +174,11 @@ if(err.responseText) { svgdoc = parser.parseFromString(err.responseText, "text/xml"); if(!svgdoc.childNodes.length) { - $(useFallback); + $(useFallback); } $(function() { getIcons('ajax'); - }); + }); } else { $(useFallback); } @@ -186,12 +186,12 @@ } }); } - + function getIcons(evt, no_wait) { if(evt !== 'ajax') { if(data_loaded) return; // Webkit sometimes says svgdoc is undefined, other times - // it fails to load all nodes. Thus we must make sure the "eof" + // it fails to load all nodes. Thus we must make sure the "eof" // element is loaded. svgdoc = data_el[0].contentDocument; // Needed again for Webkit var isReady = (svgdoc && svgdoc.getElementById('svg_eof')); @@ -207,12 +207,12 @@ } data_loaded = true; } - + elems = $(svgdoc.firstChild).children(); //.getElementsByTagName('foreignContent'); - + if(!opts.no_img) { var testSrc = data_pre + 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNzUiIGhlaWdodD0iMjc1Ij48L3N2Zz4%3D'; - + testImg = $(new Image()).attr({ src: testSrc, width: 0, @@ -230,7 +230,7 @@ },500); } } - + var setIcon = function(target, icon, id, setID) { if(isOpera) icon.css('visibility','hidden'); if(opts.replace) { @@ -239,7 +239,7 @@ if(cl) icon.attr('class','svg_icon '+cl); target.replaceWith(icon); } else { - + target.append(icon); } if(isOpera) { @@ -248,23 +248,23 @@ },1); } } - + var addIcon = function(icon, id) { if(opts.id_match === undefined || opts.id_match !== false) { setIcon(holder, icon, id, true); } svg_icons[id] = icon; } - + function makeIcons(toImage, fallback) { if(icons_made) return; if(opts.no_img) toImage = false; var holder; - + if(toImage) { var temp_holder = $(document.createElement('div')); temp_holder.hide().appendTo('body'); - } + } if(fallback) { var path = opts.fallback_path?opts.fallback_path:''; $.each(fallback, function(id, imgsrc) { @@ -277,7 +277,7 @@ 'height': icon_h, 'alt': 'icon' }); - + addIcon(icon, id); }); } else { @@ -295,12 +295,12 @@ var h = svg.getAttribute('height'); svg.removeAttribute('width'); svg.removeAttribute('height'); - + var vb = svg.getAttribute('viewBox'); if(!vb) { svg.setAttribute('viewBox', [0,0,w,h].join(' ')); } - + // Not using jQuery to be a bit faster svgroot.setAttribute('xmlns', svgns); svgroot.setAttribute('width', icon_w); @@ -311,9 +311,9 @@ // Without cloning, Firefox will make another GET request. // With cloning, causes issue in Opera/Win/Non-EN if(!isOpera) svg = svg.cloneNode(true); - + svgroot.appendChild(svg); - + if(toImage) { // Without cloning, Safari will crash // With cloning, causes issue in Opera/Win/Non-EN @@ -329,7 +329,7 @@ } } - + if(opts.placement) { $.each(opts.placement, function(sel, id) { if(!svg_icons[id]) return; @@ -350,11 +350,11 @@ if(opts.callback) opts.callback(svg_icons); } - + fixIDs = function(svg_el, svg_num, force) { var defs = svg_el.find('defs'); if(!defs.length) return svg_el; - + if(isOpera) { var id_elems = defs.find('*').filter(function() { return !!this.id; @@ -362,9 +362,9 @@ } else { var id_elems = defs.find('[id]'); } - + var all_elems = svg_el[0].getElementsByTagName('*'), len = all_elems.length; - + id_elems.each(function(i) { var id = this.id; var no_dupes = ($(svgdoc).find('#' + id).length <= 1); @@ -372,7 +372,7 @@ // if(!force && no_dupes) return; var new_id = 'x' + id + svg_num + i; this.id = new_id; - + var old_val = 'url(#' + id + ')'; var new_val = 'url(#' + new_id + ')'; @@ -391,7 +391,7 @@ }); return svg_el; } - + function useFallback() { if(file.indexOf('.svgz') != -1) { var reg_file = file.replace('.svgz','.svg'); @@ -403,7 +403,7 @@ makeIcons(false, opts.fallback); } } - + function encode64(input) { // base64 strings are 4/3 larger than the original string if(window.btoa) return window.btoa(input); @@ -412,41 +412,41 @@ var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0, p = 0; - + do { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); - + enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; - + if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } - + output[p++] = _keyStr.charAt(enc1); output[p++] = _keyStr.charAt(enc2); output[p++] = _keyStr.charAt(enc3); output[p++] = _keyStr.charAt(enc4); } while (i < input.length); - + return output.join(''); } } - - $.getSvgIcon = function(id, uniqueClone) { + + $.getSvgIcon = function(id, uniqueClone) { var icon = svg_icons[id]; if(uniqueClone && icon) { icon = fixIDs(icon, 0, true).clone(true); } - return icon; + return icon; } - + $.resizeSvgIcons = function(obj) { // FF2 and older don't detect .svg_icon, so we change it detect svg elems instead var change_sel = !$('.svg_icon:first').length; @@ -467,5 +467,5 @@ }); }); } - -})(jQuery); \ No newline at end of file + +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-bottom.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-bottom.svg index 0b4362d..d9e409c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-bottom.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-bottom.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-center.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-center.svg index d604d73..794b59b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-center.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-center.svg @@ -1 +1,11 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <g id="Layer%201"> <path d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </g> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <g id="Layer%201"> + <path d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> + </g> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-left.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-left.svg index 1079f24..900e054 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-left.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-left.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-middle.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-middle.svg index a7eee20..5c29a26 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-middle.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-middle.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-right.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-right.svg index ed22609..f9733fd 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-right.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-right.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 ZM 0 0 L 27 0 L 27 27 L 0 27 L 0 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 ZM 0 0 L 27 0 L 27 27 L 0 27 L 0 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-top.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-top.svg index 8fa76ea..3557230 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/align-top.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/align-top.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 ZM 0 27 L 0 0 L 27 0 L 27 27 L 0 27 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 ZM 0 27 L 0 0 L 27 0 L 27 27 L 0 27 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/conn.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/conn.svg index 1af5e9a..37b3e0f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/conn.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/conn.svg @@ -26,4 +26,4 @@ </svg> </g> <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/eye.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/eye.svg index 7221582..0f69e1b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/eye.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/eye.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 26.575 14.5 C 25.0764 18.8131 19.7906 22 13.5 22 C 7.2094 22 1.9236 18.8131 0.425 14.5 C 1.9236 10.1869 7.2094 7 13.5 7 C 19.7906 7 25.0764 10.1869 26.575 14.5 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 ZM 20.5226 14.5 C 20.5226 10.9101 16.5538 8.0625 14.0226 8 C 13.8544 7.9958 14.6876 9.0074 14.5226 9.02 C 16.6163 9 18.5226 11.0783 18.5226 14.5 C 18.5226 17.9217 16.7413 19.625 14.5226 19.98 C 14.6876 19.9926 13.8543 21 14.0226 21 C 16.5851 21 20.5226 18.0899 20.5226 14.5 ZM 6 14.5 C 6 18.0899 9.9375 21 12.5 21 C 12.6682 21 11.835 19.9926 12 19.98 C 9.7813 19.625 8 17.9217 8 14.5 C 8 11.0783 9.9063 9 12 9.02 C 11.835 9.0074 12.6682 7.9958 12.5 8 C 9.9688 8.0625 6 10.9101 6 14.5 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 26.575 14.5 C 25.0764 18.8131 19.7906 22 13.5 22 C 7.2094 22 1.9236 18.8131 0.425 14.5 C 1.9236 10.1869 7.2094 7 13.5 7 C 19.7906 7 25.0764 10.1869 26.575 14.5 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 ZM 20.5226 14.5 C 20.5226 10.9101 16.5538 8.0625 14.0226 8 C 13.8544 7.9958 14.6876 9.0074 14.5226 9.02 C 16.6163 9 18.5226 11.0783 18.5226 14.5 C 18.5226 17.9217 16.7413 19.625 14.5226 19.98 C 14.6876 19.9926 13.8543 21 14.0226 21 C 16.5851 21 20.5226 18.0899 20.5226 14.5 ZM 6 14.5 C 6 18.0899 9.9375 21 12.5 21 C 12.6682 21 11.835 19.9926 12 19.98 C 9.7813 19.625 8 17.9217 8 14.5 C 8 11.0783 9.9063 9 12 9.02 C 11.835 9.0074 12.6682 7.9958 12.5 8 C 9.9688 8.0625 6 10.9101 6 14.5 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/italic.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/italic.svg index 483381d..b436794 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/italic.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/italic.svg @@ -1 +1,11 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <g id="Layer%201"> <path d="M 16.6855 8.9536 L 12.8818 22.146 C 12.6714 22.9009 12.5664 23.396 12.5664 23.6304 C 12.5664 23.7671 12.6221 23.8931 12.7334 24.0112 C 12.8447 24.1284 12.9619 24.187 13.0859 24.187 C 13.2959 24.187 13.5063 24.0942 13.7168 23.9087 C 14.2734 23.4517 14.9414 22.6226 15.7207 21.4224 L 16.3516 21.7935 C 14.4834 25.0474 12.498 26.6733 10.3955 26.6733 C 9.5913 26.6733 8.9512 26.4478 8.4751 25.9956 C 7.9985 25.5444 7.7607 24.9731 7.7607 24.2798 C 7.7607 23.8228 7.8657 23.2407 8.0762 22.5356 L 10.6553 13.6665 C 10.9023 12.813 11.0264 12.1704 11.0264 11.7368 C 11.0264 11.4653 10.9087 11.2241 10.6738 11.0132 C 10.4385 10.8032 10.1172 10.6978 9.709 10.6978 C 9.5234 10.6978 9.3008 10.7046 9.041 10.7163 L 9.2822 9.9741 L 15.5723 8.9536 L 16.6855 8.9536 ZM 15.5352 0.4185 C 16.3018 0.4185 16.9482 0.6851 17.4741 1.2163 C 17.9995 1.7485 18.2627 2.3921 18.2627 3.146 C 18.2627 3.9009 17.9966 4.5444 17.4648 5.0757 C 16.9326 5.6079 16.2896 5.8735 15.5352 5.8735 C 14.793 5.8735 14.1558 5.6079 13.624 5.0757 C 13.0918 4.5444 12.8262 3.9009 12.8262 3.146 C 12.8262 2.3921 13.0889 1.7485 13.6147 1.2163 C 14.1401 0.6851 14.7803 0.4185 15.5352 0.4185 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </g> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <g id="Layer%201"> + <path d="M 16.6855 8.9536 L 12.8818 22.146 C 12.6714 22.9009 12.5664 23.396 12.5664 23.6304 C 12.5664 23.7671 12.6221 23.8931 12.7334 24.0112 C 12.8447 24.1284 12.9619 24.187 13.0859 24.187 C 13.2959 24.187 13.5063 24.0942 13.7168 23.9087 C 14.2734 23.4517 14.9414 22.6226 15.7207 21.4224 L 16.3516 21.7935 C 14.4834 25.0474 12.498 26.6733 10.3955 26.6733 C 9.5913 26.6733 8.9512 26.4478 8.4751 25.9956 C 7.9985 25.5444 7.7607 24.9731 7.7607 24.2798 C 7.7607 23.8228 7.8657 23.2407 8.0762 22.5356 L 10.6553 13.6665 C 10.9023 12.813 11.0264 12.1704 11.0264 11.7368 C 11.0264 11.4653 10.9087 11.2241 10.6738 11.0132 C 10.4385 10.8032 10.1172 10.6978 9.709 10.6978 C 9.5234 10.6978 9.3008 10.7046 9.041 10.7163 L 9.2822 9.9741 L 15.5723 8.9536 L 16.6855 8.9536 ZM 15.5352 0.4185 C 16.3018 0.4185 16.9482 0.6851 17.4741 1.2163 C 17.9995 1.7485 18.2627 2.3921 18.2627 3.146 C 18.2627 3.9009 17.9966 4.5444 17.4648 5.0757 C 16.9326 5.6079 16.2896 5.8735 15.5352 5.8735 C 14.793 5.8735 14.1558 5.6079 13.624 5.0757 C 13.0918 4.5444 12.8262 3.9009 12.8262 3.146 C 12.8262 2.3921 13.0889 1.7485 13.6147 1.2163 C 14.1401 0.6851 14.7803 0.4185 15.5352 0.4185 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> + </g> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/polygon.svg b/web/public/SVGOrigin/Method-Draw-master/editor/images/polygon.svg index 3e4bc07..663f241 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/polygon.svg +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/polygon.svg @@ -1 +1,11 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <g id="Layer%201"> <path d="M 13.6027 0.5027 L 26.844 10.2723 L 21.6443 25.8845 L 5.1894 25.7637 L 0.2195 10.0769 L 13.6027 0.5027 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </g> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <g id="Layer%201"> + <path d="M 13.6027 0.5027 L 26.844 10.2723 L 21.6443 25.8845 L 5.1894 25.7637 L 0.2195 10.0769 L 13.6027 0.5027 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> + </g> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/images/svg_edit_icons.svgz b/web/public/SVGOrigin/Method-Draw-master/editor/images/svg_edit_icons.svgz index cb8c80c..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/images/svg_edit_icons.svgz +++ b/web/public/SVGOrigin/Method-Draw-master/editor/images/svg_edit_icons.svgz Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/index.html b/web/public/SVGOrigin/Method-Draw-master/editor/index.html index 095f56c..59f6dde 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/index.html +++ b/web/public/SVGOrigin/Method-Draw-master/editor/index.html @@ -1,18 +1,18 @@ <!DOCTYPE html> <html> <head> -<meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> -<meta http-equiv="X-UA-Compatible" content="chrome=1"/> -<link rel="icon" type="image/png" href="images/logo.png"/> + <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="chrome=1"/> + <link rel="icon" type="image/png" href="images/logo.png"/> -<!--{if svg_edit_release}> - <link rel="stylesheet" href="css/method-draw.compiled.css" type="text/css"/> -<!{else}--> + <!--{if svg_edit_release}> + <link rel="stylesheet" href="css/method-draw.compiled.css" type="text/css"/> + <!{else}--> <link rel="stylesheet" href="lib/jgraduate/css/jPicker.css" type="text/css"/> <link rel="stylesheet" href="lib/jgraduate/css/jgraduate.css" type="text/css"/> <link rel="stylesheet" href="css/method-draw.css" type="text/css"/> <link rel="stylesheet" href="css/fonts.css" type="text/css"/> -<!--{endif}--> + <!--{endif}--> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="apple-mobile-web-app-capable" content="yes"/> @@ -20,9 +20,9 @@ <script type="text/javascript" src="lib/jquery.js"></script> -<!--{if svg_edit_release}> - <script type="text/javascript" src="method-draw.compiled.js"></script> -<!{else}--> + <!--{if svg_edit_release}> + <script type="text/javascript" src="method-draw.compiled.js"></script> + <!{else}--> <script type="text/javascript" src="lib/pathseg.js"></script> <script type="text/javascript" src="lib/touch.js"></script> <script type="text/javascript" src="lib/js-hotkeys/jquery.hotkeys.min.js"></script> @@ -53,275 +53,276 @@ <script type="text/javascript" src="lib/requestanimationframe.js"></script> <script type="text/javascript" src="lib/taphold.js"></script> <script type="text/javascript" src="lib/filesaver.js"></script> -<!--{endif}--> + <!--{endif}--> -<title>Method Draw</title> + <title>Method Draw</title> </head> <body > <div id="svg_editor"> -<div id="rulers"> - <div id="ruler_corner"></div> - <div id="ruler_x"> - <div id="ruler_x_cursor"></div> - <div> - <canvas height="15"></canvas> - </div> - </div> - <div id="ruler_y"> - <div id="ruler_y_cursor"></div> - <div> - <canvas width="15"></canvas> - </div> - </div> -</div> - -<div id="workarea"> -<div id="svgcanvas" style="position:relative"> - -</div> -</div> -v -<div id="menu_bar"> -<!-- <a class="menu">--> -<!-- <div class="menu_title" id="logo"></div>--> -<!-- <div class="menu_list">--> -<!-- <div id="tool_about" class="menu_item">About this Editor...</div>--> -<!-- <div class="separator"></div>--> -<!-- <div id="tool_about" class="menu_item">Keyboard Shortcuts...</div>--> -<!-- </div>--> -<!-- </a>--> - - <div style="opacity: 0" class="menu"> - <div class="menu_title">File</div> - <div class="menu_list" id="file_menu"> - <div id="tool_clear" class="menu_item">New Document</div> - <div id="tool_open" class="menu_item" style="display: none;"><div id="fileinputs"></div>Open SVG...</div> - <div id="tool_import" class="menu_item" style="display: none;"><div id="fileinputs_import"></div>Import Image...</div> - <div id="tool_save" class="menu_item">Save Image... <span class="shortcut">鈱楽</span></div> - <div id="tool_export" class="menu_item">Export as PNG</div> - </div> - </div> - - <div style="opacity: 0" class="menu"> - <div class="menu_title">Edit</div> - <div class="menu_list" id="edit_menu"> - <div class="menu_item" id="tool_undo">Undo <span class="shortcut">鈱榋</span></div> - <div class="menu_item" id="tool_redo">Redo <span class="shortcut">鈱榊</span></div> - <div class="separator"></div> - <div class="menu_item action_selected disabled" id="tool_cut">Cut <span class="shortcut">鈱榅</span></div> - <div class="menu_item action_selected disabled" id="tool_copy">Copy <span class="shortcut">鈱楥</span></div> - <div class="menu_item action_selected disabled" id="tool_paste">Paste <span class="shortcut">鈱榁</span></div> - <div class="menu_item action_selected disabled" id="tool_clone">Duplicate <span class="shortcut">鈱楧</span></div> - <div class="menu_item action_selected disabled" id="tool_delete">Delete <span>鈱�</span></div> - </div> - </div> - - <div style="opacity: 0" class="menu"> - <div class="menu_title">Object</div> - <div class="menu_list" id="object_menu"> - <div class="menu_item action_selected disabled" id="tool_move_top">Bring to Front <span class="shortcut">鈱樷嚙鈫�</span></div> - <div class="menu_item action_selected disabled" id="tool_move_up">Bring Forward <span class="shortcut">鈱樷啈</span></div> - <div class="menu_item action_selected disabled" id="tool_move_down">Send Backward <span class="shortcut">鈱樷啌</span></div> - <div class="menu_item action_selected disabled" id="tool_move_bottom">Send to Back <span class="shortcut">鈱樷嚙鈫�</span></div> - <div class="separator"></div> - <div class="menu_item action_multi_selected disabled" id="tool_group">Group Elements <span class="shortcut">鈱楪</span></div> - <div class="menu_item action_group_selected disabled" id="tool_ungroup">Ungroup Elements <span class="shortcut">鈱樷嚙G</span></div> - <div class="separator"></div> - <div class="menu_item action_path_convert_selected disabled" id="tool_topath">Convert to Path</div> - <div class="menu_item action_path_selected disabled" id="tool_reorient">Reorient path</div> - </div> - </div> - - <div style="opacity: 0" class="menu"> - <div class="menu_title">View</div> - <div class="menu_list" id="view_menu"> - <div class="menu_item push_button_pressed" id="tool_rulers">View Rulers</div> - <div class="menu_item" id="tool_wireframe">View Wireframe</div> - <div class="menu_item" id="tool_snap">Snap to Grid</div> - <div class="separator"></div> - <div class="menu_item" id="tool_source">Source... <span class="shortcut">鈱楿</span></div> - </div> - </div> - - - - - -</div> - -<div id="tools_top" class="tools_panel"> - - <div id="canvas_panel" class="context_panel"> - - <h4 class="clearfix">鐢诲竷</h4> - - <label data-title="Change canvas width"> - <input size="3" id="canvas_width" type="text" pattern="[0-9]*" /> - <span class="icon_label">瀹藉害</span> - </label> - <label data-title="Change canvas height"> - <input id="canvas_height" size="3" type="text" pattern="[0-9]*" /> - <span class="icon_label">楂樺害</span> - </label> - - - <label data-title="Change canvas color" class="draginput"> - <span>棰滆壊</span> - <div id="color_canvas_tools"> - <div class="color_tool active" id="tool_canvas"> - <div class="color_block"> - <div id="canvas_bg"></div> - <div id="canvas_color"></div> - </div> - </div> + <div id="rulers"> + <div id="ruler_corner"></div> + <div id="ruler_x"> + <div id="ruler_x_cursor"></div> + <div> + <canvas height="15"></canvas> </div> - </label> + </div> + <div id="ruler_y"> + <div id="ruler_y_cursor"></div> + <div> + <canvas width="15"></canvas> + </div> + </div> + </div> - <div class="draginput"> - <span>鐢诲竷澶у皬</span> - <select id="resolution"> - <option id="selectedPredefined" selected="selected">榛樿</option> - <option>640x480</option> - <option>800x600</option> - <option>1024x768</option> - <option>1280x960</option> - <option>1600x1200</option> - <option id="fitToContent" value="content">閫傚簲鍐呭</option> - </select> - <div class="caret"></div> - <label id="resolution_label">榛樿</label> + <div id="workarea"> + <div id="svgcanvas" style="position:relative"> + + </div> + </div> + + <div id="menu_bar"> + <!-- <a class="menu">--> + <!-- <div class="menu_title" id="logo"></div>--> + <!-- <div class="menu_list">--> + <!-- <div id="tool_about" class="menu_item">About this Editor...</div>--> + <!-- <div class="separator"></div>--> + <!-- <div id="tool_about" class="menu_item">Keyboard Shortcuts...</div>--> + <!-- </div>--> + <!-- </a>--> + + <div style="opacity: 0" class="menu"> + <div class="menu_title">File</div> + <div class="menu_list" id="file_menu"> + <div id="tool_clear" class="menu_item">New Document</div> + <div id="tool_open" class="menu_item" style="display: none;"><div id="fileinputs"></div>Open SVG...</div> + <div id="tool_import" class="menu_item" style="display: none;"><div id="fileinputs_import"></div>Import Image...</div> + <div id="tool_save" class="menu_item">Save Image... <span class="shortcut">鈱楽</span></div> + <div id="tool_export" class="menu_item">Export as PNG</div> + </div> </div> + <div style="opacity: 0" class="menu"> + <div class="menu_title">Edit</div> + <div class="menu_list" id="edit_menu"> + <div class="menu_item" id="tool_undo">Undo <span class="shortcut">鈱榋</span></div> + <div class="menu_item" id="tool_redo">Redo <span class="shortcut">鈱榊</span></div> + <div class="separator"></div> + <div class="menu_item action_selected disabled" id="tool_cut">Cut <span class="shortcut">鈱榅</span></div> + <div class="menu_item action_selected disabled" id="tool_copy">Copy <span class="shortcut">鈱楥</span></div> + <div class="menu_item action_selected disabled" id="tool_paste">Paste <span class="shortcut">鈱榁</span></div> + <div class="menu_item action_selected disabled" id="tool_clone">Duplicate <span class="shortcut">鈱楧</span></div> + <div class="menu_item action_selected disabled" id="tool_delete">Delete <span>鈱�</span></div> + </div> + </div> + + <div style="opacity: 0" class="menu"> + <div class="menu_title">Object</div> + <div class="menu_list" id="object_menu"> + <div class="menu_item action_selected disabled" id="tool_move_top">Bring to Front <span class="shortcut">鈱樷嚙鈫�</span></div> + <div class="menu_item action_selected disabled" id="tool_move_up">Bring Forward <span class="shortcut">鈱樷啈</span></div> + <div class="menu_item action_selected disabled" id="tool_move_down">Send Backward <span class="shortcut">鈱樷啌</span></div> + <div class="menu_item action_selected disabled" id="tool_move_bottom">Send to Back <span class="shortcut">鈱樷嚙鈫�</span></div> + <div class="separator"></div> + <div class="menu_item action_multi_selected disabled" id="tool_group">Group Elements <span class="shortcut">鈱楪</span></div> + <div class="menu_item action_group_selected disabled" id="tool_ungroup">Ungroup Elements <span class="shortcut">鈱樷嚙G</span></div> + <div class="separator"></div> + <div class="menu_item action_path_convert_selected disabled" id="tool_topath">Convert to Path</div> + <div class="menu_item action_path_selected disabled" id="tool_reorient">Reorient path</div> + </div> + </div> + + <div style="opacity: 0" class="menu"> + <div class="menu_title">View</div> + <div class="menu_list" id="view_menu"> + <div class="menu_item push_button_pressed" id="tool_rulers">View Rulers</div> + <div class="menu_item" id="tool_wireframe">View Wireframe</div> + <div class="menu_item" id="tool_snap">Snap to Grid</div> + <div class="separator"></div> + <div class="menu_item" id="tool_source">Source... <span class="shortcut">鈱楿</span></div> + </div> + </div> + + + + + </div> - <div id="rect_panel" class="context_panel"> - <h4 class="clearfix">鐭╁舰</h4> - <label> - <input id="rect_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*" /> - <span>X</span> - </label> - <label> - <input id="rect_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> - <span>Y</span> - </label> - <label id="rect_width_tool attr_changer" data-title="Change rectangle width"> - <input id="rect_width" class="attr_changer" size="3" data-attr="width" type="text" pattern="[0-9]*" /> - <span class="icon_label">瀹藉害</span> - </label> - <label id="rect_height_tool" data-title="Change rectangle height"> - <input id="rect_height" class="attr_changer" size="3" data-attr="height" type="text" pattern="[0-9]*" /> - <span class="icon_label">楂樺害</span> - </label> - </div> + <div id="tools_top" class="tools_panel"> - <div id="path_panel" class="context_panel clearfix"> - <h4 class="clearfix">璺緞</h4> - <label> - <input id="path_x" class="attr_changer" data-title="Change ellipse's cx coordinate" size="3" data-attr="x" pattern="[0-9]*" /> - <span>X</span> - </label> - <label> - <input id="path_y" class="attr_changer" data-title="Change ellipse's cy coordinate" size="3" data-attr="y" pattern="[0-9]*" /> - <span>Y</span> - </label> - </div> + <div id="canvas_panel" class="context_panel"> - <div id="image_panel" class="context_panel clearfix"> - <h4>鍥剧墖</h4> - <label> - <input id="image_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*"/> - <span>X</span> - </label> - <label> - <input id="image_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*"/> - <span>Y</span> - </label> - <label> - <input id="image_width" class="attr_changer" data-title="Change image width" size="3" data-attr="width" pattern="[0-9]*" /> - <span class="icon_label">瀹藉害</span> - </label> - <label> - <input id="image_height" class="attr_changer" data-title="Change image height" size="3" data-attr="height" pattern="[0-9]*" /> - <span class="icon_label">楂樺害</span> - </label> - </div> + <h4 class="clearfix">鐢诲竷</h4> - <div id="circle_panel" class="context_panel"> - <h4>鍦�</h4> - <label id="tool_circle_cx"> - <span>涓績X杞�</span> - <input id="circle_cx" class="attr_changer" title="Change circle's cx coordinate" size="3" data-attr="cx"/> - </label> - <label id="tool_circle_cy"> - <span>涓績Y杞�</span> - <input id="circle_cy" class="attr_changer" title="Change circle's cy coordinate" size="3" data-attr="cy"/> - </label> - <label id="tool_circle_r"> - <span>鍗婂緞</span> - <input id="circle_r" class="attr_changer" title="Change circle's radius" size="3" data-attr="r"/> - </label> - </div> + <label data-title="Change canvas width"> + <input size="3" id="canvas_width" type="text" pattern="[0-9]*" /> + <span class="icon_label">瀹藉害</span> + </label> + <label data-title="Change canvas height"> + <input id="canvas_height" size="3" type="text" pattern="[0-9]*" /> + <span class="icon_label">楂樺害</span> + </label> - <div id="ellipse_panel" class="context_panel clearfix"> - <h4>妞渾</h4> - <label id="tool_ellipse_cx"> - <input id="ellipse_cx" class="attr_changer" data-title="Change ellipse's cx coordinate" size="3" data-attr="cx" pattern="[0-9]*" /> - <span>X</span> - </label> - <label id="tool_ellipse_cy"> - <input id="ellipse_cy" class="attr_changer" data-title="Change ellipse's cy coordinate" size="3" data-attr="cy" pattern="[0-9]*" /> - <span>Y</span> - </label> - <label id="tool_ellipse_rx"> - <input id="ellipse_rx" class="attr_changer" data-title="Change ellipse's x radius" size="3" data-attr="rx" pattern="[0-9]*" /> - <span>鍗婂緞X</span> - </label> - <label id="tool_ellipse_ry"> - <input id="ellipse_ry" class="attr_changer" data-title="Change ellipse's y radius" size="3" data-attr="ry" pattern="[0-9]*" /> - <span>鍗婂緞Y</span> - </label> - </div> - <div id="line_panel" class="context_panel clearfix"> - <h4>绾挎潯</h4> - <label id="tool_line_x1"> - <input id="line_x1" class="attr_changer" data-title="Change line's starting x coordinate" size="3" data-attr="x1" pattern="[0-9]*" /> - <span>宸︿笂X杞�</span> - </label> - <label id="tool_line_y1"> - <input id="line_y1" class="attr_changer" data-title="Change line's starting y coordinate" size="3" data-attr="y1" pattern="[0-9]*" /> - <span>宸︿笂Y杞�</span> - </label> - <label id="tool_line_x2"> - <input id="line_x2" class="attr_changer" data-title="Change line's ending x coordinate" size="3" data-attr="x2" pattern="[0-9]*" /> - <span>鍙充笅X杞�</span> - </label> - <label id="tool_line_y2"> - <input id="line_y2" class="attr_changer" data-title="Change line's ending y coordinate" size="3" data-attr="y2" pattern="[0-9]*" /> - <span>鍙充笅Y杞�</span> - </label> - </div> +<!-- <label data-title="Change canvas color" class="draginput">--> +<!-- <span>棰滆壊</span>--> +<!-- <div id="color_canvas_tools">--> +<!-- <div class="color_tool active" id="tool_canvas">--> +<!-- <div class="color_block">--> +<!-- <div id="canvas_bg"></div>--> +<!-- <div id="canvas_color"></div>--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> +<!-- </label>--> - <div id="text_panel" class="context_panel"> - <h4>鏂囨湰</h4> - <label> - <input id="text_x" class="attr_changer" data-title="Change text x coordinate" size="3" data-attr="x" pattern="[0-9]*" /> - <span>X</span> - </label> - <label> - <input id="text_y" class="attr_changer" data-title="Change text y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> - <span>Y</span> - </label> + <div class="draginput"> + <span>鐢诲竷澶у皬</span> + <select id="resolution"> + <option id="selectedPredefined" selected="selected">榛樿</option> + <option>200x200</option> + <option>640x480</option> + <option>800x600</option> + <option>1024x768</option> + <option>1280x960</option> + <option>1600x1200</option> + <option id="fitToContent" value="content">閫傚簲鍐呭</option> + </select> + <div class="caret"></div> + <label id="resolution_label">榛樿</label> + </div> - <div class="toolset draginput select twocol" id="tool_font_family"> + </div> + + <div id="rect_panel" class="context_panel"> + <h4 class="clearfix">鐭╁舰</h4> + <label> + <input id="rect_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*" /> + <span>X</span> + </label> + <label> + <input id="rect_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> + <span>Y</span> + </label> + <label id="rect_width_tool attr_changer" data-title="Change rectangle width"> + <input id="rect_width" class="attr_changer" size="3" data-attr="width" type="text" pattern="[0-9]*" /> + <span class="icon_label">瀹藉害</span> + </label> + <label id="rect_height_tool" data-title="Change rectangle height"> + <input id="rect_height" class="attr_changer" size="3" data-attr="height" type="text" pattern="[0-9]*" /> + <span class="icon_label">楂樺害</span> + </label> + </div> + + <div id="path_panel" class="context_panel clearfix"> + <h4 class="clearfix">璺緞</h4> + <label> + <input id="path_x" class="attr_changer" data-title="Change ellipse's cx coordinate" size="3" data-attr="x" pattern="[0-9]*" /> + <span>X</span> + </label> + <label> + <input id="path_y" class="attr_changer" data-title="Change ellipse's cy coordinate" size="3" data-attr="y" pattern="[0-9]*" /> + <span>Y</span> + </label> + </div> + + <div id="image_panel" class="context_panel clearfix"> + <h4>鍥剧墖</h4> + <label> + <input id="image_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*"/> + <span>X</span> + </label> + <label> + <input id="image_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*"/> + <span>Y</span> + </label> + <label> + <input id="image_width" class="attr_changer" data-title="Change image width" size="3" data-attr="width" pattern="[0-9]*" /> + <span class="icon_label">瀹藉害</span> + </label> + <label> + <input id="image_height" class="attr_changer" data-title="Change image height" size="3" data-attr="height" pattern="[0-9]*" /> + <span class="icon_label">楂樺害</span> + </label> + </div> + + <div id="circle_panel" class="context_panel"> + <h4>鍦�</h4> + <label id="tool_circle_cx"> + <span>涓績X杞�</span> + <input id="circle_cx" class="attr_changer" title="Change circle's cx coordinate" size="3" data-attr="cx"/> + </label> + <label id="tool_circle_cy"> + <span>涓績Y杞�</span> + <input id="circle_cy" class="attr_changer" title="Change circle's cy coordinate" size="3" data-attr="cy"/> + </label> + <label id="tool_circle_r"> + <span>鍗婂緞</span> + <input id="circle_r" class="attr_changer" title="Change circle's radius" size="3" data-attr="r"/> + </label> + </div> + + <div id="ellipse_panel" class="context_panel clearfix"> + <h4>妞渾</h4> + <label id="tool_ellipse_cx"> + <input id="ellipse_cx" class="attr_changer" data-title="Change ellipse's cx coordinate" size="3" data-attr="cx" pattern="[0-9]*" /> + <span>X</span> + </label> + <label id="tool_ellipse_cy"> + <input id="ellipse_cy" class="attr_changer" data-title="Change ellipse's cy coordinate" size="3" data-attr="cy" pattern="[0-9]*" /> + <span>Y</span> + </label> + <label id="tool_ellipse_rx"> + <input id="ellipse_rx" class="attr_changer" data-title="Change ellipse's x radius" size="3" data-attr="rx" pattern="[0-9]*" /> + <span>鍗婂緞X</span> + </label> + <label id="tool_ellipse_ry"> + <input id="ellipse_ry" class="attr_changer" data-title="Change ellipse's y radius" size="3" data-attr="ry" pattern="[0-9]*" /> + <span>鍗婂緞Y</span> + </label> + </div> + + <div id="line_panel" class="context_panel clearfix"> + <h4>绾挎潯</h4> + <label id="tool_line_x1"> + <input id="line_x1" class="attr_changer" data-title="Change line's starting x coordinate" size="3" data-attr="x1" pattern="[0-9]*" /> + <span>宸︿笂X杞�</span> + </label> + <label id="tool_line_y1"> + <input id="line_y1" class="attr_changer" data-title="Change line's starting y coordinate" size="3" data-attr="y1" pattern="[0-9]*" /> + <span>宸︿笂Y杞�</span> + </label> + <label id="tool_line_x2"> + <input id="line_x2" class="attr_changer" data-title="Change line's ending x coordinate" size="3" data-attr="x2" pattern="[0-9]*" /> + <span>鍙充笅X杞�</span> + </label> + <label id="tool_line_y2"> + <input id="line_y2" class="attr_changer" data-title="Change line's ending y coordinate" size="3" data-attr="y2" pattern="[0-9]*" /> + <span>鍙充笅Y杞�</span> + </label> + </div> + + <div id="text_panel" class="context_panel"> + <h4>鏂囨湰</h4> + <label> + <input id="text_x" class="attr_changer" data-title="Change text x coordinate" size="3" data-attr="x" pattern="[0-9]*" /> + <span>X</span> + </label> + <label> + <input id="text_y" class="attr_changer" data-title="Change text y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> + <span>Y</span> + </label> + + <div class="toolset draginput select twocol" id="tool_font_family"> <!-- Font family --> - <span>瀛椾綋</span> - <div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div> - <div class="caret"></div> - <input id="font_family" data-title="Change Font Family" size="12" type="hidden" /> - <select id="font_family_dropdown"> + <span>瀛椾綋</span> + <div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div> + <div class="caret"></div> + <input id="font_family" data-title="Change Font Family" size="12" type="hidden" /> + <select id="font_family_dropdown"> <option value="Arvo, sans-serif">Arvo</option> <option value="'Courier New', Courier, monospace">Courier</option> <option value="Euphoria, sans-serif">Euphoria</option> @@ -335,107 +336,107 @@ <option value="'Shadows Into Light', serif">Shadows Into Light</option> <option value="'Simonetta', serif">Simonetta</option> <option value="'Times New Roman', Times, serif">Times</option> - </select> - <div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div> - <div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div> - </div> - - <label id="tool_font_size" data-title="Change Font Size"> - <input id="font_size" size="3" value="0" /> - <span id="font_sizeLabel" class="icon_label">瀛椾綋澶у皬</span> - </label> - <!-- Not visible, but still used --> - <input id="text" type="text" size="35"/> - </div> - - <!-- formerly gsvg_panel --> - <div id="container_panel" class="context_panel clearfix"> - </div> - - <div id="use_panel" class="context_panel clearfix"> - <div class="tool_button clearfix" id="tool_unlink_use" data-title="Break link to reference element (make unique)">Break link reference</div> - </div> - - <div id="g_panel" class="context_panel clearfix"> - <h4>缁勫悎</h4> - <label> - <input id="g_x" class="attr_changer" data-title="Change groups's x coordinate" size="3" data-attr="x" pattern="[0-9]*" /> - <span>X</span> - </label> - <label> - <input id="g_y" class="attr_changer" data-title="Change groups's y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> - <span>Y</span> - </label> - </div> - - <div id="path_node_panel" class="context_panel clearfix"> - <h4>缂栬緫璺緞</h4> - - <label id="tool_node_x"> - <input id="path_node_x" class="attr_changer" data-title="Change node's x coordinate" size="3" data-attr="x" /> - <span>X</span> - </label> - <label id="tool_node_y"> - <input id="path_node_y" class="attr_changer" data-title="Change node's y coordinate" size="3" data-attr="y" /> - <span>Y</span> - </label> - - <div id="segment_type" class="draginput label"> - <span>鍒嗘绫诲瀷</span> - <select id="seg_type" data-title="Change Segment type"> - <option id="straight_segments" selected="selected" value="4">鐩寸嚎</option> - <option id="curve_segments" value="6">鏇茬嚎</option> - </select> - <div class="caret"></div> - <label id="seg_type_label">鐩寸嚎</label> - </div> - - <!-- - <label class="draginput checkbox" data-title="Link Control Points"> - <span>Linked Control Points</span> - <div class="push_bottom"><input type="checkbox" id="tool_node_link" checked="checked" /></div> - </label> - --> - - <div class="clearfix"></div> - <div class="tool_button" id="tool_node_clone" title="Adds a node">娣诲姞鑺傜偣</div> - <div class="tool_button" id="tool_node_delete" title="Delete Node">鍒犻櫎鑺傜偣</div> - <div class="tool_button" id="tool_openclose_path" title="Open/close sub-path">鎵撳紑璺緞</div> - <!--<div class="tool_button" id="tool_add_subpath" title="Add sub-path"></div>--> - </div> - - <!-- Buttons when a single element is selected --> - <div id="selected_panel" class="context_panel"> - - <label id="tool_angle" data-title="Change rotation angle" class="draginput"> - <input id="angle" class="attr_changer" size="2" value="0" data-attr="transform" data-min="-180" data-max="180" type="text"/> - <span class="icon_label">鏃嬭浆</span> - <div id="tool_angle_indicator"> - <div id="tool_angle_indicator_cursor"></div> + </select> + <div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div> + <div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div> </div> - </label> + + <label id="tool_font_size" data-title="Change Font Size"> + <input id="font_size" size="3" value="0" /> + <span id="font_sizeLabel" class="icon_label">瀛椾綋澶у皬</span> + </label> + <!-- Not visible, but still used --> + <input id="text" type="text" size="35"/> + </div> + + <!-- formerly gsvg_panel --> + <div id="container_panel" class="context_panel clearfix"> + </div> + + <div id="use_panel" class="context_panel clearfix"> + <div class="tool_button clearfix" id="tool_unlink_use" data-title="Break link to reference element (make unique)">Break link reference</div> + </div> + + <div id="g_panel" class="context_panel clearfix"> + <h4>缁勫悎</h4> + <label> + <input id="g_x" class="attr_changer" data-title="Change groups's x coordinate" size="3" data-attr="x" pattern="[0-9]*" /> + <span>X</span> + </label> + <label> + <input id="g_y" class="attr_changer" data-title="Change groups's y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> + <span>Y</span> + </label> + </div> + + <div id="path_node_panel" class="context_panel clearfix"> + <h4>缂栬緫璺緞</h4> + + <label id="tool_node_x"> + <input id="path_node_x" class="attr_changer" data-title="Change node's x coordinate" size="3" data-attr="x" /> + <span>X</span> + </label> + <label id="tool_node_y"> + <input id="path_node_y" class="attr_changer" data-title="Change node's y coordinate" size="3" data-attr="y" /> + <span>Y</span> + </label> + + <div id="segment_type" class="draginput label"> + <span>鍒嗘绫诲瀷</span> + <select id="seg_type" data-title="Change Segment type"> + <option id="straight_segments" selected="selected" value="4">鐩寸嚎</option> + <option id="curve_segments" value="6">鏇茬嚎</option> + </select> + <div class="caret"></div> + <label id="seg_type_label">鐩寸嚎</label> + </div> + + <!-- + <label class="draginput checkbox" data-title="Link Control Points"> + <span>Linked Control Points</span> + <div class="push_bottom"><input type="checkbox" id="tool_node_link" checked="checked" /></div> + </label> + --> + + <div class="clearfix"></div> + <div class="tool_button" id="tool_node_clone" title="Adds a node">娣诲姞鑺傜偣</div> + <div class="tool_button" id="tool_node_delete" title="Delete Node">鍒犻櫎鑺傜偣</div> + <div class="tool_button" id="tool_openclose_path" title="Open/close sub-path">鎵撳紑璺緞</div> + <!--<div class="tool_button" id="tool_add_subpath" title="Add sub-path"></div>--> + </div> + + <!-- Buttons when a single element is selected --> + <div id="selected_panel" class="context_panel"> + + <label id="tool_angle" data-title="Change rotation angle" class="draginput"> + <input id="angle" class="attr_changer" size="2" value="0" data-attr="transform" data-min="-180" data-max="180" type="text"/> + <span class="icon_label">鏃嬭浆</span> + <div id="tool_angle_indicator"> + <div id="tool_angle_indicator_cursor"></div> + </div> + </label> <label class="toolset" id="tool_opacity" data-title="Change selected item opacity"> <input id="group_opacity" class="attr_changer" data-attr="opacity" data-multiplier="0.01" size="3" value="100" step="5" min="0" max="100" /> <span id="group_opacityLabel" class="icon_label">閫忔槑搴�</span> </label> - <div class="toolset" id="tool_blur" data-title="Change gaussian blur value"> - <label> - <input id="blur" size="2" value="0" step=".1" min="0" max="10" /> - <span class="icon_label">妯$硦搴�</span> + <div class="toolset" id="tool_blur" data-title="Change gaussian blur value"> + <label> + <input id="blur" size="2" value="0" step=".1" min="0" max="10" /> + <span class="icon_label">妯$硦搴�</span> + </label> + </div> + + <label id="cornerRadiusLabel" data-title="Change Rectangle Corner Radius"> + <input id="rect_rx" size="3" value="0" data-attr="rx" class="attr_changer" type="text" pattern="[0-9]*" /> + <span class="icon_label">鍦嗗害</span> </label> - </div> - <label id="cornerRadiusLabel" data-title="Change Rectangle Corner Radius"> - <input id="rect_rx" size="3" value="0" data-attr="rx" class="attr_changer" type="text" pattern="[0-9]*" /> - <span class="icon_label">鍦嗗害</span> - </label> - - <div class="clearfix"></div> - <div id="align_tools"> - <h4>瀵归綈鏂瑰紡</h4> - <div class="toolset align_buttons" id="tool_position"> + <div class="clearfix"></div> + <div id="align_tools"> + <h4>瀵归綈鏂瑰紡</h4> + <div class="toolset align_buttons" id="tool_position"> <label> <div class="col last clear" id="position_opts"> <div class="draginput_cell" id="tool_posleft" title="宸﹀榻�"></div> @@ -446,22 +447,22 @@ <div class="draginput_cell" id="tool_posbottom" title="涓嬪榻�"></div> </div> </label> + </div> </div> </div> - </div> - <!-- Buttons when multiple elements are selected --> - <div id="multiselected_panel" class="context_panel clearfix"> - <h4 class="hidable">瀵归綈鏂瑰紡</h4> + <!-- Buttons when multiple elements are selected --> + <div id="multiselected_panel" class="context_panel clearfix"> + <h4 class="hidable">瀵归綈鏂瑰紡</h4> - <div class="toolset align_buttons" style="position: relative"> - <label id="tool_align_relative" style="margin-top: 10px;"> - <select id="align_relative_to" title="Align relative to ..."> - <option id="selected_objects" value="selected">涓庡璞″榻�</option> - <option id="page" value="page">涓庨〉闈㈠榻�</option> - </select> - </label> - <h4>.</h4> + <div class="toolset align_buttons" style="position: relative"> + <label id="tool_align_relative" style="margin-top: 10px;"> + <select id="align_relative_to" title="Align relative to ..."> + <option id="selected_objects" value="selected">涓庡璞″榻�</option> + <option id="page" value="page">涓庨〉闈㈠榻�</option> + </select> + </label> + <h4>.</h4> <div class="col last clear"> <div class="draginput_cell" id="tool_alignleft" title="宸﹀榻�"></div> <div class="draginput_cell" id="tool_aligncenter" title="姘村钩灞呬腑"></div> @@ -470,112 +471,112 @@ <div class="draginput_cell" id="tool_alignmiddle" title="鍨傜洿灞呬腑"></div> <div class="draginput_cell" id="tool_alignbottom" title="涓嬪榻�"></div> </div> + </div> + <div class="clearfix"></div> + </div> - <div class="clearfix"></div> - </div> + <div id="stroke_panel" class="context_panel clearfix"> + <div class="clearfix"></div> + <h4>杈规</h4> + <div class="toolset" data-title="Change stroke"> + <label> + <input id="stroke_width" size="2" value="5" data-attr="stroke-width" min="0" max="99" step="1" /> + <span class="icon_label">杈瑰</span> + </label> + </div> + <div class="stroke_tool draginput"> + <span>绾挎潯鏍峰紡</span> + <select id="stroke_style" data-title="Change stroke dash style"> + <option selected="selected" value="none">鈥�</option> + <option value="2,2">路路路</option> + <option value="5,5">- -</option> + <option value="5,2,2,2">-路-</option> + <option value="5,2,2,2,2,2">-路路-</option> + </select> + <div class="caret"></div> + <label id="stroke_style_label">鈥�</label> + </div> - <div id="stroke_panel" class="context_panel clearfix"> - <div class="clearfix"></div> - <h4>杈规</h4> - <div class="toolset" data-title="Change stroke"> - <label> - <input id="stroke_width" size="2" value="5" data-attr="stroke-width" min="0" max="99" step="1" /> - <span class="icon_label">杈瑰</span> + <label style="display: none;"> + <span class="icon_label">Stroke Join</span> + </label> + + <label style="display: none;"> + <span class="icon_label">Stroke Cap</span> </label> </div> - <div class="stroke_tool draginput"> - <span>绾挎潯鏍峰紡</span> - <select id="stroke_style" data-title="Change stroke dash style"> - <option selected="selected" value="none">鈥�</option> - <option value="2,2">路路路</option> - <option value="5,5">- -</option> - <option value="5,2,2,2">-路-</option> - <option value="5,2,2,2,2,2">-路路-</option> - </select> - <div class="caret"></div> - <label id="stroke_style_label">鈥�</label> - </div> - <label style="display: none;"> - <span class="icon_label">Stroke Join</span> - </label> - - <label style="display: none;"> - <span class="icon_label">Stroke Cap</span> - </label> - </div> - -</div> <!-- tools_top --> + </div> <!-- tools_top --> <div id="cur_context_panel"> </div> -<div id="tools_left" class="tools_panel"> - <div class="tool_button" id="tool_select" title="閫夋嫨宸ュ叿[V]"></div> - <div class="tool_button" id="tool_fhpath" title="閾呯瑪宸ュ叿[P]"></div> - <div class="tool_button" id="tool_line" title="杩炵嚎宸ュ叿[L]"></div> - <div class="tool_button" id="tool_rect" title="鏂瑰舰/鐭╁舰 [R]"></div> - <div class="tool_button" id="tool_ellipse" title="妞渾/鍦� [C]"></div> - <div class="tool_button" id="tool_path" title="璺緞宸ュ叿 [P]"></div> - <div class="tool_button" id="tool_text" title="鏂囨湰宸ュ叿 [T]"></div> - <div class="tool_button" id="tool_zoom" title="缂╂斁宸ュ叿 [Z]"></div> + <div id="tools_left" class="tools_panel"> + <div class="tool_button" id="tool_select" title="閫夋嫨宸ュ叿[V]"></div> + <div class="tool_button" id="tool_fhpath" title="閾呯瑪宸ュ叿[P]"></div> + <div class="tool_button" id="tool_line" title="杩炵嚎宸ュ叿[L]"></div> + <div class="tool_button" id="tool_rect" title="鏂瑰舰/鐭╁舰 [R]"></div> + <div class="tool_button" id="tool_ellipse" title="妞渾/鍦� [C]"></div> + <div class="tool_button" id="tool_path" title="璺緞宸ュ叿 [P]"></div> + <div class="tool_button" id="tool_text" title="鏂囨湰宸ュ叿 [T]"></div> + <div class="tool_button" id="tool_zoom" title="缂╂斁宸ュ叿 [Z]"></div> - <div id="color_tools"> - <div id="tool_switch" title="Switch stroke and fill colors [X]"></div> - <div class="color_tool active" id="tool_fill"> - <label class="icon_label" title="Change fill color"></label> - <div class="color_block"> - <div id="fill_bg"></div> - <div id="fill_color" class="color_block"></div> - </div> + <div id="color_tools"> + <div id="tool_switch" title="Switch stroke and fill colors [X]"></div> + <div class="color_tool active" id="tool_fill"> + <label class="icon_label" title="Change fill color"></label> + <div class="color_block"> + <div id="fill_bg"></div> + <div id="fill_color" class="color_block"></div> </div> + </div> - <div class="color_tool" id="tool_stroke"> - <label class="icon_label" title="Change stroke color"></label> - <div class="color_block"> - <div id="stroke_bg"></div> - <div id="stroke_color" class="color_block" title="Change stroke color"></div> - </div> + <div class="color_tool" id="tool_stroke"> + <label class="icon_label" title="Change stroke color"></label> + <div class="color_block"> + <div id="stroke_bg"></div> + <div id="stroke_color" class="color_block" title="Change stroke color"></div> </div> - </div> -</div> <!-- tools_left --> + </div> + </div> + </div> <!-- tools_left --> -<div id="tools_bottom" class="tools_panel"> + <div id="tools_bottom" class="tools_panel"> <!-- Zoom buttons --> - <div id="zoom_panel" class="toolset" title="Change zoom level"> - <div class="draginput select" id="zoom_label"> - <span id="zoomLabel" class="zoom_tool icon_label"></span> - <select id="zoom_select"> - <option value="6">6%</option> - <option value="12">12%</option> - <option value="16">16%</option> - <option value="25">25%</option> - <option value="50">50%</option> - <option value="75">75%</option> - <option value="100" selected="selected">100%</option> - <option value="150">150%</option> - <option value="200">200%</option> - <option value="300">300%</option> - <option value="400">400%</option> - <option value="600">600%</option> - <option value="800">800%</option> - <option value="1600">1600%</option> - </select> - <div class="caret"></div> - <input id="zoom" size="3" value="100%" type="text" readonly="readonly" /> + <div id="zoom_panel" class="toolset" title="Change zoom level"> + <div class="draginput select" id="zoom_label"> + <span id="zoomLabel" class="zoom_tool icon_label"></span> + <select id="zoom_select"> + <option value="6">6%</option> + <option value="12">12%</option> + <option value="16">16%</option> + <option value="25">25%</option> + <option value="50">50%</option> + <option value="75">75%</option> + <option value="100" selected="selected">100%</option> + <option value="150">150%</option> + <option value="200">200%</option> + <option value="300">300%</option> + <option value="400">400%</option> + <option value="600">600%</option> + <option value="800">800%</option> + <option value="1600">1600%</option> + </select> + <div class="caret"></div> + <input id="zoom" size="3" value="100%" type="text" readonly="readonly" /> + </div> + </div> + + <div id="tools_bottom_3"> + <div id="palette" title="Click to change fill color, shift-click to change stroke color"></div> </div> </div> - <div id="tools_bottom_3"> - <div id="palette" title="Click to change fill color, shift-click to change stroke color"></div> - </div> -</div> - -<!-- hidden divs --> -<div id="color_picker"></div> + <!-- hidden divs --> + <div id="color_picker"></div> </div> <!-- svg_editor --> diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/canvg/canvg.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/canvg/canvg.js index 662beb3..2592669 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/canvg/canvg.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/canvg/canvg.js @@ -1,6 +1,6 @@ /* * canvg.js - Javascript SVG parser and renderer on Canvas - * MIT Licensed + * MIT Licensed * Gabe Lerner (gabelerner@gmail.com) * http://code.google.com/p/canvg/ * @@ -55,13 +55,13 @@ canvg(c, div.innerHTML); } return; - } + } opts = opts || {}; - + if (typeof target == 'string') { target = document.getElementById(target); } - + // reuse class per canvas var svg; if (target.svg == null) { @@ -73,7 +73,7 @@ svg.stop(); } svg.opts = opts; - + var ctx = target.getContext('2d'); if (typeof(s.documentElement) != 'undefined') { // load from xml doc @@ -91,10 +91,10 @@ function build() { var svg = { }; - + svg.FRAMERATE = 30; svg.MAX_VIRTUAL_PIXELS = 30000; - + // globals svg.init = function(ctx) { svg.Definitions = {}; @@ -114,14 +114,14 @@ if (d != null && typeof(d) == 'number') return d; if (d == 'x') return this.width(); if (d == 'y') return this.height(); - return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2); + return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2); } }); } svg.init(); - + // images loaded - svg.ImagesLoaded = function() { + svg.ImagesLoaded = function() { for (var i=0; i<svg.Images.length; i++) { if (!svg.Images[i].loaded) return false; } @@ -130,10 +130,10 @@ // trim svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); } - + // compress spaces svg.compressSpaces = function(s) { return s.replace(/[\s\r\t\n]+/gm,' '); } - + // ajax svg.ajax = function(url) { var AJAX; @@ -145,8 +145,8 @@ return AJAX.responseText; } return null; - } - + } + // parse xml svg.parseXml = function(xml) { if (window.DOMParser) @@ -154,48 +154,48 @@ var parser = new DOMParser(); return parser.parseFromString(xml, 'text/xml'); } - else + else { xml = xml.replace(/<!DOCTYPE svg[^>]*>/, ''); var xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); xmlDoc.async = 'false'; - xmlDoc.loadXML(xml); + xmlDoc.loadXML(xml); return xmlDoc; - } + } } - + svg.Property = function(name, value) { this.name = name; this.value = value; - + this.hasValue = function() { return (this.value != null && this.value !== ''); } - + // return the numerical value of the property this.numValue = function() { if (!this.hasValue()) return 0; - + var n = parseFloat(this.value); if ((this.value + '').match(/%$/)) { n = n / 100.0; } return n; } - + this.valueOrDefault = function(def) { if (this.hasValue()) return this.value; return def; } - + this.numValueOrDefault = function(def) { if (this.hasValue()) return this.numValue(); return def; } - + /* EXTENSIONS */ var that = this; - + // color extensions this.Color = { // augment the current color value with the opacity @@ -210,7 +210,7 @@ return new svg.Property(that.name, newValue); } } - + // definition extensions this.Definition = { // get the definition from the definitions table @@ -218,43 +218,43 @@ var name = that.value.replace(/^(url\()?#([^\)]+)\)?$/, '$2'); return svg.Definitions[name]; }, - + isUrl: function() { return that.value.indexOf('url(') == 0 }, - + getFillStyle: function(e) { var def = this.getDefinition(); - + // gradient if (def != null && def.createGradient) { return def.createGradient(svg.ctx, e); } - + // pattern if (def != null && def.createPattern) { return def.createPattern(svg.ctx, e); } - + return null; } } - + // length extensions this.Length = { DPI: function(viewPort) { return 96.0; // TODO: compute? }, - + EM: function(viewPort) { var em = 12; - + var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize); if (fontSize.hasValue()) em = fontSize.Length.toPixels(viewPort); - + return em; }, - + // get the length as pixels toPixels: function(viewPort) { if (!that.hasValue()) return 0; @@ -271,7 +271,7 @@ return that.numValue(); } } - + // time extensions this.Time = { // get the time as milliseconds @@ -283,7 +283,7 @@ return that.numValue(); } } - + // angle extensions this.Angle = { // get the angle as radians @@ -297,25 +297,25 @@ } } } - + // fonts svg.Font = new (function() { this.Styles = ['normal','italic','oblique','inherit']; this.Variants = ['normal','small-caps','inherit']; this.Weights = ['normal','bold','bolder','lighter','100','200','300','400','500','600','700','800','900','inherit']; - - this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) { + + this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) { var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font); - return { - fontFamily: fontFamily || f.fontFamily, - fontSize: fontSize || f.fontSize, - fontStyle: fontStyle || f.fontStyle, - fontWeight: fontWeight || f.fontWeight, + return { + fontFamily: fontFamily || f.fontFamily, + fontSize: fontSize || f.fontSize, + fontStyle: fontStyle || f.fontStyle, + fontWeight: fontWeight || f.fontWeight, fontVariant: fontVariant || f.fontVariant, - toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') } - } + toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') } + } } - + var that = this; this.Parse = function(s) { var f = {}; @@ -332,7 +332,7 @@ return f; } }); - + // points and paths svg.ToNumberArray = function(s) { var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' '); @@ -340,15 +340,15 @@ a[i] = parseFloat(a[i]); } return a; - } + } svg.Point = function(x, y) { this.x = x; this.y = y; - + this.angleTo = function(p) { return Math.atan2(p.y - this.y, p.x - this.x); } - + this.applyTransform = function(v) { var xp = this.x * v[0] + this.y * v[2] + v[4]; var yp = this.x * v[1] + this.y * v[3] + v[5]; @@ -368,20 +368,20 @@ } return path; } - + // bounding box svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want this.x1 = Number.NaN; this.y1 = Number.NaN; this.x2 = Number.NaN; this.y2 = Number.NaN; - + this.x = function() { return this.x1; } this.y = function() { return this.y1; } this.width = function() { return this.x2 - this.x1; } this.height = function() { return this.y2 - this.y1; } - - this.addPoint = function(x, y) { + + this.addPoint = function(x, y) { if (x != null) { if (isNaN(this.x1) || isNaN(this.x2)) { this.x1 = x; @@ -390,7 +390,7 @@ if (x < this.x1) this.x1 = x; if (x > this.x2) this.x2 = x; } - + if (y != null) { if (isNaN(this.y1) || isNaN(this.y2)) { this.y1 = y; @@ -399,15 +399,15 @@ if (y < this.y1) this.y1 = y; if (y > this.y2) this.y2 = y; } - } + } this.addX = function(x) { this.addPoint(x, null); } this.addY = function(y) { this.addPoint(null, y); } - + this.addBoundingBox = function(bb) { this.addPoint(bb.x1, bb.y1); this.addPoint(bb.x2, bb.y2); } - + this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) { var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0) var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0) @@ -415,25 +415,25 @@ var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0) this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y); } - + this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) { // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y]; this.addPoint(p0[0], p0[1]); this.addPoint(p3[0], p3[1]); - + for (i=0; i<=1; i++) { - var f = function(t) { + var f = function(t) { return Math.pow(1-t, 3) * p0[i] + 3 * Math.pow(1-t, 2) * t * p1[i] + 3 * (1-t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; } - + var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; var c = 3 * p1[i] - 3 * p0[i]; - + if (a == 0) { if (b == 0) continue; var t = -c / b; @@ -443,7 +443,7 @@ } continue; } - + var b2ac = Math.pow(b, 2) - 4 * c * a; if (b2ac < 0) continue; var t1 = (-b + Math.sqrt(b2ac)) / (2 * a); @@ -458,23 +458,23 @@ } } } - + this.isPointInBox = function(x, y) { return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2); } - + this.addPoint(x1, y1); this.addPoint(x2, y2); } - + // transforms - svg.Transform = function(v) { + svg.Transform = function(v) { var that = this; this.Type = {} - + // translate this.Type.translate = function(s) { - this.p = svg.CreatePoint(s); + this.p = svg.CreatePoint(s); this.apply = function(ctx) { ctx.translate(this.p.x || 0.0, this.p.y || 0.0); } @@ -482,7 +482,7 @@ p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]); } } - + // rotate this.Type.rotate = function(s) { var a = svg.ToNumberArray(s); @@ -499,9 +499,9 @@ p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]); p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]); p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]); - } + } } - + this.Type.scale = function(s) { this.p = svg.CreatePoint(s); this.apply = function(ctx) { @@ -509,9 +509,9 @@ } this.applyToPoint = function(p) { p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]); - } + } } - + this.Type.matrix = function(s) { this.m = svg.ToNumberArray(s); this.apply = function(ctx) { @@ -519,44 +519,44 @@ } this.applyToPoint = function(p) { p.applyTransform(this.m); - } + } } - + this.Type.SkewBase = function(s) { this.base = that.Type.matrix; this.base(s); this.angle = new svg.Property('angle', s); } this.Type.SkewBase.prototype = new this.Type.matrix; - + this.Type.skewX = function(s) { this.base = that.Type.SkewBase; this.base(s); this.m = [1, 0, Math.tan(this.angle.Angle.toRadians()), 1, 0, 0]; } this.Type.skewX.prototype = new this.Type.SkewBase; - + this.Type.skewY = function(s) { this.base = that.Type.SkewBase; this.base(s); this.m = [1, Math.tan(this.angle.Angle.toRadians()), 0, 1, 0, 0]; } this.Type.skewY.prototype = new this.Type.SkewBase; - + this.transforms = []; - + this.apply = function(ctx) { for (var i=0; i<this.transforms.length; i++) { this.transforms[i].apply(ctx); } } - + this.applyToPoint = function(p) { for (var i=0; i<this.transforms.length; i++) { this.transforms[i].applyToPoint(p); } } - + var data = svg.trim(svg.compressSpaces(v)).split(/\s(?=[a-z])/); for (var i=0; i<data.length; i++) { var type = data[i].split('(')[0]; @@ -565,73 +565,73 @@ this.transforms.push(transform); } } - + // aspect ratio svg.AspectRatio = function(ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) { // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute aspectRatio = svg.compressSpaces(aspectRatio); aspectRatio = aspectRatio.replace(/^defer\s/,''); // ignore defer var align = aspectRatio.split(' ')[0] || 'xMidYMid'; - var meetOrSlice = aspectRatio.split(' ')[1] || 'meet'; - + var meetOrSlice = aspectRatio.split(' ')[1] || 'meet'; + // calculate scale var scaleX = width / desiredWidth; var scaleY = height / desiredHeight; var scaleMin = Math.min(scaleX, scaleY); var scaleMax = Math.max(scaleX, scaleY); if (meetOrSlice == 'meet') { desiredWidth *= scaleMin; desiredHeight *= scaleMin; } - if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; } - + if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; } + refX = new svg.Property('refX', refX); refY = new svg.Property('refY', refY); - if (refX.hasValue() && refY.hasValue()) { + if (refX.hasValue() && refY.hasValue()) { ctx.translate(-scaleMin * refX.Length.toPixels('x'), -scaleMin * refY.Length.toPixels('y')); - } - else { - // align - if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0); - if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0); - if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0); - if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight); } - + else { + // align + if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0); + if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0); + if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0); + if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight); + } + // scale if (align == 'none') ctx.scale(scaleX, scaleY); - else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin); - else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax); - + else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin); + else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax); + // translate - ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY); + ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY); } - + // elements svg.Element = {} - - svg.Element.ElementBase = function(node) { + + svg.Element.ElementBase = function(node) { this.attributes = {}; this.styles = {}; this.children = []; - + // get or create attribute this.attribute = function(name, createIfNotExists) { var a = this.attributes[name]; if (a != null) return a; - + a = new svg.Property(name, ''); if (createIfNotExists == true) this.attributes[name] = a; return a; } - + // get or create style, crawls up node tree this.style = function(name, createIfNotExists) { var s = this.styles[name]; if (s != null) return s; - + var a = this.attribute(name); if (a != null && a.hasValue()) { return a; } - + var p = this.parent; if (p != null) { var ps = p.style(name); @@ -639,20 +639,20 @@ return ps; } } - + s = new svg.Property(name, ''); if (createIfNotExists == true) this.styles[name] = s; return s; } - + // base render this.render = function(ctx) { // don't render display=none if (this.style('display').value == 'none') return; - + // don't render visibility=hidden if (this.attribute('visibility').value == 'hidden') return; - + ctx.save(); this.setContext(ctx); // mask @@ -664,56 +664,56 @@ var filter = this.style('filter').Definition.getDefinition(); if (filter != null) filter.apply(ctx, this); } - else this.renderChildren(ctx); + else this.renderChildren(ctx); this.clearContext(ctx); ctx.restore(); } - + // base set context this.setContext = function(ctx) { // OVERRIDE ME! } - + // base clear context this.clearContext = function(ctx) { // OVERRIDE ME! - } - + } + // base render children this.renderChildren = function(ctx) { for (var i=0; i<this.children.length; i++) { this.children[i].render(ctx); } } - + this.addChild = function(childNode, create) { var child = childNode; if (create) child = svg.CreateElement(childNode); child.parent = this; - this.children.push(child); + this.children.push(child); } - + if (node != null && node.nodeType == 1) { //ELEMENT_NODE // add children for (var i=0; i<node.childNodes.length; i++) { var childNode = node.childNodes[i]; if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE } - + // add attributes for (var i=0; i<node.attributes.length; i++) { var attribute = node.attributes[i]; this.attributes[attribute.nodeName] = new svg.Property(attribute.nodeName, attribute.nodeValue); } - + // add tag styles var styles = svg.Styles[node.nodeName]; if (styles != null) { for (var name in styles) { this.styles[name] = styles[name]; } - } - + } + // add class styles if (this.attribute('class').hasValue()) { var classes = svg.compressSpaces(this.attribute('class').value).split(' '); @@ -732,7 +732,7 @@ } } } - + // add inline styles if (this.attribute('style').hasValue()) { var styles = this.attribute('style').value.split(';'); @@ -744,7 +744,7 @@ this.styles[name] = new svg.Property(name, value); } } - } + } // add id if (this.attribute('id').hasValue()) { @@ -754,11 +754,11 @@ } } } - + svg.Element.RenderedElementBase = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.setContext = function(ctx) { // fill if (this.style('fill').Definition.isUrl()) { @@ -770,7 +770,7 @@ if (this.style('fill-opacity').hasValue()) fillStyle = fillStyle.Color.addOpacity(this.style('fill-opacity').value); ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value); } - + // stroke if (this.style('stroke').Definition.isUrl()) { var fs = this.style('stroke').Definition.getFillStyle(this); @@ -788,49 +788,49 @@ // font if (typeof(ctx.font) != 'undefined') { - ctx.font = svg.Font.CreateFont( - this.style('font-style').value, - this.style('font-variant').value, - this.style('font-weight').value, - this.style('font-size').hasValue() ? this.style('font-size').Length.toPixels() + 'px' : '', + ctx.font = svg.Font.CreateFont( + this.style('font-style').value, + this.style('font-variant').value, + this.style('font-weight').value, + this.style('font-size').hasValue() ? this.style('font-size').Length.toPixels() + 'px' : '', this.style('font-family').value).toString(); } - + // transform - if (this.attribute('transform').hasValue()) { + if (this.attribute('transform').hasValue()) { var transform = new svg.Transform(this.attribute('transform').value); transform.apply(ctx); } - + // clip if (this.attribute('clip-path').hasValue()) { var clip = this.attribute('clip-path').Definition.getDefinition(); if (clip != null) clip.apply(ctx); } - + // opacity if (this.style('opacity').hasValue()) { ctx.globalAlpha = this.style('opacity').numValue(); } - } + } } svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase; - + svg.Element.PathElementBase = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.path = function(ctx) { if (ctx != null) ctx.beginPath(); return new svg.BoundingBox(); } - + this.renderChildren = function(ctx) { this.path(ctx); svg.Mouse.checkPath(this, ctx); if (ctx.fillStyle != '') ctx.fill(); if (ctx.strokeStyle != '') ctx.stroke(); - + var markers = this.getMarkers(); if (markers != null) { if (this.style('marker-start').Definition.isUrl()) { @@ -847,58 +847,58 @@ var marker = this.style('marker-end').Definition.getDefinition(); marker.render(ctx, markers[markers.length-1][0], markers[markers.length-1][1]); } - } + } } - + this.getBoundingBox = function() { return this.path(); } - + this.getMarkers = function() { return null; } } svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase; - + // svg element svg.Element.svg = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.baseClearContext = this.clearContext; this.clearContext = function(ctx) { this.baseClearContext(ctx); svg.ViewPort.RemoveCurrent(); } - + this.baseSetContext = this.setContext; this.setContext = function(ctx) { // initial values ctx.strokeStyle = 'rgba(0,0,0,0)'; ctx.lineCap = 'butt'; ctx.lineJoin = 'miter'; - ctx.miterLimit = 4; - + ctx.miterLimit = 4; + this.baseSetContext(ctx); - + // create new view port if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) { ctx.translate(this.attribute('x').Length.toPixels('x'), this.attribute('y').Length.toPixels('y')); } - + var width = svg.ViewPort.width(); var height = svg.ViewPort.height(); if (typeof(this.root) == 'undefined' && this.attribute('width').hasValue() && this.attribute('height').hasValue()) { width = this.attribute('width').Length.toPixels('x'); height = this.attribute('height').Length.toPixels('y'); - + var x = 0; var y = 0; if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) { x = -this.attribute('refX').Length.toPixels('x'); y = -this.attribute('refY').Length.toPixels('y'); } - + ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(width, y); @@ -907,19 +907,19 @@ ctx.closePath(); ctx.clip(); } - svg.ViewPort.SetCurrent(width, height); - + svg.ViewPort.SetCurrent(width, height); + // viewbox - if (this.attribute('viewBox').hasValue()) { + if (this.attribute('viewBox').hasValue()) { var viewBox = svg.ToNumberArray(this.attribute('viewBox').value); var minX = viewBox[0]; var minY = viewBox[1]; width = viewBox[2]; height = viewBox[3]; - + svg.AspectRatio(ctx, - this.attribute('preserveAspectRatio').value, - svg.ViewPort.width(), + this.attribute('preserveAspectRatio').value, + svg.ViewPort.width(), width, svg.ViewPort.height(), height, @@ -927,10 +927,10 @@ minY, this.attribute('refX').value, this.attribute('refY').value); - - svg.ViewPort.RemoveCurrent(); - svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); - } + + svg.ViewPort.RemoveCurrent(); + svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); + } } } svg.Element.svg.prototype = new svg.Element.RenderedElementBase; @@ -939,7 +939,7 @@ svg.Element.rect = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.path = function(ctx) { var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); @@ -949,7 +949,7 @@ var ry = this.attribute('ry').Length.toPixels('y'); if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx; if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry; - + if (ctx != null) { ctx.beginPath(); ctx.moveTo(x + rx, y); @@ -963,45 +963,45 @@ ctx.quadraticCurveTo(x, y, x + rx, y) ctx.closePath(); } - + return new svg.BoundingBox(x, y, x + width, y + height); } } svg.Element.rect.prototype = new svg.Element.PathElementBase; - + // circle element svg.Element.circle = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.path = function(ctx) { var cx = this.attribute('cx').Length.toPixels('x'); var cy = this.attribute('cy').Length.toPixels('y'); var r = this.attribute('r').Length.toPixels(); - + if (ctx != null) { ctx.beginPath(); - ctx.arc(cx, cy, r, 0, Math.PI * 2, true); + ctx.arc(cx, cy, r, 0, Math.PI * 2, true); ctx.closePath(); } - + return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r); } } - svg.Element.circle.prototype = new svg.Element.PathElementBase; + svg.Element.circle.prototype = new svg.Element.PathElementBase; // ellipse element svg.Element.ellipse = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.path = function(ctx) { var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3); var rx = this.attribute('rx').Length.toPixels('x'); var ry = this.attribute('ry').Length.toPixels('y'); var cx = this.attribute('cx').Length.toPixels('x'); var cy = this.attribute('cy').Length.toPixels('y'); - + if (ctx != null) { ctx.beginPath(); ctx.moveTo(cx, cy - ry); @@ -1011,48 +1011,48 @@ ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry); ctx.closePath(); } - + return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry); } } - svg.Element.ellipse.prototype = new svg.Element.PathElementBase; - + svg.Element.ellipse.prototype = new svg.Element.PathElementBase; + // line element svg.Element.line = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.getPoints = function() { return [ new svg.Point(this.attribute('x1').Length.toPixels('x'), this.attribute('y1').Length.toPixels('y')), new svg.Point(this.attribute('x2').Length.toPixels('x'), this.attribute('y2').Length.toPixels('y'))]; } - + this.path = function(ctx) { var points = this.getPoints(); - + if (ctx != null) { ctx.beginPath(); ctx.moveTo(points[0].x, points[0].y); ctx.lineTo(points[1].x, points[1].y); } - + return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y); } - + this.getMarkers = function() { - var points = this.getPoints(); + var points = this.getPoints(); var a = points[0].angleTo(points[1]); return [[points[0], a], [points[1], a]]; } } - svg.Element.line.prototype = new svg.Element.PathElementBase; - + svg.Element.line.prototype = new svg.Element.PathElementBase; + // polyline element svg.Element.polyline = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.points = svg.CreatePath(this.attribute('points').value); this.path = function(ctx) { var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y); @@ -1066,7 +1066,7 @@ } return bb; } - + this.getMarkers = function() { var markers = []; for (var i=0; i<this.points.length - 1; i++) { @@ -1074,15 +1074,15 @@ } markers.push([this.points[this.points.length-1], markers[markers.length-1][1]]); return markers; - } + } } - svg.Element.polyline.prototype = new svg.Element.PathElementBase; - + svg.Element.polyline.prototype = new svg.Element.PathElementBase; + // polygon element svg.Element.polygon = function(node) { this.base = svg.Element.polyline; this.base(node); - + this.basePath = this.path; this.path = function(ctx) { var bb = this.basePath(ctx); @@ -1099,7 +1099,7 @@ svg.Element.path = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + var d = this.attribute('d').value; // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF d = d.replace(/,/gm,' '); // get rid of all commas @@ -1114,7 +1114,7 @@ d = svg.trim(d); this.PathParser = new (function(d) { this.tokens = d.split(' '); - + this.reset = function() { this.i = -1; this.command = ''; @@ -1125,61 +1125,61 @@ this.points = []; this.angles = []; } - + this.isEnd = function() { return this.i >= this.tokens.length - 1; } - + this.isCommandOrEnd = function() { if (this.isEnd()) return true; return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null; } - + this.isRelativeCommand = function() { return this.command == this.command.toLowerCase(); } - + this.getToken = function() { this.i = this.i + 1; return this.tokens[this.i]; } - + this.getScalar = function() { return parseFloat(this.getToken()); } - + this.nextCommand = function() { this.previousCommand = this.command; this.command = this.getToken(); - } - + } + this.getPoint = function() { var p = new svg.Point(this.getScalar(), this.getScalar()); return this.makeAbsolute(p); } - + this.getAsControlPoint = function() { var p = this.getPoint(); this.control = p; return p; } - + this.getAsCurrentPoint = function() { var p = this.getPoint(); this.current = p; - return p; + return p; } - + this.getReflectedControlPoint = function() { if (this.previousCommand.toLowerCase() != 'c' && this.previousCommand.toLowerCase() != 's') { return this.current; } - + // reflect point - var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y); + var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y); return p; } - + this.makeAbsolute = function(p) { if (this.isRelativeCommand()) { p.x = this.current.x + p.x; @@ -1187,7 +1187,7 @@ } return p; } - + this.addMarker = function(p, from, priorTo) { // if the last angle isn't filled in because we didn't have this point yet ... if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) { @@ -1195,12 +1195,12 @@ } this.addMarkerAngle(p, from == null ? null : from.angleTo(p)); } - + this.addMarkerAngle = function(p, a) { this.points.push(p); this.angles.push(a); - } - + } + this.getMarkerPoints = function() { return this.points; } this.getMarkerAngles = function() { for (var i=0; i<this.angles.length; i++) { @@ -1398,7 +1398,7 @@ this.getMarkers = function() { var points = this.PathParser.getMarkerPoints(); var angles = this.PathParser.getMarkerAngles(); - + var markers = []; for (var i=0; i<points.length; i++) { markers.push([points[i], angles[i]]); @@ -1407,12 +1407,12 @@ } } svg.Element.path.prototype = new svg.Element.PathElementBase; - + // pattern element svg.Element.pattern = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.createPattern = function(ctx, element) { // render me using a temporary svg element var tempSvg = new svg.Element.svg(); @@ -1422,28 +1422,28 @@ tempSvg.attributes['width'] = new svg.Property('width', this.attribute('width').value); tempSvg.attributes['height'] = new svg.Property('height', this.attribute('height').value); tempSvg.children = this.children; - + var c = document.createElement('canvas'); c.width = this.attribute('width').Length.toPixels('x'); c.height = this.attribute('height').Length.toPixels('y'); - tempSvg.render(c.getContext('2d')); + tempSvg.render(c.getContext('2d')); return ctx.createPattern(c, 'repeat'); } } svg.Element.pattern.prototype = new svg.Element.ElementBase; - + // marker element svg.Element.marker = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.baseRender = this.render; this.render = function(ctx, point, angle) { ctx.translate(point.x, point.y); if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle); if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth); ctx.save(); - + // render me using a temporary svg element var tempSvg = new svg.Element.svg(); tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value); @@ -1455,7 +1455,7 @@ tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none')); tempSvg.children = this.children; tempSvg.render(ctx); - + ctx.restore(); if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1/ctx.lineWidth, 1/ctx.lineWidth); if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle); @@ -1463,99 +1463,99 @@ } } svg.Element.marker.prototype = new svg.Element.ElementBase; - + // definitions element svg.Element.defs = function(node) { this.base = svg.Element.ElementBase; - this.base(node); - + this.base(node); + this.render = function(ctx) { // NOOP } } svg.Element.defs.prototype = new svg.Element.ElementBase; - + // base for gradients svg.Element.GradientBase = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.gradientUnits = this.attribute('gradientUnits').valueOrDefault('objectBoundingBox'); - - this.stops = []; + + this.stops = []; for (var i=0; i<this.children.length; i++) { var child = this.children[i]; this.stops.push(child); - } - + } + this.getGradient = function() { // OVERRIDE ME! - } + } this.createGradient = function(ctx, element) { var stopsContainer = this; if (this.attribute('xlink:href').hasValue()) { stopsContainer = this.attribute('xlink:href').Definition.getDefinition(); } - + var g = this.getGradient(ctx, element); for (var i=0; i<stopsContainer.stops.length; i++) { g.addColorStop(stopsContainer.stops[i].offset, stopsContainer.stops[i].color); } - + if (this.attribute('gradientTransform').hasValue()) { // render as transformed pattern on temporary canvas var rootView = svg.ViewPort.viewPorts[0]; - + var rect = new svg.Element.rect(); rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0); rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0); rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS); rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS); - + var group = new svg.Element.g(); group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value); group.children = [ rect ]; - + var tempSvg = new svg.Element.svg(); tempSvg.attributes['x'] = new svg.Property('x', 0); tempSvg.attributes['y'] = new svg.Property('y', 0); tempSvg.attributes['width'] = new svg.Property('width', rootView.width); tempSvg.attributes['height'] = new svg.Property('height', rootView.height); tempSvg.children = [ group ]; - + var c = document.createElement('canvas'); c.width = rootView.width; c.height = rootView.height; var tempCtx = c.getContext('2d'); tempCtx.fillStyle = g; - tempSvg.render(tempCtx); + tempSvg.render(tempCtx); return tempCtx.createPattern(c, 'no-repeat'); } - - return g; + + return g; } } svg.Element.GradientBase.prototype = new svg.Element.ElementBase; - + // linear gradient element svg.Element.linearGradient = function(node) { this.base = svg.Element.GradientBase; this.base(node); - + this.getGradient = function(ctx, element) { var bb = element.getBoundingBox(); - - var x1 = (this.gradientUnits == 'objectBoundingBox' - ? bb.x() + bb.width() * this.attribute('x1').numValue() + + var x1 = (this.gradientUnits == 'objectBoundingBox' + ? bb.x() + bb.width() * this.attribute('x1').numValue() : this.attribute('x1').Length.toPixels('x')); - var y1 = (this.gradientUnits == 'objectBoundingBox' + var y1 = (this.gradientUnits == 'objectBoundingBox' ? bb.y() + bb.height() * this.attribute('y1').numValue() : this.attribute('y1').Length.toPixels('y')); - var x2 = (this.gradientUnits == 'objectBoundingBox' + var x2 = (this.gradientUnits == 'objectBoundingBox' ? bb.x() + bb.width() * this.attribute('x2').numValue() : this.attribute('x2').Length.toPixels('x')); - var y2 = (this.gradientUnits == 'objectBoundingBox' + var y2 = (this.gradientUnits == 'objectBoundingBox' ? bb.y() + bb.height() * this.attribute('y2').numValue() : this.attribute('y2').Length.toPixels('y')); @@ -1563,92 +1563,92 @@ } } svg.Element.linearGradient.prototype = new svg.Element.GradientBase; - + // radial gradient element svg.Element.radialGradient = function(node) { this.base = svg.Element.GradientBase; this.base(node); - + this.getGradient = function(ctx, element) { var bb = element.getBoundingBox(); - - var cx = (this.gradientUnits == 'objectBoundingBox' - ? bb.x() + bb.width() * this.attribute('cx').numValue() + + var cx = (this.gradientUnits == 'objectBoundingBox' + ? bb.x() + bb.width() * this.attribute('cx').numValue() : this.attribute('cx').Length.toPixels('x')); - var cy = (this.gradientUnits == 'objectBoundingBox' - ? bb.y() + bb.height() * this.attribute('cy').numValue() + var cy = (this.gradientUnits == 'objectBoundingBox' + ? bb.y() + bb.height() * this.attribute('cy').numValue() : this.attribute('cy').Length.toPixels('y')); - + var fx = cx; var fy = cy; if (this.attribute('fx').hasValue()) { - fx = (this.gradientUnits == 'objectBoundingBox' - ? bb.x() + bb.width() * this.attribute('fx').numValue() + fx = (this.gradientUnits == 'objectBoundingBox' + ? bb.x() + bb.width() * this.attribute('fx').numValue() : this.attribute('fx').Length.toPixels('x')); } if (this.attribute('fy').hasValue()) { - fy = (this.gradientUnits == 'objectBoundingBox' - ? bb.y() + bb.height() * this.attribute('fy').numValue() + fy = (this.gradientUnits == 'objectBoundingBox' + ? bb.y() + bb.height() * this.attribute('fy').numValue() : this.attribute('fy').Length.toPixels('y')); } - - var r = (this.gradientUnits == 'objectBoundingBox' + + var r = (this.gradientUnits == 'objectBoundingBox' ? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue() : this.attribute('r').Length.toPixels()); - + return ctx.createRadialGradient(fx, fy, 0, cx, cy, r); } } svg.Element.radialGradient.prototype = new svg.Element.GradientBase; - + // gradient stop element svg.Element.stop = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.offset = this.attribute('offset').numValue(); - + var stopColor = this.style('stop-color'); if (this.style('stop-opacity').hasValue()) stopColor = stopColor.Color.addOpacity(this.style('stop-opacity').value); this.color = stopColor.value; } svg.Element.stop.prototype = new svg.Element.ElementBase; - + // animation base element svg.Element.AnimateBase = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + svg.Animations.push(this); - + this.duration = 0.0; this.begin = this.attribute('begin').Time.toMilliseconds(); this.maxDuration = this.begin + this.attribute('dur').Time.toMilliseconds(); - + this.getProperty = function() { var attributeType = this.attribute('attributeType').value; var attributeName = this.attribute('attributeName').value; - + if (attributeType == 'CSS') { return this.parent.style(attributeName, true); } - return this.parent.attribute(attributeName, true); + return this.parent.attribute(attributeName, true); }; - + this.initialValue = null; - this.removed = false; + this.removed = false; this.calcValue = function() { // OVERRIDE ME! return ''; } - - this.update = function(delta) { + + this.update = function(delta) { // set initial value if (this.initialValue == null) { this.initialValue = this.getProperty().value; } - + // if we're past the end time if (this.duration > this.maxDuration) { // loop for indefinitely repeating animations @@ -1663,49 +1663,49 @@ else { return false; // no updates made } - } + } this.duration = this.duration + delta; - + // if we're past the begin time var updated = false; if (this.begin < this.duration) { var newValue = this.calcValue(); // tween - + if (this.attribute('type').hasValue()) { // for transform, etc. var type = this.attribute('type').value; newValue = type + '(' + newValue + ')'; } - + this.getProperty().value = newValue; updated = true; } - + return updated; } - + // fraction of duration we've covered this.progress = function() { return ((this.duration - this.begin) / (this.maxDuration - this.begin)); - } + } } svg.Element.AnimateBase.prototype = new svg.Element.ElementBase; - + // animate element svg.Element.animate = function(node) { this.base = svg.Element.AnimateBase; this.base(node); - + this.calcValue = function() { var from = this.attribute('from').numValue(); var to = this.attribute('to').numValue(); - + // tween value linearly - return from + (to - from) * this.progress(); + return from + (to - from) * this.progress(); }; } svg.Element.animate.prototype = new svg.Element.AnimateBase; - + // animate color element svg.Element.animateColor = function(node) { this.base = svg.Element.AnimateBase; @@ -1714,7 +1714,7 @@ this.calcValue = function() { var from = new RGBColor(this.attribute('from').value); var to = new RGBColor(this.attribute('to').value); - + if (from.ok && to.ok) { // tween color linearly var r = from.r + (to.r - from.r) * this.progress(); @@ -1726,26 +1726,26 @@ }; } svg.Element.animateColor.prototype = new svg.Element.AnimateBase; - + // animate transform element svg.Element.animateTransform = function(node) { this.base = svg.Element.animate; this.base(node); } svg.Element.animateTransform.prototype = new svg.Element.animate; - + // font element svg.Element.font = function(node) { this.base = svg.Element.ElementBase; this.base(node); - this.horizAdvX = this.attribute('horiz-adv-x').numValue(); - + this.horizAdvX = this.attribute('horiz-adv-x').numValue(); + this.isRTL = false; this.isArabic = false; this.fontFace = null; this.missingGlyph = null; - this.glyphs = []; + this.glyphs = []; for (var i=0; i<this.children.length; i++) { var child = this.children[i]; if (child.type == 'font-face') { @@ -1766,46 +1766,46 @@ this.glyphs[child.unicode] = child; } } - } + } } svg.Element.font.prototype = new svg.Element.ElementBase; - + // font-face element svg.Element.fontface = function(node) { this.base = svg.Element.ElementBase; - this.base(node); - + this.base(node); + this.ascent = this.attribute('ascent').value; this.descent = this.attribute('descent').value; - this.unitsPerEm = this.attribute('units-per-em').numValue(); + this.unitsPerEm = this.attribute('units-per-em').numValue(); } svg.Element.fontface.prototype = new svg.Element.ElementBase; - + // missing-glyph element svg.Element.missingglyph = function(node) { this.base = svg.Element.path; - this.base(node); - + this.base(node); + this.horizAdvX = 0; } svg.Element.missingglyph.prototype = new svg.Element.path; - + // glyph element svg.Element.glyph = function(node) { this.base = svg.Element.path; - this.base(node); - + this.base(node); + this.horizAdvX = this.attribute('horiz-adv-x').numValue(); this.unicode = this.attribute('unicode').value; this.arabicForm = this.attribute('arabic-form').value; } svg.Element.glyph.prototype = new svg.Element.path; - + // text element svg.Element.text = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + if (node != null) { // add children this.children = []; @@ -1819,21 +1819,21 @@ } } } - + this.baseSetContext = this.setContext; this.setContext = function(ctx) { this.baseSetContext(ctx); if (this.style('dominant-baseline').hasValue()) ctx.textBaseline = this.style('dominant-baseline').value; if (this.style('alignment-baseline').hasValue()) ctx.textBaseline = this.style('alignment-baseline').value; } - + this.renderChildren = function(ctx) { var textAnchor = this.style('text-anchor').valueOrDefault('start'); var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); for (var i=0; i<this.children.length; i++) { var child = this.children[i]; - + if (child.attribute('x').hasValue()) { child.x = child.attribute('x').Length.toPixels('x'); } @@ -1841,7 +1841,7 @@ if (child.attribute('dx').hasValue()) x += child.attribute('dx').Length.toPixels('x'); child.x = x; } - + var childLength = child.measureText(ctx); if (textAnchor != 'start' && (i==0 || child.attribute('x').hasValue())) { // new group? // loop through rest of children @@ -1854,33 +1854,33 @@ child.x -= (textAnchor == 'end' ? groupLength : groupLength / 2.0); } x = child.x + childLength; - + if (child.attribute('y').hasValue()) { child.y = child.attribute('y').Length.toPixels('y'); } else { if (child.attribute('dy').hasValue()) y += child.attribute('dy').Length.toPixels('y'); child.y = y; - } + } y = child.y; - + child.render(ctx); } } } svg.Element.text.prototype = new svg.Element.RenderedElementBase; - + // text base svg.Element.TextElementBase = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.getGlyph = function(font, text, i) { var c = text[i]; var glyph = null; if (font.isArabic) { var arabicForm = 'isolated'; - if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal'; + if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal'; if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial'; if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial'; if (typeof(font.glyphs[c]) != 'undefined') { @@ -1894,7 +1894,7 @@ if (glyph == null) glyph = font.missingGlyph; return glyph; } - + this.renderChildren = function(ctx) { var customFont = this.parent.style('font-family').Definition.getDefinition(); if (customFont != null) { @@ -1902,7 +1902,7 @@ var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle); var text = this.getText(); if (customFont.isRTL) text = text.split("").reverse().join(""); - + var dx = svg.ToNumberArray(this.parent.attribute('dx').value); for (var i=0; i<text.length; i++) { var glyph = this.getGlyph(customFont, text, i); @@ -1916,8 +1916,8 @@ if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0); ctx.lineWidth = lw; ctx.scale(1/scale, -1/scale); - ctx.translate(-this.x, -this.y); - + ctx.translate(-this.x, -this.y); + this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm; if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) { this.x += dx[i]; @@ -1925,15 +1925,15 @@ } return; } - + if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y); if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y); } - + this.getText = function() { // OVERRIDE ME } - + this.measureText = function(ctx) { var customFont = this.parent.style('font-family').Definition.getDefinition(); if (customFont != null) { @@ -1951,10 +1951,10 @@ } return measure; } - + var textToMeasure = svg.compressSpaces(this.getText()); if (!ctx.measureText) return textToMeasure.length * 10; - + ctx.save(); this.setContext(ctx); var width = ctx.measureText(textToMeasure).width; @@ -1963,12 +1963,12 @@ } } svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase; - - // tspan + + // tspan svg.Element.tspan = function(node) { this.base = svg.Element.TextElementBase; this.base(node); - + this.text = node.nodeType == 3 ? node.nodeValue : // text node.childNodes.length > 0 ? node.childNodes[0].nodeValue : // element node.text; @@ -1977,34 +1977,34 @@ } } svg.Element.tspan.prototype = new svg.Element.TextElementBase; - + // tref svg.Element.tref = function(node) { this.base = svg.Element.TextElementBase; this.base(node); - + this.getText = function() { var element = this.attribute('xlink:href').Definition.getDefinition(); if (element != null) return element.children[0].getText(); } } - svg.Element.tref.prototype = new svg.Element.TextElementBase; - + svg.Element.tref.prototype = new svg.Element.TextElementBase; + // a element svg.Element.a = function(node) { this.base = svg.Element.TextElementBase; this.base(node); - + this.hasText = true; for (var i=0; i<node.childNodes.length; i++) { if (node.childNodes[i].nodeType != 3) this.hasText = false; } - + // this might contain text this.text = this.hasText ? node.childNodes[0].nodeValue : ''; this.getText = function() { return this.text; - } + } this.baseRenderChildren = this.renderChildren; this.renderChildren = function(ctx) { @@ -2012,7 +2012,7 @@ // render as text element this.baseRenderChildren(ctx); var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize); - svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.Length.toPixels('y'), this.x + this.measureText(ctx), this.y)); + svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.Length.toPixels('y'), this.x + this.measureText(ctx), this.y)); } else { // render as temporary group @@ -2022,37 +2022,37 @@ g.render(ctx); } } - + this.onclick = function() { window.open(this.attribute('xlink:href').value); } - + this.onmousemove = function() { svg.ctx.canvas.style.cursor = 'pointer'; } } - svg.Element.a.prototype = new svg.Element.TextElementBase; - + svg.Element.a.prototype = new svg.Element.TextElementBase; + // image element svg.Element.image = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + svg.Images.push(this); this.img = document.createElement('img'); this.loaded = false; var that = this; this.img.onload = function() { that.loaded = true; } this.img.src = this.attribute('xlink:href').value; - + this.renderChildren = function(ctx) { var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); - + var width = this.attribute('width').Length.toPixels('x'); - var height = this.attribute('height').Length.toPixels('y'); + var height = this.attribute('height').Length.toPixels('y'); if (width == 0 || height == 0) return; - + ctx.save(); ctx.translate(x, y); svg.AspectRatio(ctx, @@ -2062,18 +2062,18 @@ height, this.img.height, 0, - 0); - ctx.drawImage(this.img, 0, 0); + 0); + ctx.drawImage(this.img, 0, 0); ctx.restore(); } } svg.Element.image.prototype = new svg.Element.RenderedElementBase; - + // group element svg.Element.g = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.getBoundingBox = function() { var bb = new svg.BoundingBox(); for (var i=0; i<this.children.length; i++) { @@ -2088,21 +2088,21 @@ svg.Element.symbol = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.baseSetContext = this.setContext; - this.setContext = function(ctx) { + this.setContext = function(ctx) { this.baseSetContext(ctx); - + // viewbox - if (this.attribute('viewBox').hasValue()) { + if (this.attribute('viewBox').hasValue()) { var viewBox = svg.ToNumberArray(this.attribute('viewBox').value); var minX = viewBox[0]; var minY = viewBox[1]; width = viewBox[2]; height = viewBox[3]; - + svg.AspectRatio(ctx, - this.attribute('preserveAspectRatio').value, + this.attribute('preserveAspectRatio').value, this.attribute('width').Length.toPixels('x'), width, this.attribute('height').Length.toPixels('y'), @@ -2110,17 +2110,17 @@ minX, minY); - svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); + svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); } - } + } } - svg.Element.symbol.prototype = new svg.Element.RenderedElementBase; - + svg.Element.symbol.prototype = new svg.Element.RenderedElementBase; + // style element - svg.Element.style = function(node) { + svg.Element.style = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + // text, or spaces then CDATA var css = node.childNodes[0].nodeValue + (node.childNodes.length > 1 ? node.childNodes[1].nodeValue : ''); css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments @@ -2167,60 +2167,60 @@ } } svg.Element.style.prototype = new svg.Element.ElementBase; - - // use element + + // use element svg.Element.use = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.baseSetContext = this.setContext; this.setContext = function(ctx) { this.baseSetContext(ctx); if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').Length.toPixels('x'), 0); if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').Length.toPixels('y')); } - + this.getDefinition = function() { var element = this.attribute('xlink:href').Definition.getDefinition(); if (this.attribute('width').hasValue()) element.attribute('width', true).value = this.attribute('width').value; if (this.attribute('height').hasValue()) element.attribute('height', true).value = this.attribute('height').value; return element; } - + this.path = function(ctx) { var element = this.getDefinition(); if (element != null) element.path(ctx); } - + this.renderChildren = function(ctx) { var element = this.getDefinition(); if (element != null) element.render(ctx); } } svg.Element.use.prototype = new svg.Element.RenderedElementBase; - + // mask element svg.Element.mask = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.apply = function(ctx, element) { - // render as temp svg + // render as temp svg var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); var width = this.attribute('width').Length.toPixels('x'); var height = this.attribute('height').Length.toPixels('y'); - + // temporarily remove mask to avoid recursion var mask = element.attribute('mask').value; element.attribute('mask').value = ''; - + var cMask = document.createElement('canvas'); cMask.width = x + width; cMask.height = y + height; var maskCtx = cMask.getContext('2d'); this.renderChildren(maskCtx); - + var c = document.createElement('canvas'); c.width = x + width; c.height = y + height; @@ -2229,25 +2229,25 @@ tempCtx.globalCompositeOperation = 'destination-in'; tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat'); tempCtx.fillRect(0, 0, x + width, y + height); - + ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat'); ctx.fillRect(0, 0, x + width, y + height); - + // reassign mask - element.attribute('mask').value = mask; + element.attribute('mask').value = mask; } - + this.render = function(ctx) { // NO RENDER } } svg.Element.mask.prototype = new svg.Element.ElementBase; - + // clip element svg.Element.clipPath = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.apply = function(ctx) { for (var i=0; i<this.children.length; i++) { if (this.children[i].path) { @@ -2256,7 +2256,7 @@ } } } - + this.render = function(ctx) { // NO RENDER } @@ -2267,9 +2267,9 @@ svg.Element.filter = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.apply = function(ctx, element) { - // render as temp svg + // render as temp svg var bb = element.getBoundingBox(); var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); @@ -2283,55 +2283,55 @@ width = bb.width(); height = bb.height(); } - + // temporarily remove filter to avoid recursion var filter = element.style('filter').value; element.style('filter').value = ''; - + // max filter distance var extraPercent = .20; var px = extraPercent * width; var py = extraPercent * height; - + var c = document.createElement('canvas'); c.width = width + 2*px; c.height = height + 2*py; var tempCtx = c.getContext('2d'); tempCtx.translate(-x + px, -y + py); element.render(tempCtx); - + // apply filters for (var i=0; i<this.children.length; i++) { this.children[i].apply(tempCtx, 0, 0, width + 2*px, height + 2*py); } - + // render on me ctx.drawImage(c, 0, 0, width + 2*px, height + 2*py, x - px, y - py, width + 2*px, height + 2*py); - + // reassign filter - element.style('filter', true).value = filter; + element.style('filter', true).value = filter; } - + this.render = function(ctx) { // NO RENDER - } + } } svg.Element.filter.prototype = new svg.Element.ElementBase; - + svg.Element.feGaussianBlur = function(node) { this.base = svg.Element.ElementBase; - this.base(node); - + this.base(node); + function make_fgauss(sigma) { - sigma = Math.max(sigma, 0.01); - var len = Math.ceil(sigma * 4.0) + 1; - mask = []; - for (var i = 0; i < len; i++) { - mask[i] = Math.exp(-0.5 * (i / sigma) * (i / sigma)); - } - return mask; + sigma = Math.max(sigma, 0.01); + var len = Math.ceil(sigma * 4.0) + 1; + mask = []; + for (var i = 0; i < len; i++) { + mask[i] = Math.exp(-0.5 * (i / sigma) * (i / sigma)); + } + return mask; } - + function normalize(mask) { var sum = 0; for (var i = 1; i < mask.length; i++) { @@ -2343,34 +2343,34 @@ } return mask; } - + function convolve_even(src, dst, mask, width, height) { for (var y = 0; y < height; y++) { for (var x = 0; x < width; x++) { var a = imGet(src, x, y, width, height, 3)/255; - for (var rgba = 0; rgba < 4; rgba++) { + for (var rgba = 0; rgba < 4; rgba++) { var sum = mask[0] * (a==0?255:imGet(src, x, y, width, height, rgba)) * (a==0||rgba==3?1:a); for (var i = 1; i < mask.length; i++) { var a1 = imGet(src, Math.max(x-i,0), y, width, height, 3)/255; var a2 = imGet(src, Math.min(x+i, width-1), y, width, height, 3)/255; - sum += mask[i] * - ((a1==0?255:imGet(src, Math.max(x-i,0), y, width, height, rgba)) * (a1==0||rgba==3?1:a1) + + sum += mask[i] * + ((a1==0?255:imGet(src, Math.max(x-i,0), y, width, height, rgba)) * (a1==0||rgba==3?1:a1) + (a2==0?255:imGet(src, Math.min(x+i, width-1), y, width, height, rgba)) * (a2==0||rgba==3?1:a2)); } imSet(dst, y, x, height, width, rgba, sum); - } + } } } - } + } function imGet(img, x, y, width, height, rgba) { return img[y*width*4 + x*4 + rgba]; } - + function imSet(img, x, y, width, height, rgba, val) { img[y*width*4 + x*4 + rgba] = val; } - + function blur(ctx, width, height, sigma) { var srcData = ctx.getImageData(0, 0, width, height); @@ -2381,15 +2381,15 @@ convolve_even(tmp, srcData.data, mask, height, width); ctx.clearRect(0, 0, width, height); ctx.putImageData(srcData, 0, 0); - } - + } + this.apply = function(ctx, x, y, width, height) { // assuming x==0 && y==0 for now blur(ctx, width, height, this.attribute('stdDeviation').numValue()); } } svg.Element.filter.prototype = new svg.Element.feGaussianBlur; - + // title element, do nothing svg.Element.title = function(node) { } @@ -2398,15 +2398,15 @@ // desc element, do nothing svg.Element.desc = function(node) { } - svg.Element.desc.prototype = new svg.Element.ElementBase; - + svg.Element.desc.prototype = new svg.Element.ElementBase; + svg.Element.MISSING = function(node) { console.log('ERROR: Element \'' + node.nodeName + '\' not yet implemented.'); } svg.Element.MISSING.prototype = new svg.Element.ElementBase; - + // element factory - svg.CreateElement = function(node) { + svg.CreateElement = function(node) { var className = node.nodeName.replace(/^[^:]+:/,''); // remove namespace className = className.replace(/\-/g,''); // remove dashes var e = null; @@ -2420,20 +2420,20 @@ e.type = node.nodeName; return e; } - + // load from url svg.load = function(ctx, url) { svg.loadXml(ctx, svg.ajax(url)); } - + // load from xml svg.loadXml = function(ctx, xml) { svg.loadXmlDoc(ctx, svg.parseXml(xml)); } - + svg.loadXmlDoc = function(ctx, dom) { svg.init(ctx); - + var mapXY = function(p) { var e = ctx.canvas; while (e) { @@ -2445,7 +2445,7 @@ if (window.scrollY) p.y += window.scrollY; return p; } - + // bind mouse if (svg.opts['ignoreMouse'] != true) { ctx.canvas.onclick = function(e) { @@ -2457,16 +2457,16 @@ svg.Mouse.onmousemove(p.x, p.y); }; } - + var e = svg.CreateElement(dom.documentElement); e.root = true; - + // render loop var isFirstRender = true; var draw = function() { svg.ViewPort.Clear(); if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight); - + if (svg.opts['ignoreDimensions'] != true) { // set canvas size if (e.style('width').hasValue()) { @@ -2480,21 +2480,21 @@ } var cWidth = ctx.canvas.clientWidth || ctx.canvas.width; var cHeight = ctx.canvas.clientHeight || ctx.canvas.height; - svg.ViewPort.SetCurrent(cWidth, cHeight); - + svg.ViewPort.SetCurrent(cWidth, cHeight); + if (svg.opts != null && svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts['offsetX']; if (svg.opts != null && svg.opts['offsetY'] != null) e.attribute('y', true).value = svg.opts['offsetY']; if (svg.opts != null && svg.opts['scaleWidth'] != null && svg.opts['scaleHeight'] != null) { var xRatio = 1, yRatio = 1; if (e.attribute('width').hasValue()) xRatio = e.attribute('width').Length.toPixels('x') / svg.opts['scaleWidth']; if (e.attribute('height').hasValue()) yRatio = e.attribute('height').Length.toPixels('y') / svg.opts['scaleHeight']; - + e.attribute('width', true).value = svg.opts['scaleWidth']; - e.attribute('height', true).value = svg.opts['scaleHeight']; + e.attribute('height', true).value = svg.opts['scaleHeight']; e.attribute('viewBox', true).value = '0 0 ' + (cWidth * xRatio) + ' ' + (cHeight * yRatio); e.attribute('preserveAspectRatio', true).value = 'none'; } - + // clear and render if (svg.opts['ignoreClear'] != true) { ctx.clearRect(0, 0, cWidth, cHeight); @@ -2503,88 +2503,88 @@ if (isFirstRender) { isFirstRender = false; if (svg.opts != null && typeof(svg.opts['renderCallback']) == 'function') svg.opts['renderCallback'](); - } + } } - + var waitingForImages = true; if (svg.ImagesLoaded()) { waitingForImages = false; draw(); } - svg.intervalID = setInterval(function() { + svg.intervalID = setInterval(function() { var needUpdate = false; - + if (waitingForImages && svg.ImagesLoaded()) { waitingForImages = false; needUpdate = true; } - + // need update from mouse events? if (svg.opts['ignoreMouse'] != true) { needUpdate = needUpdate | svg.Mouse.hasEvents(); } - + // need update from animations? if (svg.opts['ignoreAnimation'] != true) { for (var i=0; i<svg.Animations.length; i++) { needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE); } } - + // need update from redraw? if (svg.opts != null && typeof(svg.opts['forceRedraw']) == 'function') { if (svg.opts['forceRedraw']() == true) needUpdate = true; } - + // render if needed if (needUpdate) { - draw(); + draw(); svg.Mouse.runEvents(); // run and clear our events } }, 1000 / svg.FRAMERATE); } - + svg.stop = function() { if (svg.intervalID) { clearInterval(svg.intervalID); } } - + svg.Mouse = new (function() { this.events = []; this.hasEvents = function() { return this.events.length != 0; } - + this.onclick = function(x, y) { - this.events.push({ type: 'onclick', x: x, y: y, + this.events.push({ type: 'onclick', x: x, y: y, run: function(e) { if (e.onclick) e.onclick(); } }); } - + this.onmousemove = function(x, y) { this.events.push({ type: 'onmousemove', x: x, y: y, run: function(e) { if (e.onmousemove) e.onmousemove(); } }); - } - + } + this.eventElements = []; - + this.checkPath = function(element, ctx) { for (var i=0; i<this.events.length; i++) { var e = this.events[i]; if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) this.eventElements[i] = element; } } - + this.checkBoundingBox = function(element, bb) { for (var i=0; i<this.events.length; i++) { var e = this.events[i]; if (bb.isPointInBox(e.x, e.y)) this.eventElements[i] = element; - } + } } - + this.runEvents = function() { svg.ctx.canvas.style.cursor = ''; - + for (var i=0; i<this.events.length; i++) { var e = this.events[i]; var element = this.eventElements[i]; @@ -2592,29 +2592,29 @@ e.run(element); element = element.parent; } - } - + } + // done running, clear - this.events = []; + this.events = []; this.eventElements = []; } }); - + return svg; } })(); if (CanvasRenderingContext2D) { CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh) { - canvg(this.canvas, s, { - ignoreMouse: true, - ignoreAnimation: true, - ignoreDimensions: true, - ignoreClear: true, - offsetX: dx, - offsetY: dy, - scaleWidth: dw, + canvg(this.canvas, s, { + ignoreMouse: true, + ignoreAnimation: true, + ignoreDimensions: true, + ignoreClear: true, + offsetX: dx, + offsetY: dy, + scaleWidth: dw, scaleHeight: dh }); } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu.js index 52ba1b3..065103e 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu.js @@ -1,8 +1,8 @@ /** * Package: svgedit.contextmenu - * + * * Licensed under the Apache License, Version 2 - * + * * Author: Adam Bender */ // Dependencies: @@ -45,7 +45,7 @@ $("#cmenu_canvas").append("<li class='separator'>"); } var shortcut = menuItem.shortcut || ""; - $("#cmenu_canvas").append("<li class='disabled'><a href='#" + menuItem.id + "'>" + $("#cmenu_canvas").append("<li class='disabled'><a href='#" + menuItem.id + "'>" + menuItem.label + "<span class='shortcut'>" + shortcut + "</span></a></li>"); } @@ -53,7 +53,7 @@ var menuItemIsValid = function(menuItem) { return menuItem && menuItem.id && menuItem.label && menuItem.action && typeof menuItem.action == 'function'; } - + // Defer injection to wait out initial menu processing. This probably goes away once all context // menu behavior is brought here. methodDraw.ready(function() { diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu/jquery.contextMenu.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu/jquery.contextMenu.js index 64bc958..e1309fd 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu/jquery.contextMenu.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/contextmenu/jquery.contextMenu.js @@ -18,7 +18,7 @@ var doc = $(document); $.extend($.fn, { - + contextMenu: function(o, callback) { // Defaults if( o.menu == undefined ) return false; @@ -31,7 +31,7 @@ $(this).each( function() { var el = $(this); var offset = $(el).offset(); - + var menu = $('#' + o.menu); // Add contextMenu class @@ -57,28 +57,28 @@ open_context_menu(e,e, srcElement); }) } - + var open_context_menu = function(e, evt, srcElement) { if (typeof evt == 'undefined') evt = e; e.stopPropagation(); - + // Get this context menu - + if( el.hasClass('disabled') || evt.altKey ) return false; - + // Detect mouse position var d = {}, x = e.pageX, y = e.pageY; if (svgedit.browser.isTouch()) var d = {}, x = e.originalEvent.touches[0].pageX, y = e.originalEvent.touches[0].pageY; - - var x_off = win.width() - menu.width(), + + var x_off = win.width() - menu.width(), y_off = win.height() - menu.height(); - + if(x > x_off - 15) x = x_off-15; if(y > y_off - 30) y = y_off-30; // 30 is needed to prevent scrollbars in FF - - if(svgedit.browser.isTouch()) + + if(svgedit.browser.isTouch()) y = y - (menu.height()/2) - + // Show the menu doc.unbind('click'); menu.css({ top: y, left: x }).fadeIn(o.inSpeed); @@ -89,7 +89,7 @@ }).mouseout( function() { menu.find('LI.hover').removeClass('hover'); }); - + // Keyboard doc.keypress( function(e) { switch( e.keyCode ) { @@ -117,7 +117,7 @@ break } }); - + // When items are selected menu.find('A').unbind('mouseup'); menu.find('LI:not(.disabled) A').mouseup( function() { @@ -127,7 +127,7 @@ if( callback ) callback( $(this).attr('href').substr(1), $(srcElement), {x: x - offset.left, y: y - offset.top, docX: x, docY: y} ); return false; }); - + // Hide bindings setTimeout( function() { // Delay for Mozilla doc.click( function() { @@ -137,15 +137,15 @@ }); }, 0); } - + // Disable browser context menu (requires both selectors to work in IE/Safari + FF/Chrome) $(el).add($('UL.contextMenu')).bind('contextmenu', function() { return false; }); - + }); return $(this); }, - + // Disable context menu items on the fly disableContextMenuItems: function(o) { if( o == undefined ) { @@ -158,13 +158,13 @@ var d = o.split(','); for( var i = 0; i < d.length; i++ ) { $(this).find('A[href="' + d[i] + '"]').parent().addClass('disabled'); - + } } }); return( $(this) ); }, - + // Enable context menu items on the fly enableContextMenuItems: function(o) { if( o == undefined ) { @@ -177,13 +177,13 @@ var d = o.split(','); for( var i = 0; i < d.length; i++ ) { $(this).find('A[href="' + d[i] + '"]').parent().removeClass('disabled'); - + } } }); return( $(this) ); }, - + // Disable context menu(s) disableContextMenu: function() { $(this).each( function() { @@ -191,7 +191,7 @@ }); return( $(this) ); }, - + // Enable context menu(s) enableContextMenu: function() { $(this).each( function() { @@ -199,7 +199,7 @@ }); return( $(this) ); }, - + // Destroy context menu(s) destroyContextMenu: function() { // Destroy specified context menus @@ -209,6 +209,6 @@ }); return( $(this) ); } - + }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jPicker.css b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jPicker.css index 5bb30fd..0843b1a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jPicker.css +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jPicker.css @@ -45,23 +45,23 @@ } #svg_editor .jPicker div.Map { - + border: solid #000 1px; - + cursor: crosshair; - + height: 260px; - + margin: 0; - + overflow: hidden; - + padding: 0; - + position: relative; - + width: 260px; - + } #svg_editor .jPicker div[class="Map"] { height: 256px; diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jgraduate.css b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jgraduate.css index 2283c00..91db2c4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jgraduate.css +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/css/jgraduate.css @@ -1,6 +1,6 @@ -/* +/* * jGraduate Default CSS - * + * * Copyright (c) 2010 Jeff Schiller * http://blog.codedread.com/ * @@ -35,7 +35,7 @@ display: none; } -.jGraduate_gradPick { +.jGraduate_gradPick { display: none; overflow: visible; /* position: relative;*/ @@ -55,7 +55,7 @@ } div.jGraduate_GradContainer { border: solid #000 1px; - background-image: url(../images/map-opacity.png); + background-image: url(../images/map-opacity.png); background-position: 0px 0px; height: 256px; width: 256px; @@ -183,13 +183,13 @@ div.jGraduate_stopPicker { position: absolute; display: none; - background: + background: white; padding: 20px; border-radius: 3px; width: 530px; height: 300px; - box-shadow: 0 5px 25px + box-shadow: 0 5px 25px black; } diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jpicker.min.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jpicker.min.js index 147b197..7044b9d 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jpicker.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jpicker.min.js @@ -566,7 +566,7 @@ s, v, changeEvents = new Array(), - fireChangeEvents = + fireChangeEvents = function(context) { for (var i = 0; i < changeEvents.length; i++) changeEvents[i].call($this, $this, context); @@ -2084,4 +2084,4 @@ } } }; -})(jQuery, '1.1.6'); \ No newline at end of file +})(jQuery, '1.1.6'); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.js index ab6890a..5e3d803 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.js @@ -202,9 +202,9 @@ $this.addClass('jGraduate_Picker'); $this.html('<ul class="jGraduate_tabs">' + - '<li class="jGraduate_tab_color jGraduate_tab_current" data-type="col">棰滆壊</li>' + - '<li class="jGraduate_tab_lingrad" data-type="lg">绾挎�ф笎鍙�</li>' + - '<li class="jGraduate_tab_radgrad" data-type="rg">寰勫悜娓愬彉</li>' + + '<li class="jGraduate_tab_color jGraduate_tab_current" data-type="col">Solid Color</li>' + + '<li class="jGraduate_tab_lingrad" data-type="lg">Linear Gradient</li>' + + '<li class="jGraduate_tab_radgrad" data-type="rg">Radial Gradient</li>' + '</ul>' + '<div class="jGraduate_colPick"></div>' + '<div class="jGraduate_gradPick"></div>' + @@ -224,79 +224,79 @@ '</div>' + '<div class="jGraduate_Form jGraduate_Points jGraduate_lg_field">' + '<div class="jGraduate_StopSection">' + - '<label class="jGraduate_Form_Heading">璧风偣</label>' + + '<label class="jGraduate_Form_Heading">Begin Point</label>' + '<div class="jGraduate_Form_Section">' + '<label>x:</label>' + - '<input type="text" id="' + id + '_jGraduate_x1" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媥鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_x1" size="3" title="Enter starting x value between 0.0 and 1.0"/>' + '<label> y:</label>' + - '<input type="text" id="' + id + '_jGraduate_y1" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媦鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_y1" size="3" title="Enter starting y value between 0.0 and 1.0"/>' + '</div>' + '</div>' + '<div class="jGraduate_StopSection">' + - '<label class="jGraduate_Form_Heading">缁堢偣</label>' + + '<label class="jGraduate_Form_Heading">End Point</label>' + '<div class="jGraduate_Form_Section">' + '<label>x:</label>' + - '<input type="text" id="' + id + '_jGraduate_x2" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媥鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_x2" size="3" title="Enter ending x value between 0.0 and 1.0"/>' + '<label> y:</label>' + - '<input type="text" id="' + id + '_jGraduate_y2" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媦鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_y2" size="3" title="Enter ending y value between 0.0 and 1.0"/>' + '</div>' + '</div>' + '</div>' + '<div class="jGraduate_Form jGraduate_Points jGraduate_rg_field">' + '<div class="jGraduate_StopSection">' + - '<label class="jGraduate_Form_Heading">涓績鐐�</label>' + + '<label class="jGraduate_Form_Heading">Center Point</label>' + '<div class="jGraduate_Form_Section">' + '<label>x:</label>' + - '<input type="text" id="' + id + '_jGraduate_cx" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媥鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_cx" size="3" title="Enter x value between 0.0 and 1.0"/>' + '<label> y:</label>' + - '<input type="text" id="' + id + '_jGraduate_cy" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媦鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_cy" size="3" title="Enter y value between 0.0 and 1.0"/>' + '</div>' + '</div>' + '<div class="jGraduate_StopSection">' + - '<label class="jGraduate_Form_Heading">鐒︾偣</label>' + + '<label class="jGraduate_Form_Heading">Focal Point</label>' + '<div class="jGraduate_Form_Section">' + '<label>Match center: <input type="checkbox" checked="checked" id="' + id + '_jGraduate_match_ctr"/></label><br/>' + '<label>x:</label>' + - '<input type="text" id="' + id + '_jGraduate_fx" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媥鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_fx" size="3" title="Enter x value between 0.0 and 1.0"/>' + '<label> y:</label>' + - '<input type="text" id="' + id + '_jGraduate_fy" size="3" title="杈撳叆浠嬩簬0.0鍜�1.0涔嬮棿鐨勮捣濮媦鍊�"/>' + + '<input type="text" id="' + id + '_jGraduate_fy" size="3" title="Enter y value between 0.0 and 1.0"/>' + '</div>' + '</div>' + '</div>' + '<div class="jGraduate_StopSection jGraduate_SpreadMethod">' + - '<label class="jGraduate_Form_Heading">鎵╂暎鏂瑰紡</label>' + + '<label class="jGraduate_Form_Heading">Spread method</label>' + '<div class="jGraduate_Form_Section">' + '<select class="jGraduate_spreadMethod">' + - '<option value=pad selected>寤堕暱</option>' + - '<option value=reflect>鏄犲皠</option>' + - '<option value=repeat>閲嶅</option>' + + '<option value=pad selected>Pad</option>' + + '<option value=reflect>Reflect</option>' + + '<option value=repeat>Repeat</option>' + '</select>' + '</div>' + '</div>' + '<div class="jGraduate_Form">' + '<div class="jGraduate_Slider jGraduate_RadiusField jGraduate_rg_field">' + - '<label class="prelabel">鍗婂緞:</label>' + + '<label class="prelabel">Radius:</label>' + '<div id="' + id + '_jGraduate_Radius" class="jGraduate_SliderBar jGraduate_Radius" title="Click to set radius">' + '<img id="' + id + '_jGraduate_RadiusArrows" class="jGraduate_RadiusArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + '<label><input type="text" id="' + id + '_jGraduate_RadiusInput" size="3" value="100"/>%</label>' + '</div>' + '<div class="jGraduate_Slider jGraduate_EllipField jGraduate_rg_field">' + - '<label class="prelabel">妞渾:</label>' + + '<label class="prelabel">Ellip:</label>' + '<div id="' + id + '_jGraduate_Ellip" class="jGraduate_SliderBar jGraduate_Ellip" title="Click to set Ellip">' + '<img id="' + id + '_jGraduate_EllipArrows" class="jGraduate_EllipArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + '<label><input type="text" id="' + id + '_jGraduate_EllipInput" size="3" value="0"/>%</label>' + '</div>' + '<div class="jGraduate_Slider jGraduate_AngleField jGraduate_rg_field">' + - '<label class="prelabel">瑙掑害:</label>' + + '<label class="prelabel">Angle:</label>' + '<div id="' + id + '_jGraduate_Angle" class="jGraduate_SliderBar jGraduate_Angle" title="Click to set Angle">' + '<img id="' + id + '_jGraduate_AngleArrows" class="jGraduate_AngleArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + '<label><input type="text" id="' + id + '_jGraduate_AngleInput" size="3" value="0"/>潞 </label>' + '</div>' + '<div class="jGraduate_Slider jGraduate_OpacField">' + - '<label class="prelabel">閫忔槑搴�:</label>' + + '<label class="prelabel">Opac:</label>' + '<div id="' + id + '_jGraduate_Opac" class="jGraduate_SliderBar jGraduate_Opac" title="Click to set Opac">' + '<img id="' + id + '_jGraduate_OpacArrows" class="jGraduate_OpacArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.min.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.min.js index 355017b..dfdf8db 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jgraduate/jquery.jgraduate.min.js @@ -34,4 +34,4 @@ (e.paint.alpha*255/100).toString(16);n.length<2;)n="0"+n;n=n.split(".")[0];u=e.paint.solidColor=="none"?"":e.paint.solidColor+n;ba||(u=D[0].getAttribute("stop-color"));$.extend($.fn.jPicker.defaults.window,{alphaSupport:true,effects:{type:"show",speed:0}});Ca.jPicker({window:{title:o.window.pickerTitle},images:{clientPath:o.images.clientPath},color:{active:u,alphaSupport:true}},function(c){e.paint.type="solidColor";e.paint.alpha=c.val("ahex")?Math.round(c.val("a")/255*100):100;e.paint.solidColor= c.val("hex")?c.val("hex"):"none";e.paint.radialGradient=null;ma()},null,function(){na()});var ka=$(s+" .jGraduate_tabs li");ka.click(function(){ka.removeClass("jGraduate_tab_current");$(this).addClass("jGraduate_tab_current");$(s+" > div").hide();var c=$(this).attr("data-type");$(s+" .jGraduate_gradPick").show();if(c==="rg"||c==="lg"){$(".jGraduate_"+c+"_field").show();$(".jGraduate_"+(c==="lg"?"rg":"lg")+"_field").hide();$("#"+b+"_jgraduate_rect")[0].setAttribute("fill","url(#"+b+"_"+c+"_jgraduate_grad)"); p=c==="lg"?"linearGradient":"radialGradient";$("#"+b+"_jGraduate_OpacInput").val(e.paint.alpha).change();var a=$("#"+b+"_"+c+"_jgraduate_grad")[0];if(g!==a){var d=$(g).find("stop");$(a).empty().append(d);g=a;a=ua.val();g.setAttribute("spreadMethod",a)}E=c==="rg"&&g.getAttribute("fx")!=null&&!(ca==qa&&da==ra);$("#"+b+"_jGraduate_focusCoord").toggle(E);if(E)$("#"+b+"_jGraduate_match_ctr")[0].checked=false}else{$(s+" .jGraduate_gradPick").hide();$(s+" .jGraduate_colPick").show()}});$(s+" > div").hide(); -ka.removeClass("jGraduate_tab_current");var ea;switch(e.paint.type){case "linearGradient":ea=$(s+" .jGraduate_tab_lingrad");break;case "radialGradient":ea=$(s+" .jGraduate_tab_radgrad");break;default:ea=$(s+" .jGraduate_tab_color")}e.show();setTimeout(function(){ea.addClass("jGraduate_tab_current").click()},10)}else alert("Container element must have an id attribute to maintain unique id strings for sub-elements.")})}})(); \ No newline at end of file +ka.removeClass("jGraduate_tab_current");var ea;switch(e.paint.type){case "linearGradient":ea=$(s+" .jGraduate_tab_lingrad");break;case "radialGradient":ea=$(s+" .jGraduate_tab_radgrad");break;default:ea=$(s+" .jGraduate_tab_color")}e.show();setTimeout(function(){ea.addClass("jGraduate_tab_current").click()},10)}else alert("Container element must have an id attribute to maintain unique id strings for sub-elements.")})}})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-draginput.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-draginput.js index 92503aa..d58ee88 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-draginput.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-draginput.js @@ -39,12 +39,12 @@ var isTouch = svgedit.browser.isTouch(); var completed = true //for mousewheel var $cursor = (area && this.dragCfg.cursor) - ? $("<div class='draginput_cursor' />").appendTo($label) + ? $("<div class='draginput_cursor' />").appendTo($label) : false $input.attr("readonly", "readonly") if ($cursor && !isNaN(this.dragCfg.start)) $cursor.css("top", (this.dragCfg.start*-1)/scale+cursorHeight) - - //this is where all the magic happens + + //this is where all the magic happens this.adjustValue = function(i, completed){ var v; i = parseFloat(i); @@ -62,9 +62,9 @@ $label.attr("data-value", v) if ($.isFunction(this.dragCfg.callback)) this.dragCfg.callback(this, completed) }; - + $label.toggleClass("draginput", $label.is("label")) - + // when the mouse is down and moving this.move = function(e, oy, val) { if (isTouch) { @@ -80,7 +80,7 @@ var fixed = (step < 1) ? 1 : 0 this.adjustValue(val.toFixed(fixed)) //no undo true }; - + //when the mouse is released this.stop = function() { var selectedElems = canvas.getSelectedElems(); @@ -95,13 +95,13 @@ } this.adjustValue(0, completed) } - + this.updateCursor = function(){ var value = parseFloat(this.value); var pos = (value*-1)/scale+cursorHeight; $cursor.css("top", pos); } - + this.launch = function(e) { var selectedElems = canvas.getSelectedElems(); if (isTouch) e = e.originalEvent.touches[0]; @@ -114,39 +114,39 @@ $(window).bind("mousemove.draginput touchmove.draginput", function(e){el.move(e, oy, parseFloat(val))}) $(window).bind("mouseup.draginput touchend.draginput", function(e){el.stop()}) } - + $(this) .attr("readonly", "readonly") .attr("data-scale", scale) .attr("data-domain", cursorHeight) .attr("data-cursor", ($cursor != false)) - + .bind("mousedown touchstart", function(e){ this.blur(); this.launch(e); }) - + .bind("dblclick taphold", function(e) { this.removeAttribute("readonly", "readonly"); this.focus(); this.select(); }) - + .keydown(function(e){ // Respond to up/down arrow keys. switch(e.keyCode){ case 13: this.adjustValue(0); this.blur(); break; // Enter } }) - + .focus(function(e){ if (this.getAttribute("readonly") === "readonly") this.blur() }) - + .blur(function(e){ this.setAttribute("readonly", "readonly") }) - + .bind("mousewheel", function(e, delta, deltaX, deltaY){ var selectedElems = canvas.getSelectedElems(); if (completed) canvas.undoMgr.beginUndoableChange(attr, selectedElems) @@ -155,18 +155,18 @@ window.undoTimeout = setTimeout(function(){ wheel_input.stop() },200) - + var wheel_input = this; if (deltaY > 0) this.adjustValue(this.dragCfg.step); else if (deltaY < 0) this.adjustValue(-this.dragCfg.step); e.preventDefault(); - + }) }); - + }; // public function diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js index 1a8ef1a..058b258 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js @@ -51,4 +51,4 @@ * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js - */(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=!0,f=a(this).data("index.ui-slider-handle"),g,h,i,j;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:e=!1;if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),g=b._start(d,f);if(g===!1)return}}j=b.options.step,b.options.values&&b.options.values.length?h=i=b.values(f):h=i=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:i=b._valueMin();break;case a.ui.keyCode.END:i=b._valueMax();break;case a.ui.keyCode.PAGE_UP:i=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:i=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(h===b._valueMax())return;i=b._trimAlignValue(h+j);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(h===b._valueMin())return;i=b._trimAlignValue(h-j)}b._slide(d,f,i);return e}}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;if(c.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i);if(j===!1)return!1;this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0;return!0},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);this._slide(a,this._handleIndex,c);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1;return!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e;return this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());return this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()}},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(a){var b,c,d;if(arguments.length){b=this.options.values[a],b=this._trimAlignValue(b);return b}c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;Math.abs(c)*2>=b&&(d+=c>0?b:-b);return parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.17"})})(jQuery); \ No newline at end of file + */(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=!0,f=a(this).data("index.ui-slider-handle"),g,h,i,j;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:e=!1;if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),g=b._start(d,f);if(g===!1)return}}j=b.options.step,b.options.values&&b.options.values.length?h=i=b.values(f):h=i=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:i=b._valueMin();break;case a.ui.keyCode.END:i=b._valueMax();break;case a.ui.keyCode.PAGE_UP:i=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:i=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(h===b._valueMax())return;i=b._trimAlignValue(h+j);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(h===b._valueMin())return;i=b._trimAlignValue(h-j)}b._slide(d,f,i);return e}}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;if(c.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i);if(j===!1)return!1;this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0;return!0},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);this._slide(a,this._handleIndex,c);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1;return!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e;return this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());return this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()}},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(a){var b,c,d;if(arguments.length){b=this.options.values[a],b=this._trimAlignValue(b);return b}c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;Math.abs(c)*2>=b&&(d+=c>0?b:-b);return parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.17"})})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.custom.min.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.custom.min.js index 6e66021..5d7a7f6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.custom.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/jquery-ui/jquery-ui-1.8.custom.min.js @@ -81,4 +81,4 @@ * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js - */(function(b){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(d.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(d.range){if(d.range===true){this.range=b("<div></div>");if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&&d.values.length!=2){d.values=[d.values[0],d.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(d.range=="min"||d.range=="max"){this.range.addClass("ui-slider-range-"+d.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length==0){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(d.values&&d.values.length){while(b(".ui-slider-handle",this.element).length<d.values.length){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){if(!d.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!d.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(e){b(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(j){var g=true;var f=b(this).data("index.ui-slider-handle");if(c.options.disabled){return}switch(j.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:g=false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");c._start(j,f)}break}var h,e,i=c._step();if(c.options.values&&c.options.values.length){h=e=c.values(f)}else{h=e=c.value()}switch(j.keyCode){case b.ui.keyCode.HOME:e=c._valueMin();break;case b.ui.keyCode.END:e=c._valueMax();break;case b.ui.keyCode.PAGE_UP:e=h+((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.PAGE_DOWN:e=h-((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(h==c._valueMax()){return}e=h+i;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(h==c._valueMin()){return}e=h-i;break}c._slide(j,f,e);return g}).keyup(function(f){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(f,e);c._change(f,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(e){var f=this.options;if(f.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var i={x:e.pageX,y:e.pageY};var k=this._normValueFromMouse(i);var d=this._valueMax()-this._valueMin()+1,g;var l=this,j;this.handles.each(function(m){var n=Math.abs(k-l.values(m));if(d>n){d=n;g=b(this);j=m}});if(f.range==true&&this.values(1)==f.min){g=b(this.handles[++j])}this._start(e,j);this._mouseSliding=true;l._handleIndex=j;g.addClass("ui-state-active").focus();var h=g.offset();var c=!b(e.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=c?{left:0,top:0}:{left:e.pageX-h.left-(g.width()/2),top:e.pageY-h.top-(g.height()/2)-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};k=this._normValueFromMouse(i);this._slide(e,j,k);this._animateOff=true;return true},_mouseStart:function(c){return true},_mouseDrag:function(e){var c={x:e.pageX,y:e.pageY};var d=this._normValueFromMouse(c);this._slide(e,this._handleIndex,d);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,i;if("horizontal"==this.orientation){d=this.elementSize.width;i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var g=(i/d);if(g>1){g=1}if(g<0){g=0}if("vertical"==this.orientation){g=1-g}var f=this._valueMax()-this._valueMin(),j=g*f,c=j%this.options.step,h=this._valueMin()+j-c;if(c>(this.options.step/2)){h+=this.options.step}return parseFloat(h.toFixed(5))},_start:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("start",e,c)},_slide:function(g,f,e){var h=this.handles[f];if(this.options.values&&this.options.values.length){var c=this.values(f?0:1);if((this.options.values.length==2&&this.options.range===true)&&((f==0&&e>c)||(f==1&&e<c))){e=c}if(e!=this.values(f)){var d=this.values();d[f]=e;var i=this._trigger("slide",g,{handle:this.handles[f],value:e,values:d});var c=this.values(f?0:1);if(i!==false){this.values(f,e,true)}}}else{if(e!=this.value()){var i=this._trigger("slide",g,{handle:this.handles[f],value:e});if(i!==false){this.value(e)}}}},_stop:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("stop",e,c)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("change",e,c)}},value:function(c){if(arguments.length){this.options.value=this._trimValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(e,h){if(arguments.length>1){this.options.values[e]=this._trimValue(h);this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){var g=this.options.values,d=arguments[0];for(var f=0,c=g.length;f<c;f++){g[f]=this._trimValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)}else{return this.value()}}}else{return this._values()}},_setOption:function(d,e){var c,f=0;if(jQuery.isArray(this.options.values)){f=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(d){case"disabled":if(e){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c++){this._change(null,c)}this._animateOff=false;break}},_step:function(){var c=this.options.step;return c},_value:function(){var c=this.options.value;c=this._trimValue(c);return c},_values:function(d){if(arguments.length){var g=this.options.values[d];g=this._trimValue(g);return g}else{var f=this.options.values.slice();for(var e=0,c=f.length;e<c;e++){f[e]=this._trimValue(f[e])}return f}},_trimValue:function(c){if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c},_valueMin:function(){var c=this.options.min;return c},_valueMax:function(){var c=this.options.max;return c},_refreshValue:function(){var g=this.options.range,e=this.options,m=this;var d=(!this._animateOff)?e.animate:false;if(this.options.values&&this.options.values.length){var j,i;this.handles.each(function(q,o){var p=(m.values(q)-m._valueMin())/(m._valueMax()-m._valueMin())*100;var n={};n[m.orientation=="horizontal"?"left":"bottom"]=p+"%";b(this).stop(1,1)[d?"animate":"css"](n,e.animate);if(m.options.range===true){if(m.orientation=="horizontal"){(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({left:p+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({width:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}else{(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({bottom:(p)+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({height:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}}lastValPercent=p})}else{var k=this.value(),h=this._valueMin(),l=this._valueMax(),f=l!=h?(k-h)/(l-h)*100:0;var c={};c[m.orientation=="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[d?"animate":"css"](c,e.animate);(g=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[d?"animate":"css"]({width:f+"%"},e.animate);(g=="max")&&(this.orientation=="horizontal")&&this.range[d?"animate":"css"]({width:(100-f)+"%"},{queue:false,duration:e.animate});(g=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[d?"animate":"css"]({height:f+"%"},e.animate);(g=="max")&&(this.orientation=="vertical")&&this.range[d?"animate":"css"]({height:(100-f)+"%"},{queue:false,duration:e.animate})}}});b.extend(b.ui.slider,{version:"1.8"})})(jQuery);; \ No newline at end of file + */(function(b){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(d.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(d.range){if(d.range===true){this.range=b("<div></div>");if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&&d.values.length!=2){d.values=[d.values[0],d.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(d.range=="min"||d.range=="max"){this.range.addClass("ui-slider-range-"+d.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length==0){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(d.values&&d.values.length){while(b(".ui-slider-handle",this.element).length<d.values.length){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){if(!d.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!d.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(e){b(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(j){var g=true;var f=b(this).data("index.ui-slider-handle");if(c.options.disabled){return}switch(j.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:g=false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");c._start(j,f)}break}var h,e,i=c._step();if(c.options.values&&c.options.values.length){h=e=c.values(f)}else{h=e=c.value()}switch(j.keyCode){case b.ui.keyCode.HOME:e=c._valueMin();break;case b.ui.keyCode.END:e=c._valueMax();break;case b.ui.keyCode.PAGE_UP:e=h+((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.PAGE_DOWN:e=h-((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(h==c._valueMax()){return}e=h+i;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(h==c._valueMin()){return}e=h-i;break}c._slide(j,f,e);return g}).keyup(function(f){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(f,e);c._change(f,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(e){var f=this.options;if(f.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var i={x:e.pageX,y:e.pageY};var k=this._normValueFromMouse(i);var d=this._valueMax()-this._valueMin()+1,g;var l=this,j;this.handles.each(function(m){var n=Math.abs(k-l.values(m));if(d>n){d=n;g=b(this);j=m}});if(f.range==true&&this.values(1)==f.min){g=b(this.handles[++j])}this._start(e,j);this._mouseSliding=true;l._handleIndex=j;g.addClass("ui-state-active").focus();var h=g.offset();var c=!b(e.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=c?{left:0,top:0}:{left:e.pageX-h.left-(g.width()/2),top:e.pageY-h.top-(g.height()/2)-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};k=this._normValueFromMouse(i);this._slide(e,j,k);this._animateOff=true;return true},_mouseStart:function(c){return true},_mouseDrag:function(e){var c={x:e.pageX,y:e.pageY};var d=this._normValueFromMouse(c);this._slide(e,this._handleIndex,d);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,i;if("horizontal"==this.orientation){d=this.elementSize.width;i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var g=(i/d);if(g>1){g=1}if(g<0){g=0}if("vertical"==this.orientation){g=1-g}var f=this._valueMax()-this._valueMin(),j=g*f,c=j%this.options.step,h=this._valueMin()+j-c;if(c>(this.options.step/2)){h+=this.options.step}return parseFloat(h.toFixed(5))},_start:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("start",e,c)},_slide:function(g,f,e){var h=this.handles[f];if(this.options.values&&this.options.values.length){var c=this.values(f?0:1);if((this.options.values.length==2&&this.options.range===true)&&((f==0&&e>c)||(f==1&&e<c))){e=c}if(e!=this.values(f)){var d=this.values();d[f]=e;var i=this._trigger("slide",g,{handle:this.handles[f],value:e,values:d});var c=this.values(f?0:1);if(i!==false){this.values(f,e,true)}}}else{if(e!=this.value()){var i=this._trigger("slide",g,{handle:this.handles[f],value:e});if(i!==false){this.value(e)}}}},_stop:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("stop",e,c)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("change",e,c)}},value:function(c){if(arguments.length){this.options.value=this._trimValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(e,h){if(arguments.length>1){this.options.values[e]=this._trimValue(h);this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){var g=this.options.values,d=arguments[0];for(var f=0,c=g.length;f<c;f++){g[f]=this._trimValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)}else{return this.value()}}}else{return this._values()}},_setOption:function(d,e){var c,f=0;if(jQuery.isArray(this.options.values)){f=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(d){case"disabled":if(e){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c++){this._change(null,c)}this._animateOff=false;break}},_step:function(){var c=this.options.step;return c},_value:function(){var c=this.options.value;c=this._trimValue(c);return c},_values:function(d){if(arguments.length){var g=this.options.values[d];g=this._trimValue(g);return g}else{var f=this.options.values.slice();for(var e=0,c=f.length;e<c;e++){f[e]=this._trimValue(f[e])}return f}},_trimValue:function(c){if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c},_valueMin:function(){var c=this.options.min;return c},_valueMax:function(){var c=this.options.max;return c},_refreshValue:function(){var g=this.options.range,e=this.options,m=this;var d=(!this._animateOff)?e.animate:false;if(this.options.values&&this.options.values.length){var j,i;this.handles.each(function(q,o){var p=(m.values(q)-m._valueMin())/(m._valueMax()-m._valueMin())*100;var n={};n[m.orientation=="horizontal"?"left":"bottom"]=p+"%";b(this).stop(1,1)[d?"animate":"css"](n,e.animate);if(m.options.range===true){if(m.orientation=="horizontal"){(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({left:p+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({width:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}else{(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({bottom:(p)+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({height:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}}lastValPercent=p})}else{var k=this.value(),h=this._valueMin(),l=this._valueMax(),f=l!=h?(k-h)/(l-h)*100:0;var c={};c[m.orientation=="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[d?"animate":"css"](c,e.animate);(g=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[d?"animate":"css"]({width:f+"%"},e.animate);(g=="max")&&(this.orientation=="horizontal")&&this.range[d?"animate":"css"]({width:(100-f)+"%"},{queue:false,duration:e.animate});(g=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[d?"animate":"css"]({height:f+"%"},e.animate);(g=="max")&&(this.orientation=="vertical")&&this.range[d?"animate":"css"]({height:(100-f)+"%"},{queue:false,duration:e.animate})}}});b.extend(b.ui.slider,{version:"1.8"})})(jQuery);; diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/README.md b/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/README.md index 696e989..f824c56 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/README.md +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/README.md @@ -1,5 +1,5 @@ #About -**jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. +**jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. This plugin is based off of the plugin by Tzury Bar Yochay: [jQuery.hotkeys](http://github.com/tzuryby/hotkeys) @@ -7,9 +7,9 @@ $(expression).bind(types, keys, handler); $(expression).unbind(types, handler); - + $(document).bind('keydown', 'ctrl+a', fn); - + // e.g. replace '$' sign with 'EUR' $('input.foo').bind('keyup', '$', function(){ this.value = this.value.replace('$', 'EUR'); @@ -42,4 +42,4 @@ Others, (IE) either let you handle built-in short-cuts, but will add their functionality after your code has executed. Or (Opera/Safari) will *not* pass those events to the DOM at all. -*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.* \ No newline at end of file +*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.* diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/jquery.hotkeys.min.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/jquery.hotkeys.min.js index 15e6fe3..503234a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/jquery.hotkeys.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/js-hotkeys/jquery.hotkeys.min.js @@ -12,4 +12,4 @@ * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ */ -(function(b){b.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta",219:"[",221:"]"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}};function a(d){if(typeof d.data!=="string"){return}var c=d.handler,e=d.data.toLowerCase().split(" ");d.handler=function(n){if(this!==n.target&&(/textarea|select/i.test(n.target.nodeName)||n.target.type==="text")){return}var h=n.type!=="keypress"&&b.hotkeys.specialKeys[n.which],o=String.fromCharCode(n.which).toLowerCase(),k,m="",g={};if(n.altKey&&h!=="alt"){m+="alt+"}if(n.ctrlKey&&h!=="ctrl"){m+="ctrl+"}if(n.metaKey&&!n.ctrlKey&&h!=="meta"){m+="meta+"}if(n.shiftKey&&h!=="shift"){m+="shift+"}if(h){g[m+h]=true}else{g[m+o]=true;g[m+b.hotkeys.shiftNums[o]]=true;if(m==="shift+"){g[b.hotkeys.shiftNums[o]]=true}}for(var j=0,f=e.length;j<f;j++){if(g[e[j]]){return c.apply(this,arguments)}}}}b.each(["keydown","keyup","keypress"],function(){b.event.special[this]={add:a}})})(jQuery); \ No newline at end of file +(function(b){b.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta",219:"[",221:"]"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}};function a(d){if(typeof d.data!=="string"){return}var c=d.handler,e=d.data.toLowerCase().split(" ");d.handler=function(n){if(this!==n.target&&(/textarea|select/i.test(n.target.nodeName)||n.target.type==="text")){return}var h=n.type!=="keypress"&&b.hotkeys.specialKeys[n.which],o=String.fromCharCode(n.which).toLowerCase(),k,m="",g={};if(n.altKey&&h!=="alt"){m+="alt+"}if(n.ctrlKey&&h!=="ctrl"){m+="ctrl+"}if(n.metaKey&&!n.ctrlKey&&h!=="meta"){m+="meta+"}if(n.shiftKey&&h!=="shift"){m+="shift+"}if(h){g[m+h]=true}else{g[m+o]=true;g[m+b.hotkeys.shiftNums[o]]=true;if(m==="shift+"){g[b.hotkeys.shiftNums[o]]=true}}for(var j=0,f=e.length;j<f;j++){if(g[e[j]]){return c.apply(this,arguments)}}}}b.each(["keydown","keyup","keypress"],function(){b.event.special[this]={add:a}})})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/mousewheel.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/mousewheel.js index f1d5f72..65ebc1c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/mousewheel.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/mousewheel.js @@ -6,7 +6,7 @@ * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.0.6 - * + * * Requires: 1.2.2+ */ @@ -30,7 +30,7 @@ this.onmousewheel = handler; } }, - + teardown: function() { if ( this.removeEventListener ) { for ( var i=types.length; i; ) { @@ -46,7 +46,7 @@ mousewheel: function(fn) { return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); }, - + unmousewheel: function(fn) { return this.unbind("mousewheel", fn); } @@ -57,28 +57,28 @@ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; event = $.event.fix(orgEvent); event.type = "mousewheel"; - + // Old school scrollwheel delta if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } - + // New school multidimensional scroll (touchpads) deltas deltaY = delta; - + // Gecko if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { deltaY = 0; deltaX = -1*delta; } - + // Webkit if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } - + // Add event and delta to the front of the arguments args.unshift(event, delta, deltaX, deltaY); - + return ($.event.dispatch || $.event.handle).apply(this, args); } -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/pathseg.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/pathseg.js index 59eb2d7..9765403 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/pathseg.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/pathseg.js @@ -808,4 +808,4 @@ return builder.pathSegList; } } -}()); \ No newline at end of file +}()); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/requestanimationframe.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/requestanimationframe.js index 5716203..8ea360c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/requestanimationframe.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/requestanimationframe.js @@ -3,20 +3,20 @@ var vendors = ['ms', 'moz', 'webkit', 'o']; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; } - + if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; - + if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function(id) { clearTimeout(id); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js index b788be7..3bae8f7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * @author Guido Marucci Blas - guido@zaubersoftware.com * @description Adds a handler for a custom event 'taphold' that handles a * tap and hold on touch interfaces. @@ -45,10 +45,10 @@ startTapAndHoldDetector.call(this, event) var element = $(this); element.bind(TOUCHMOVE, onTouchMove); - element.bind(TOUCHEND, onTouchEnd); + element.bind(TOUCHEND, onTouchEnd); } else { stopTapAndHoldDetector.call(this); - } + } }; function onTouchMove(event) { @@ -59,10 +59,10 @@ var e = event.originalEvent; var x = (e.changedTouches) ? e.changedTouches[0].pageX: e.pageX; var y = (e.changedTouches) ? e.changedTouches[0].pageY: e.pageY; - + var tapAndHoldPoint = $(this).data("taphold.point"); var euclideanDistance = calculateEuclideanDistance(tapAndHoldPoint.x, tapAndHoldPoint.y, x, y); - + if (euclideanDistance > MAX_DISTANCE_ALLOWED_IN_TAP_AND_HOLD_EVENT) { stopTapAndHoldDetector.call(this); } @@ -80,7 +80,7 @@ function clear() { tapAndHoldTimer = null; $(this).unbind(TOUCHMOVE, onTouchMove); - $(this).unbind(TOUCHEND, onTouchEnd); + $(this).unbind(TOUCHEND, onTouchEnd); }; function startTapAndHoldDetector(event) { @@ -102,12 +102,12 @@ function stopTapAndHoldDetector() { clearTimeout(tapAndHoldTimer); - clear.call(this); + clear.call(this); }; $.event.special["taphold"] = { setup: function() { - + }, add: function(handleObj) { @@ -129,8 +129,8 @@ }, teardown: function() { - + } }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js index 7db1544..8d3acb6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js @@ -1,25 +1,25 @@ function touchHandler(event) -{ - +{ + var touches = event.changedTouches, first = touches[0], type = ""; switch(event.type) { case "touchstart": type="mousedown"; break; - case "touchmove": type="mousemove"; break; + case "touchmove": type="mousemove"; break; case "touchend": type="mouseup"; break; default: return; } - //initMouseEvent(type, canBubble, cancelable, view, clickCount, - // screenX, screenY, clientX, clientY, ctrlKey, + //initMouseEvent(type, canBubble, cancelable, view, clickCount, + // screenX, screenY, clientX, clientY, ctrlKey, // altKey, shiftKey, metaKey, button, relatedTarget); - + var simulatedEvent = document.createEvent("MouseEvent"); - simulatedEvent.initMouseEvent(type, true, true, window, 1, - first.screenX, first.screenY, - first.clientX, first.clientY, false, + simulatedEvent.initMouseEvent(type, true, true, window, 1, + first.screenX, first.screenY, + first.clientX, first.clientY, false, false, false, false, 0/*left*/, null); if(touches.length < 2) { first.target.dispatchEvent(simulatedEvent); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/browser.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/browser.js index 888cc04..242f76c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/browser.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/browser.js @@ -121,7 +121,7 @@ var supportsNativeSVGTransformLists_ = (function() { var rect = document.createElementNS(svgns, 'rect'); var rxform = rect.transform.baseVal; - + var t1 = svg.createSVGTransform(); rxform.appendItem(t1); return rxform.getItem(0) == t1; diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/dialog.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/dialog.js index b92884f..beef8e9 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/dialog.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/dialog.js @@ -1,49 +1,49 @@ // This sets up alternative dialog boxes. They mostly work the same way as // their UI counterparts, expect instead of returning the result, a callback // needs to be included that returns the result as its first parameter. -// In the future we may want to add additional types of dialog boxes, since +// In the future we may want to add additional types of dialog boxes, since // they should be easy to handle this way. (function() { $('#dialog_container').draggable({cancel:'#dialog_content, #dialog_buttons *', containment: 'window'}); var box = $('#dialog_box'), btn_holder = $('#dialog_buttons'); - + var dbox = function(type, msg, callback, defText) { $('#dialog_content').html('<p>'+msg.replace(/\n/g,'</p><p>')+'</p>') .toggleClass('prompt',(type=='prompt')); btn_holder.empty(); - + var ok = $('<input type="button" value="' + uiStrings.common.ok + '">').appendTo(btn_holder); - + if(type != 'alert') { $('<input type="button" value="' + uiStrings.common.cancel + '">') .appendTo(btn_holder) .on("click touchstart", function() { box.hide();callback(false)}); } - + if(type == 'prompt') { var input = $('<input type="text">').prependTo(btn_holder); input.val(defText || ''); input.bind('keydown', 'return', function() {ok.trigger("click touchstart");}); } - + if(type == 'process') { ok.hide(); } box.show(); - - ok.on("click touchstart", function() { + + ok.on("click touchstart", function() { box.hide(); var resp = (type == 'prompt')?input.val():true; if(callback) callback(resp); }).focus(); - + if(type == 'prompt') input.focus(); } - + $.alert = function(msg, cb) { dbox('alert', msg, cb);}; $.confirm = function(msg, cb) { dbox('confirm', msg, cb);}; $.process_cancel = function(msg, cb) { dbox('process', msg, cb);}; $.prompt = function(msg, txt, cb) { dbox('prompt', msg, cb, txt);}; -}()); \ No newline at end of file +}()); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/dragupload.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/dragupload.js index 0ee0dff..0eba1e5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/dragupload.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/dragupload.js @@ -8,4 +8,4 @@ reader.readAsDataURL(e.dataTransfer.files[0]); }, false); -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/draw.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/draw.js index 3be01b8..318204f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/draw.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/draw.js @@ -54,7 +54,7 @@ // Called to ensure that drawings will or will not have randomized ids. // The current_drawing will have its nonce set if it doesn't already. -// +// // Params: // enableRandomization - flag indicating if documents should have randomized ids svgedit.draw.randomizeIds = function(enableRandomization, current_drawing) { @@ -89,19 +89,19 @@ * @type {SVGSVGElement} */ this.svgElem_ = svgElem; - + /** * The latest object number used in this drawing. * @type {number} */ this.obj_num = 0; - + /** * The prefix to prepend to each element id in the drawing. * @type {String} */ this.idPrefix = opt_idPrefix || "svg_"; - + /** * An array of released element ids to immediately reuse. * @type {Array.<number>} @@ -186,7 +186,7 @@ var oldObjNum = this.obj_num; var restoreOldObjNum = false; - // If there are any released numbers in the release stack, + // If there are any released numbers in the release stack, // use the last one instead of the next obj_num. // We need to temporarily use obj_num as that is what getId() depends on. if (this.releasedNums.length > 0) { @@ -238,7 +238,7 @@ if (typeof num != typeof 1 || num <= 0 || this.releasedNums.indexOf(num) != -1) { return false; } - + // push the released number into the released queue this.releasedNums.push(num); @@ -247,7 +247,7 @@ // Function: svgedit.draw.Drawing.getNumLayers // Returns the number of layers in the current drawing. -// +// // Returns: // The number of layers in the current drawing. svgedit.draw.Drawing.prototype.getNumLayers = function() { @@ -269,7 +269,7 @@ // // Parameters: // i - the zero-based index of the layer you are querying. -// +// // Returns: // The name of the ith layer svgedit.draw.Drawing.prototype.getLayerName = function(i) { @@ -287,7 +287,7 @@ }; // Function: getCurrentLayerName -// Returns the name of the currently selected layer. If an error occurs, an empty string +// Returns the name of the currently selected layer. If an error occurs, an empty string // is returned. // // Returns: @@ -326,7 +326,7 @@ // Function: svgedit.draw.Drawing.deleteCurrentLayer -// Deletes the current layer from the drawing and then clears the selection. This function +// Deletes the current layer from the drawing and then clears the selection. This function // then calls the 'changed' handler. This is an undoable action. // Returns: // The SVGGElement of the layer removed or null. @@ -359,7 +359,7 @@ if (child.tagName == "g") { childgroups = true; var name = $("title",child).text(); - + // Hack for Opera 10.60 if(!name && svgedit.browser.isOpera() && child.querySelectorAll) { name = $(child.querySelectorAll('title')).text(); @@ -385,7 +385,7 @@ } } } - + // create a new layer and add all the orphans to it var svgdoc = this.svgElem_.ownerDocument; if (orphans.length > 0 || !childgroups) { @@ -414,7 +414,7 @@ }; // Function: svgedit.draw.Drawing.createLayer -// Creates a new top-level layer in the drawing with the given name and +// Creates a new top-level layer in the drawing with the given name and // sets the current layer to it. // // Parameters: @@ -457,7 +457,7 @@ }; // Function: svgedit.draw.Drawing.setLayerVisibility -// Sets the visibility of the layer. If the layer name is not valid, this function return +// Sets the visibility of the layer. If the layer name is not valid, this function return // false, otherwise it returns true. This is an undo-able action. // // Parameters: @@ -479,7 +479,7 @@ } } if (!layer) return null; - + var oldDisplay = layer.getAttribute("display"); if (!oldDisplay) oldDisplay = "inline"; layer.setAttribute("display", bVisible ? "inline" : "none"); @@ -490,7 +490,7 @@ // Function: svgedit.draw.Drawing.getLayerOpacity // Returns the opacity of the given layer. If the input name is not a layer, null is returned. // -// Parameters: +// Parameters: // layername - name of the layer on which to get the opacity // // Returns: diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/embedapi.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/embedapi.js index 923ee78..a5ae78d 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/embedapi.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/embedapi.js @@ -3,9 +3,9 @@ //initialize communication this.frame = frame; this.stack = []; //callback stack - + var editapi = this; - + window.addEventListener("message", function(e){ if(e.data.substr(0,5) == "ERROR"){ editapi.stack.splice(0,1)[0](e.data,"error") @@ -48,9 +48,9 @@ } }) -Everything is done with the same API as the real svg-edit, +Everything is done with the same API as the real svg-edit, and all documentation is unchanged. The only difference is -when handling returns, the callback notation is used instead. +when handling returns, the callback notation is used instead. var blah = new embedded_svg_edit(window.frames['svgedit']); blah.clearSelection("woot","blah",1337,[1,2,3,4,5,"moo"],-42,{a: "tree",b:6, c: 9})(function(){console.log("GET DATA",arguments)}) @@ -64,13 +64,13 @@ this.encode = embedded_svg_edit.encode; //List of functions extracted with this: //Run in firebug on http://svg-edit.googlecode.com/svn/trunk/docs/files/svgcanvas-js.html - + //for(var i=0,q=[],f = document.querySelectorAll("div.CFunction h3.CTitle a");i<f.length;i++){q.push(f[i].name)};q //var functions = ["clearSelection", "addToSelection", "removeFromSelection", "open", "save", "getSvgString", "setSvgString", //"createLayer", "deleteCurrentLayer", "setCurrentLayer", "renameCurrentLayer", "setCurrentLayerPosition", "setLayerVisibility", //"moveSelectedToLayer", "clear"]; - - + + //Newer, well, it extracts things that aren't documented as well. All functions accessible through the normal thingy can now be accessed though the API //var l=[];for(var i in svgCanvas){if(typeof svgCanvas[i] == "function"){l.push(i)}}; //run in svgedit itself @@ -89,7 +89,7 @@ "getStrokedBBox", "getVisibleElements", "cycleElement", "getUndoStackSize", "getRedoStackSize", "getNextUndoCommandText", "getNextRedoCommandText", "undo", "redo", "cloneSelectedElements", "alignSelectedElements", "getZoom", "getVersion", "setIconSize", "setLang", "setCustomHandlers"]; - + //TODO: rewrite the following, it's pretty scary. for(var i = 0; i < functions.length; i++){ this[functions[i]] = (function(d){ @@ -99,7 +99,7 @@ args.push(arguments[g]); } var cbid = t.send(d,args, function(){}) //the callback (currently it's nothing, but will be set later - + return function(newcallback){ t.callbacks[cbid] = newcallback; //set callback } @@ -128,7 +128,7 @@ //simple partial JSON encoder implementation if(window.JSON && JSON.stringify) return JSON.stringify(obj); var enc = arguments.callee; //for purposes of recursion - + if(typeof obj == "boolean" || typeof obj == "number"){ return obj+'' //should work... }else if(typeof obj == "string"){ diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/history.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/history.js index c5b520e..08f1d09 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/history.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/history.js @@ -101,7 +101,7 @@ if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_UNAPPLY, this); } - + this.elem = this.oldParent.insertBefore(this.elem, this.oldNextSibling); if (handler) { @@ -139,12 +139,12 @@ // Function: svgedit.history.InsertElementCommand.apply // Re-Inserts the new element -svgedit.history.InsertElementCommand.prototype.apply = function(handler) { +svgedit.history.InsertElementCommand.prototype.apply = function(handler) { if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this); } - this.elem = this.parent.insertBefore(this.elem, this.nextSibling); + this.elem = this.parent.insertBefore(this.elem, this.nextSibling); if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.AFTER_APPLY, this); @@ -201,7 +201,7 @@ // Function: RemoveElementCommand.apply // Re-removes the new element -svgedit.history.RemoveElementCommand.prototype.apply = function(handler) { +svgedit.history.RemoveElementCommand.prototype.apply = function(handler) { if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this); } @@ -217,7 +217,7 @@ // Function: RemoveElementCommand.unapply // Re-adds the new element -svgedit.history.RemoveElementCommand.prototype.unapply = function(handler) { +svgedit.history.RemoveElementCommand.prototype.unapply = function(handler) { if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_UNAPPLY, this); } @@ -243,7 +243,7 @@ // Class: svgedit.history.ChangeElementCommand // implements svgedit.history.HistoryCommand -// History command to make a change to an element. +// History command to make a change to an element. // Usually an attribute change, but can also be textcontent. // // Parameters: @@ -471,7 +471,7 @@ this.undoChangeStackPointer = -1; this.undoableChangeStack = []; }; - + // Function: svgedit.history.UndoManager.resetUndoStack // Resets the undo stack, effectively clearing the undo/redo history svgedit.history.UndoManager.prototype.resetUndoStack = function() { @@ -480,30 +480,30 @@ }; // Function: svgedit.history.UndoManager.getUndoStackSize -// Returns: +// Returns: // Integer with the current size of the undo history stack svgedit.history.UndoManager.prototype.getUndoStackSize = function() { return this.undoStackPointer; }; // Function: svgedit.history.UndoManager.getRedoStackSize -// Returns: +// Returns: // Integer with the current size of the redo history stack svgedit.history.UndoManager.prototype.getRedoStackSize = function() { return this.undoStack.length - this.undoStackPointer; }; // Function: svgedit.history.UndoManager.getNextUndoCommandText -// Returns: +// Returns: // String associated with the next undo command -svgedit.history.UndoManager.prototype.getNextUndoCommandText = function() { +svgedit.history.UndoManager.prototype.getNextUndoCommandText = function() { return this.undoStackPointer > 0 ? this.undoStack[this.undoStackPointer-1].getText() : ""; }; // Function: svgedit.history.UndoManager.getNextRedoCommandText -// Returns: +// Returns: // String associated with the next redo command -svgedit.history.UndoManager.prototype.getNextRedoCommandText = function() { +svgedit.history.UndoManager.prototype.getNextRedoCommandText = function() { return this.undoStackPointer < this.undoStack.length ? this.undoStack[this.undoStackPointer].getText() : ""; }; @@ -516,7 +516,7 @@ } }; -// Function: svgedit.history.UndoManager.redo +// Function: svgedit.history.UndoManager.redo // Performs a redo step svgedit.history.UndoManager.prototype.redo = function() { if (this.undoStackPointer < this.undoStack.length && this.undoStack.length > 0) { @@ -524,18 +524,18 @@ cmd.apply(this.handler_); } }; - + // Function: svgedit.history.UndoManager.addCommandToHistory // Adds a command object to the undo history stack // -// Parameters: +// Parameters: // cmd - The command object to add svgedit.history.UndoManager.prototype.addCommandToHistory = function(cmd) { // FIXME: we MUST compress consecutive text changes to the same element // (right now each keystroke is saved as a separate command that includes the // entire text contents of the text element) // TODO: consider limiting the history that we store here (need to do some slicing) - + // if our stack pointer is not at the end, then we have to remove // all commands after the pointer and insert the new command if (this.undoStackPointer < this.undoStack.length && this.undoStack.length > 0) { @@ -547,13 +547,13 @@ // Function: svgedit.history.UndoManager.beginUndoableChange -// This function tells the canvas to remember the old values of the -// attrName attribute for each element sent in. The elements and values -// are stored on a stack, so the next call to finishUndoableChange() will +// This function tells the canvas to remember the old values of the +// attrName attribute for each element sent in. The elements and values +// are stored on a stack, so the next call to finishUndoableChange() will // pop the elements and old values off the stack, gets the current values // from the DOM and uses all of these to construct the undo-able command. // -// Parameters: +// Parameters: // attrName - The name of the attribute being changed // elems - Array of DOM elements being changed svgedit.history.UndoManager.prototype.beginUndoableChange = function(attrName, elems) { @@ -576,7 +576,7 @@ // change since beginUndoableChange was called. The command can then // be added to the command history // -// Returns: +// Returns: // Batch command object with resulting changes svgedit.history.UndoManager.prototype.finishUndoableChange = function() { var p = this.undoChangeStackPointer--; @@ -598,4 +598,4 @@ }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/math.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/math.js index 8d783c1..252bf2f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/math.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/math.js @@ -27,7 +27,7 @@ // Function: svgedit.math.transformPoint // A (hopefully) quicker function to transform a point by a matrix // (this function avoids any DOM calls and just does the math) -// +// // Parameters: // x - Float representing the x coordinate // y - Float representing the y coordinate @@ -39,10 +39,10 @@ // Function: svgedit.math.isIdentity -// Helper function to check if the matrix performs no actual transform +// Helper function to check if the matrix performs no actual transform // (i.e. exists for identity purposes) // -// Parameters: +// Parameters: // m - The matrix object to check // // Returns: @@ -55,15 +55,15 @@ // Function: svgedit.math.matrixMultiply // This function tries to return a SVGMatrix that is the multiplication m1*m2. // We also round to zero when it's near zero -// +// // Parameters: // >= 2 Matrix objects to multiply // -// Returns: +// Returns: // The matrix object resulting from the calculation svgedit.math.matrixMultiply = function() { var args = arguments, i = args.length, m = args[i-1]; - + while(i-- > 1) { var m1 = args[i-1]; m = m1.multiply(m); @@ -74,17 +74,17 @@ if (Math.abs(m.d) < NEAR_ZERO) m.d = 0; if (Math.abs(m.e) < NEAR_ZERO) m.e = 0; if (Math.abs(m.f) < NEAR_ZERO) m.f = 0; - + return m; }; // Function: svgedit.math.hasMatrixTransform // See if the given transformlist includes a non-indentity matrix transform // -// Parameters: +// Parameters: // tlist - The transformlist to check // -// Returns: +// Returns: // Boolean on whether or not a matrix transform was found svgedit.math.hasMatrixTransform = function(tlist) { if(!tlist) return false; @@ -105,7 +105,7 @@ // w - Float with the box width // h - Float with the box height // m - Matrix object to transform the box by -// +// // Returns: // An object with the following values: // * tl - The top left coordinate (x,y object) @@ -144,7 +144,7 @@ miny = Math.min(miny, botright.y); maxy = Math.max(maxy, botright.y); - return {tl:topleft, tr:topright, bl:botleft, br:botright, + return {tl:topleft, tr:topright, bl:botleft, br:botright, aabox: {x:minx, y:miny, width:(maxx-minx), height:(maxy-miny)} }; }; @@ -153,7 +153,7 @@ // (this is the equivalent of SVGTransformList.consolidate() but unlike // that method, this one does not modify the actual SVGTransformList) // This function is very liberal with its min,max arguments -// +// // Parameters: // tlist - The transformlist object // min - Optional integer indicating start transform position @@ -174,7 +174,7 @@ var m = svg.createSVGMatrix(); for (var i = min; i <= max; ++i) { // if our indices are out of range, just use a harmless identity matrix - var mtom = (i >= 0 && i < tlist.numberOfItems ? + var mtom = (i >= 0 && i < tlist.numberOfItems ? tlist.getItem(i).matrix : svg.createSVGMatrix()); m = svgedit.math.matrixMultiply(m, mtom); @@ -188,7 +188,7 @@ // // Parameters: // elem - The DOM element to check -// +// // Returns: // The matrix object associated with the element's transformlist svgedit.math.getMatrix = function(elem) { @@ -198,16 +198,16 @@ // Function: svgedit.math.snapToAngle -// Returns a 45 degree angle coordinate associated with the two given +// Returns a 45 degree angle coordinate associated with the two given // coordinates -// +// // Parameters: // x1 - First coordinate's x value // x2 - Second coordinate's x value // y1 - First coordinate's y value // y2 - Second coordinate's y value // -// Returns: +// Returns: // Object with the following values: // x - The angle-snapped x value // y - The angle-snapped y value @@ -219,7 +219,7 @@ var angle = Math.atan2(dy,dx); var dist = Math.sqrt(dx * dx + dy * dy); var snapangle= Math.round(angle/snap)*snap; - var x = x1 + dist*Math.cos(snapangle); + var x = x1 + dist*Math.cos(snapangle); var y = y1 + dist*Math.sin(snapangle); //console.log(x1,y1,x2,y2,x,y,angle) return {x:x, y:y, a:snapangle}; @@ -237,11 +237,11 @@ // Boolean that's true if rectangles intersect svgedit.math.rectsIntersect = function(r1, r2) { if (!r1 || !r2) return false; - return r2.x < (r1.x+r1.width) && + return r2.x < (r1.x+r1.width) && (r2.x+r2.width) > r1.x && r2.y < (r1.y+r1.height) && (r2.y+r2.height) > r1.y; }; -})(); \ No newline at end of file +})(); 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 4ddd022..3a36218 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 @@ -24,7 +24,6 @@ if(!window.methodDraw) window.methodDraw = function($) { var svgCanvas; - var loadSvgString; var Editor = {}; var is_ready = false; curConfig = { @@ -51,12 +50,12 @@ }, uiStrings = Editor.uiStrings = { common: { - "ok":"OK", - "cancel":"Cancel", - "key_up":"Up", - "key_down":"Down", - "key_backspace":"Backspace", - "key_del":"Del" + "ok":"纭", + "cancel":"鍙栨秷", + "key_up":"涓婁竴姝�", + "key_down":"涓嬩竴姝�", + "key_backspace":"杩斿洖", + "key_del":"鍒犻櫎" }, // This is needed if the locale is English, since the locale strings are not read in that instance. @@ -83,7 +82,7 @@ "noteTheseIssues": "Also note the following issues: ", "unsavedChanges": "There are unsaved changes.", "enterNewLinkURL": "Enter the new hyperlink URL", - "errorLoadingSVG": "閿欒: 鏃犳硶璇诲彇SVG鏁版嵁", + "errorLoadingSVG": "褰撳墠娌℃湁鏁版嵁锛岃缁樺埗SVG鏁版嵁", "URLloadFail": "Unable to load from URL", "retrieving": 'Retrieving "%s" ...' } @@ -289,30 +288,7 @@ Editor.canvas = svgCanvas = new $.SvgCanvas(document.getElementById("svgcanvas"), curConfig); Editor.show_save_warning = false; Editor.paintBox = {fill: null, stroke:null, canvas:null}; - var palette = ["#444444", "#482816", "#422C10", "#3B2F0E", "#32320F", - "#293414", "#1F361B", "#153723", "#0C372C", - "#083734", "#0E353B", "#1A333F", "#273141", - "#332D40", "#3E2A3C", "#462735", "#4B252D", - "#4D2425", "#4C261D", "#666666", "#845335", "#7B572D", - "#6F5C2A", "#62612C", "#546433", "#46673D", - "#396849", "#306856", "#2D6862", "#33666C", - "#426373", "#535F75", "#645A73", "#74556D", - "#805064", "#884D58", "#8B4D4B", "#894F3F", - "#999999", "#C48157", "#B8874D", "#A98E49", "#97944B", - "#849854", "#729C62", "#619E73", "#559E84", - "#529D94", "#5B9BA2", "#6D97AB", "#8391AE", - "#9A8AAB", "#AF84A3", "#BF7E96", "#C97A86", - "#CE7975", "#CC7C65", "#BBBBBB", "#FFB27C", "#FABA6F", - "#E6C36A", "#CFCA6D", "#B8D078", "#A0D58A", - "#8CD79F", "#7DD8B5", "#7AD6CA", "#84D3DB", - "#9ACEE6", "#B6C7EA", "#D3BEE7", "#EDB6DC", - "#FFAFCC", "#FFAAB8", "#FFA9A2", "#FFAC8D", - "#DDDDDD", "#FFE7A2", "#FFF093", "#FFFA8D", "#FFFF91", - "#EEFF9F", "#D1FFB4", "#B9FFCE", "#A8FFE9", - "#A4FFFF", "#B1FFFF", "#CBFFFF", "#EDFFFF", - "#FFF5FF", "#FFEBFF", "#FFE2FF", "#FFDCEC", - "#FFDBD2", "#FFDFB8" - ], + var palette =[], isMac = (navigator.platform.indexOf("Mac") >= 0), isWebkit = (navigator.userAgent.indexOf("AppleWebKit") >= 0), modKey = (isMac ? "meta+" : "ctrl+"), // 鈱� @@ -2793,33 +2769,32 @@ if (is_background) picker = 'canvas' // var opacity = (picker == 'stroke' ? $('#stroke_opacity') : $('#fill_opacity')); var paint = Editor.paintBox[picker].paint; - var title = (picker == 'stroke' ? 'Pick a Stroke Paint and Opacity' : 'Pick a Fill Paint and Opacity'); var was_none = false; var pos = is_background ? {'right': 175, 'top': 50} : {'left': 50, 'bottom': 50} - $("#color_picker") - .draggable({cancel:'.jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker', containment: 'window'}) - .removeAttr("style") - .css(pos) - .jGraduate( - { - paint: paint, - window: { pickerTitle: title }, - images: { clientPath: curConfig.jGraduatePath }, - newstop: 'inverse' - }, - function(p) { - paint = new $.jGraduate.Paint(p); - - Editor.paintBox[picker].setPaint(paint); - svgCanvas.setPaint(picker, paint); - - $('#color_picker').hide(); - }, - function(p) { - $('#color_picker').hide(); - }); + // $("#color_picker") + // .draggable({cancel:'.jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker', containment: 'window'}) + // .removeAttr("style") + // .css(pos) + // .jGraduate( + // { + // paint: paint, + // window: { pickerTitle: title }, + // images: { clientPath: curConfig.jGraduatePath }, + // newstop: 'inverse' + // }, + // function(p) { + // paint = new $.jGraduate.Paint(p); + // + // Editor.paintBox[picker].setPaint(paint); + // svgCanvas.setPaint(picker, paint); + // + // $('#color_picker').hide(); + // }, + // function(p) { + // $('#color_picker').hide(); + // }); }; var PaintBox = function(container, type) { @@ -2840,11 +2815,11 @@ // set up gradients to be used for the buttons var svgdocbox = new DOMParser().parseFromString( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><rect width="100%" height="100%"\ - fill="#' + cur.color + '" opacity="' + cur.opacity + '"/>\ + fill="none" opacity="' + cur.opacity + '"/>\ <defs><linearGradient id="gradbox_"/></defs></svg>', 'text/xml'); var docElem = svgdocbox.documentElement; // docElem.setAttribute('viewBox', '0 0 150 150') - docElem = $(container)[0].appendChild(document.importNode(docElem, true)); + // docElem = $(container)[0].appendChild(document.importNode(docElem, true)); if (type === 'canvas') docElem.setAttribute('width',60.5); else docElem.setAttribute('width',"100%"); @@ -2978,7 +2953,7 @@ var blur_test = svgdocbox.createElementNS('http://www.w3.org/2000/svg', 'feGaussianBlur'); if(typeof blur_test.stdDeviationX === "undefined") { $('#tool_blur').hide(); - } + } $(blur_test).remove(); @@ -3135,8 +3110,10 @@ $('#resolution').change(function(){ var w = $('#canvas_width')[0]; var h = $('#canvas_height')[0]; + console.log(w,h,'www hhh') + console.log(w.value,h.value,'w.value ww h.value hh') if(!this.selectedIndex) { - $('#resolution_label').html("Custom"); + $('#resolution_label').html("榛樿"); w.removeAttribute("readonly"); w.focus(); w.select(); @@ -4025,9 +4002,10 @@ if(success) { callback(true); } else { - $.alert(uiStrings.notification.errorLoadingSVG, function() { - callback(false); - }); + callback(false); + // $.alert(uiStrings.notification.errorLoadingSVG, function() { + // callback(false); + // }); } } @@ -4046,11 +4024,11 @@ is_ready = true; var data = window.parent.document.getElementById("svgContentId").value svgCanvas.clear() - if(data){ + // if(data){ console.log(data,'data data') window.methodDraw.loadSvgString(data) window.methodDraw.updateCanvas() - } + // } // alert(data+'inputValue') }; diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/path.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/path.js index 5b3cd5d..15b432a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/path.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/path.js @@ -58,7 +58,7 @@ svgedit.path.init = function(editorContext) { editorContext_ = editorContext; - + pathFuncs = [0,'ClosePath']; var pathFuncsStrs = ['Moveto', 'Lineto', 'CurvetoCubic', 'CurvetoQuadratic', 'Arc', 'LinetoHorizontal', 'LinetoVertical','CurvetoCubicSmooth','CurvetoQuadraticSmooth']; @@ -170,7 +170,7 @@ svgedit.path.addCtrlGrip = function(id) { var pointGrip = svgedit.utilities.getElem("ctrlpointgrip_"+id); if(pointGrip) return pointGrip; - + pointGrip = document.createElementNS(svgns, "circle"); svgedit.utilities.assignAttributes(pointGrip, { 'id': "ctrlpointgrip_" + id, @@ -222,7 +222,7 @@ var item = seg.item; var index = seg.index; if(!item || !("x1" in item) || !("x2" in item)) return null; - var cpt = {}; + var cpt = {}; var pointGripContainer = svgedit.path.getGripContainer(); // Note that this is intentionally not seg.prev.item @@ -287,7 +287,7 @@ 'd': 'M0,0 0,0' }); pointGripContainer.appendChild(segLine); - } + } if(update) { var prev = seg.prev; @@ -314,13 +314,13 @@ // Function: smoothControlPoints // Takes three points and creates a smoother line based on them -// -// Parameters: +// +// Parameters: // ct1 - Object with x and y values (first control point) // ct2 - Object with x and y values (second control point) // pt - Object with x and y values (third point) // -// Returns: +// Returns: // Array of two "smoothed" point objects svgedit.path.smoothControlPoints = this.smoothControlPoints = function(ct1, ct2, pt) { // each point must not be the origin @@ -328,20 +328,20 @@ y1 = ct1.y - pt.y, x2 = ct2.x - pt.x, y2 = ct2.y - pt.y; - + if ( (x1 != 0 || y1 != 0) && (x2 != 0 || y2 != 0) ) { var anglea = Math.atan2(y1,x1), angleb = Math.atan2(y2,x2), r1 = Math.sqrt(x1*x1+y1*y1), r2 = Math.sqrt(x2*x2+y2*y2), nct1 = editorContext_.getSVGRoot().createSVGPoint(), - nct2 = editorContext_.getSVGRoot().createSVGPoint(); + nct2 = editorContext_.getSVGRoot().createSVGPoint(); if (anglea < 0) { anglea += 2*Math.PI; } if (angleb < 0) { angleb += 2*Math.PI; } - + var angleBetween = Math.abs(anglea - angleb), angleDiff = Math.abs(Math.PI - angleBetween)/2; - + var new_anglea, new_angleb; if (anglea - angleb > 0) { new_anglea = angleBetween < Math.PI ? (anglea + angleDiff) : (anglea - angleDiff); @@ -351,13 +351,13 @@ new_anglea = angleBetween < Math.PI ? (anglea - angleDiff) : (anglea + angleDiff); new_angleb = angleBetween < Math.PI ? (angleb + angleDiff) : (angleb - angleDiff); } - + // rotate the points nct1.x = r1 * Math.cos(new_anglea) + pt.x; nct1.y = r1 * Math.sin(new_anglea) + pt.y; nct2.x = r2 * Math.cos(new_angleb) + pt.x; nct2.y = r2 * Math.sin(new_angleb) + pt.y; - + return [nct1, nct2]; } return undefined; @@ -368,7 +368,7 @@ this.index = index; this.item = item; this.type = item.pathSegType; - + this.ctrlpts = []; this.ptgrip = null; this.segsel = null; @@ -426,7 +426,7 @@ this.type = this.item.pathSegType; } svgedit.path.getControlPoints(this); - } + } // this.segsel.setAttribute("display", y?"inline":"none"); } }; @@ -435,17 +435,17 @@ var item = this.item; // fix for path tool dom breakage, amending item does bad things now, so we take a copy and use that. Can probably improve to just take a shallow copy of object var cloneItem = $.extend({}, item); - var cur_pts = (this.ctrlpts) - ? [cloneItem.x += dx, cloneItem.y += dy, - cloneItem.x1, cloneItem.y1, + var cur_pts = (this.ctrlpts) + ? [cloneItem.x += dx, cloneItem.y += dy, + cloneItem.x1, cloneItem.y1, cloneItem.x2 += dx, cloneItem.y2 += dy] : [cloneItem.x += dx, cloneItem.y += dy]; - + svgedit.path.replacePathSeg(this.type, this.index, cur_pts); if(this.next && this.next.ctrlpts) { var next = this.next.item; - var next_pts = [next.x, next.y, + var next_pts = [next.x, next.y, next.x1 += dx, next.y1 += dy, next.x2, next.y2]; svgedit.path.replacePathSeg(this.next.type, this.next.index, next_pts); } @@ -482,7 +482,7 @@ cloneItem['x' + anum ] = pt.x + (pt.x - this.item['x' + num]); cloneItem['y' + anum ] = pt.y + (pt.y - this.item['y' + num]); - var pts = [ + var pts = [ cloneItem.x, cloneItem.y, cloneItem.x1, cloneItem.y1, cloneItem.x2, cloneItem.y2 @@ -500,7 +500,7 @@ var pts = [item.x,item.y, item.x1,item.y1, item.x2,item.y2]; - + svgedit.path.replacePathSeg(this.type, this.index, pts); this.update(true); }; @@ -536,23 +536,23 @@ this.segs = []; this.selected_pts = []; this.first_seg = null; - + // Set up segs array for(var i=0; i < len; i++) { var item = segList.getItem(i); var segment = new svgedit.path.Segment(i, item); segment.path = this; this.segs.push(segment); - } - + } + var segs = this.segs; var start_i = null; for(var i=0; i < len; i++) { - var seg = segs[i]; + var seg = segs[i]; var next_seg = (i+1) >= len ? null : segs[i+1]; var prev_seg = (i-1) < 0 ? null : segs[i-1]; - + if(seg.type === 2) { if(prev_seg && prev_seg.type !== 1) { // New sub-path, last one is open, @@ -568,7 +568,7 @@ // This is the last real segment of a closed sub-path // Next is first seg after "M" seg.next = segs[start_i+1]; - + // First seg after "M"'s prev is this seg.next.prev = seg; seg.mate = segs[start_i]; @@ -594,7 +594,7 @@ } else if(seg.type !== 1){ // Regular segment, so add grip and its "next" seg.addGrip(); - + // Don't set its "next" if it's an "M" if(next_seg && next_seg.type !== 2) { seg.next = next_seg; @@ -652,17 +652,17 @@ svgedit.path.Path.prototype.deleteSeg = function(index) { var seg = this.segs[index]; var list = this.elem.pathSegList; - + seg.show(false); var next = seg.next; if(seg.mate) { // Make the next point be the "M" point var pt = [next.item.x, next.item.y]; svgedit.path.replacePathSeg(2, next.index, pt); - + // Reposition last node svgedit.path.replacePathSeg(4, seg.index, pt); - + list.removeItem(seg.mate.index); } else if(!seg.prev) { // First node of open path, make next point the M @@ -670,7 +670,7 @@ var pt = [next.item.x, next.item.y]; svgedit.path.replacePathSeg(2, seg.next.index, pt); list.removeItem(index); - + } else { list.removeItem(index); } @@ -690,7 +690,7 @@ return false; } }); - + return closed; }; @@ -698,7 +698,7 @@ var pos = this.selected_pts.indexOf(index); if(pos == -1) { return; - } + } this.segs[index].select(false); this.selected_pts.splice(pos, 1); }; @@ -727,7 +727,7 @@ return this; }; -// Move selected points +// Move selected points svgedit.path.Path.prototype.movePts = function(d_x, d_y) { var i = this.selected_pts.length; while(i--) { @@ -750,23 +750,23 @@ var text; while(i--) { var sel_pt = this.selected_pts[i]; - + // Selected seg var cur = this.segs[sel_pt]; var prev = cur.prev; if(!prev) continue; - + if(!new_type) { // double-click, so just toggle text = "Toggle Path Segment Type"; // Toggle segment to curve/straight line var old_type = cur.type; - + new_type = (old_type == 6) ? 4 : 6; - } - + } + new_type = new_type-0; - + var cur_x = cur.item.x; var cur_y = cur.item.y; var prev_x = prev.item.x; @@ -797,12 +797,12 @@ break; case 4: points = [cur_x,cur_y]; - + // Store original prevve segment nums cur.olditem = cur.item; break; } - + cur.setType(new_type, points); } svgedit.path.path.endChanges(text); @@ -821,7 +821,7 @@ this.addPtsToSelection(pt); if(ctrl_num) { this.dragctrl = ctrl_num; - + if(link_control_pts) { this.segs[pt].setLinked(ctrl_num); } @@ -860,20 +860,20 @@ var getRotVals = function(x, y, oldcx, oldcy, newcx, newcy, angle) { dx = x - oldcx; dy = y - oldcy; - + // rotate the point around the old center r = Math.sqrt(dx*dx + dy*dy); theta = Math.atan2(dy,dx) + angle; dx = r * Math.cos(theta) + oldcx; dy = r * Math.sin(theta) + oldcy; - + // dx,dy should now hold the actual coordinates of each // point after being rotated // now we want to rotate them around the new center in the reverse direction dx -= newcx; dy -= newcy; - + r = Math.sqrt(dx*dx + dy*dy); theta = Math.atan2(dy,dx) - angle; return {'x':(r * Math.cos(theta) + newcx)/1, @@ -881,7 +881,7 @@ }; // If the path was rotated, we must now pay the piper: -// Every path point must be rotated into the rotated coordinate system of +// Every path point must be rotated into the rotated coordinate system of // its old center, then determine the new center, then rotate it back // This is because we want the path to remember its rotation @@ -898,16 +898,16 @@ oldcy = oldbox.y + oldbox.height/2, newcx = box.x + box.width/2, newcy = box.y + box.height/2, - + // un-rotate the new center to the proper position dx = newcx - oldcx, dy = newcy - oldcy, r = Math.sqrt(dx*dx + dy*dy), theta = Math.atan2(dy,dx) + angle; - + newcx = r * Math.cos(theta) + oldcx; newcy = r * Math.sin(theta) + oldcy; - + var list = current_path.pathSegList, i = list.numberOfItems; while (i) { @@ -915,7 +915,7 @@ var seg = list.getItem(i), type = seg.pathSegType; if(type == 1) continue; - + var rvals = getRotVals(seg.x,seg.y, oldcx, oldcy, newcx, newcy, angle), points = [rvals.x, rvals.y]; if(seg.x1 != null && seg.x2 != null) { @@ -926,10 +926,10 @@ svgedit.path.replacePathSeg(type, i, points); } // loop for each point - box = svgedit.utilities.getBBox(current_path); + box = svgedit.utilities.getBBox(current_path); // selectedBBoxes[0].x = box.x; selectedBBoxes[0].y = box.y; // selectedBBoxes[0].width = box.width; selectedBBoxes[0].height = box.height; - + // now we must set the new transform to be rotated around the new center var R_nc = svgroot.createSVGTransform(), tlist = svgedit.transformlist.getTransformList(current_path); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/sanitize.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/sanitize.js index 08ac7ad..66e6581 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/sanitize.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/sanitize.js @@ -78,7 +78,7 @@ "title": [], "tspan": ["class", "clip-path", "clip-rule", "dx", "dy", "fill", "fill-opacity", "fill-rule", "filter", "font-family", "font-size", "font-style", "font-weight", "id", "mask", "opacity", "requiredFeatures", "rotate", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "text-anchor", "textLength", "transform", "x", "xml:space", "y"], "use": ["class", "clip-path", "clip-rule", "fill", "fill-opacity", "fill-rule", "filter", "height", "id", "mask", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "transform", "width", "x", "xlink:href", "y"], - + // MathML Elements "annotation": ["encoding"], "annotation-xml": ["encoding"], @@ -151,7 +151,7 @@ var parent = node.parentNode; // can parent ever be null here? I think the root node's parent is the document... if (!doc || !parent) return; - + var allowedAttrs = svgWhiteList_[node.nodeName]; var allowedAttrsNS = svgWhiteListNS_[node.nodeName]; @@ -159,7 +159,7 @@ if (allowedAttrs != undefined) { var se_attrs = []; - + var i = node.attributes.length; while (i--) { // if the attribute is not in our whitelist, then remove it @@ -168,20 +168,20 @@ var attrName = attr.nodeName; var attrLocalName = attr.localName; var attrNsURI = attr.namespaceURI; - // Check that an attribute with the correct localName in the correct namespace is on + // Check that an attribute with the correct localName in the correct namespace is on // our whitelist or is a namespace declaration for one of our allowed namespaces if (!(allowedAttrsNS.hasOwnProperty(attrLocalName) && attrNsURI == allowedAttrsNS[attrLocalName] && attrNsURI != xmlnsns) && - !(attrNsURI == xmlnsns && nsMap_[attr.nodeValue]) ) + !(attrNsURI == xmlnsns && nsMap_[attr.nodeValue]) ) { // TODO(codedread): Programmatically add the se: attributes to the NS-aware whitelist. // Bypassing the whitelist to allow se: prefixes. Is there // a more appropriate way to do this? if(attrName.indexOf('se:') == 0) { se_attrs.push([attrName, attr.nodeValue]); - } + } node.removeAttributeNS(attrNsURI, attrLocalName); } - + // Add spaces before negative signs where necessary if(svgedit.browser.isGecko()) { switch ( attrName ) { @@ -192,7 +192,7 @@ node.setAttribute(attrName, val); } } - + // for the style attribute, rewrite it in terms of XML presentational attributes if (attrName == "style") { var props = attr.nodeValue.split(";"), @@ -207,15 +207,15 @@ node.removeAttribute('style'); } } - + $.each(se_attrs, function(i, attr) { node.setAttributeNS(se_ns, attr[0], attr[1]); }); - + // for some elements that have a xlink:href, ensure the URI refers to a local element // (but not for links) var href = svgedit.utilities.getHref(node); - if(href && + if(href && ["filter", "linearGradient", "pattern", "radialGradient", "textPath", "use"].indexOf(node.nodeName) >= 0) { @@ -226,13 +226,13 @@ node.removeAttributeNS(xlinkns, "href"); } } - + // Safari crashes on a <use> without a xlink:href, so we just remove the node here if (node.nodeName == "use" && !svgedit.utilities.getHref(node)) { parent.removeChild(node); return; } - // if the element has attributes pointing to a non-local reference, + // if the element has attributes pointing to a non-local reference, // need to remove the attribute $.each(["clip-path", "fill", "filter", "marker-end", "marker-mid", "marker-start", "mask", "stroke"],function(i,attr) { var val = node.getAttribute(attr); @@ -245,7 +245,7 @@ } } }); - + // recurse to children i = node.childNodes.length; while (i--) { svgedit.sanitize.sanitizeSvg(node.childNodes.item(i)); } diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/select.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/select.js index 8b6f2a7..83f5272 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/select.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/select.js @@ -27,7 +27,7 @@ // Class: svgedit.select.Selector // Private class for DOM element selection boxes -// +// // Parameters: // id - integer to internally indentify the selector // elem - DOM element associated with this selector @@ -61,7 +61,7 @@ } }) ); - + if (svgedit.browser.isTouch()) { this.selectorRect.setAttribute("stroke-opacity", 0.3); } @@ -82,10 +82,10 @@ }; -// Function: svgedit.select.Selector.reset +// Function: svgedit.select.Selector.reset // Used to reset the id and element that the selector is attached to // -// Parameters: +// Parameters: // e - DOM element associated with this selector svgedit.select.Selector.prototype.reset = function(e) { this.locked = true; @@ -164,7 +164,7 @@ var bbox = svgedit.utilities.getBBox(selected); if(tagName === 'g' && !$.data(selected, 'gsvg')) { // The bbox for a group does not include stroke vals, so we - // get the bbox based on its children. + // get the bbox based on its children. var stroked_bbox = svgFactory_.getStrokedBBox(selected.childNodes); if(stroked_bbox) { bbox = stroked_bbox; @@ -177,17 +177,17 @@ // we need to handle temporary transforms too // if skewed, get its transformed box, then find its axis-aligned bbox - + //* offset *= current_zoom; - + var nbox = svgedit.math.transformBox(l*current_zoom, t*current_zoom, w*current_zoom, h*current_zoom, m), aabox = nbox.aabox, nbax = aabox.x - offset, nbay = aabox.y - offset, nbaw = aabox.width + (offset * 2), nbah = aabox.height + (offset * 2); - + // now if the shape is rotated, un-rotate it var cx = nbax + nbaw/2, cy = nbay + nbah/2; @@ -227,7 +227,7 @@ + ' ' + (nbax+nbaw) + ',' + (nbay+nbah) + ' ' + nbax + ',' + (nbay+nbah) + 'z'; selectedBox.setAttribute('d', dstr); - + var xform = angle ? 'rotate(' + [angle,cx,cy].join(',') + ')' : ''; this.selectorGroup.setAttribute('transform', xform); @@ -255,17 +255,17 @@ selectedGrips[dir].setAttribute('x', coords[0]); selectedGrips[dir].setAttribute('y', coords[1]); }; - + this.rotateCoords = { 'nw': [nbax, nbay], 'ne': [nbax+nbaw+8, nbay], 'sw': [nbax, nbay+nbah+8], 'se': [nbax+nbaw+8, nbay+nbah+8] }; - + for(var dir in this.rotateCoords) { var coords = this.rotateCoords[dir]; - mgr.rotateGrips[dir].setAttribute('cx', coords[0]); + mgr.rotateGrips[dir].setAttribute('cx', coords[0]); mgr.rotateGrips[dir].setAttribute('cy', coords[1]); } @@ -369,12 +369,12 @@ } }); if (svgedit.browser.isTouch()) { - + grip.setAttribute("width", 30.5) grip.setAttribute("height", 30.5) grip.setAttribute("fill-opacity", 0.3) } - + $.data(grip, 'dir', dir); $.data(grip, 'type', 'resize'); this.selectorGrips[dir] = this.selectorGripsGroup.appendChild(grip); @@ -402,7 +402,7 @@ 'id': 'placeholder_defs' } }) - + var pattern = svgFactory_.createSVGElement({ 'element': 'pattern', 'attr': { @@ -415,7 +415,7 @@ 'viewBox': '0 0 10 10' } }) - + var pattern_bg = svgFactory_.createSVGElement({ 'element': 'rect', 'attr': { @@ -437,7 +437,7 @@ 'fill': "#eee" } }) - + var pattern_square2 = svgFactory_.createSVGElement({ 'element': 'rect', 'attr': { @@ -505,7 +505,7 @@ }; // Function: svgedit.select.SelectorManager.releaseSelector -// Removes the selector of the given element (hides selection box) +// Removes the selector of the given element (hides selection box) // // Parameters: // elem - DOM element to remove the selector for @@ -546,7 +546,7 @@ 'fill': 'none', 'stroke': '#666', 'stroke-width': 1, - 'stroke-dasharray': '3,2', + 'stroke-dasharray': '3,2', 'display': 'none', 'style': 'pointer-events:none' } @@ -602,4 +602,4 @@ return selectorManager_; }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/svgcanvas.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/svgcanvas.js index a947d89..7813ca9 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/svgcanvas.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/svgcanvas.js @@ -121,7 +121,7 @@ var curConfig = { show_outside_canvas: true, selectNew: true, - dimensions: [640, 480] + dimensions: [200, 200] }; // Update config with new one if given diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/svgtransformlist.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/svgtransformlist.js index 4980537..914bc2c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/svgtransformlist.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/svgtransformlist.js @@ -57,12 +57,12 @@ // ************************************************************************************** -// SVGTransformList implementation for Webkit +// SVGTransformList implementation for Webkit // These methods do not currently raise any exceptions. // These methods also do not check that transforms are being inserted. This is basically // implementing as much of SVGTransformList that we need to get the job done. // -// interface SVGEditTransformList { +// interface SVGEditTransformList { // attribute unsigned long numberOfItems; // void clear ( ) // SVGTransform initialize ( in SVGTransform newItem ) @@ -93,7 +93,7 @@ // Transform attribute parser var str = this._elem.getAttribute("transform"); if(!str) return; - + // TODO: Add skew support in future var re = /\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/; var arr = []; @@ -119,7 +119,7 @@ var xform = svgroot.createSVGTransform(); var fname = 'set' + name.charAt(0).toUpperCase() + name.slice(1); var values = name=='matrix'?[mtx]:val_arr; - + if (name == 'scale' && values.length == 1) { values.push(values[0]); } else if (name == 'translate' && values.length == 1) { @@ -153,26 +153,26 @@ } } }; - + this.numberOfItems = 0; - this.clear = function() { + this.clear = function() { this.numberOfItems = 0; this._xforms = []; }; - + this.initialize = function(newItem) { this.numberOfItems = 1; this._removeFromOtherLists(newItem); this._xforms = [newItem]; }; - + this.getItem = function(index) { if (index < this.numberOfItems && index >= 0) { return this._xforms[index]; } throw {code: 1}; // DOMException with code=INDEX_SIZE_ERR }; - + this.insertItemBefore = function(newItem, index) { var retValue = null; if (index >= 0) { @@ -198,7 +198,7 @@ } return retValue; }; - + this.replaceItem = function(newItem, index) { var retValue = null; if (index < this.numberOfItems && index >= 0) { @@ -209,7 +209,7 @@ } return retValue; }; - + this.removeItem = function(index) { if (index < this.numberOfItems && index >= 0) { var retValue = this._xforms[index]; @@ -228,7 +228,7 @@ throw {code: 1}; // DOMException with code=INDEX_SIZE_ERR } }; - + this.appendItem = function(newItem) { this._removeFromOtherLists(newItem); this._xforms.push(newItem); @@ -288,4 +288,4 @@ }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/src/units.js b/web/public/SVGOrigin/Method-Draw-master/editor/src/units.js index 32878ee..7c9eff5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/src/units.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/src/units.js @@ -99,7 +99,7 @@ // Function: svgedit.units.shortFloat // Rounds a given value to a float with number of digits defined in save_options // -// Parameters: +// Parameters: // val - The value as a String, Number or Array of two numbers to be rounded // // Returns: @@ -129,7 +129,7 @@ // Function: svgedit.units.setUnitAttr // Sets an element's attribute based on the unit in its current value. // -// Parameters: +// Parameters: // elem - DOM element to be changed // attr - String with the name of the attribute associated with the value // val - String with the attribute value to convert @@ -137,7 +137,7 @@ if(!isNaN(val)) { // New value is a number, so check currently used unit var old_val = elem.getAttribute(attr); - + // Enable this for alternate mode // if(old_val !== null && (isNaN(old_val) || elementContainer_.getBaseUnit() !== 'px')) { // // Old value was a number, so get unit, then convert @@ -161,7 +161,7 @@ // } // val = val / typeMap_[unit]; // } -// +// // val += unit; // } } @@ -204,7 +204,7 @@ }; // Function: svgedit.units.convertToNum -// Converts given values to numbers. Attributes must be supplied in +// Converts given values to numbers. Attributes must be supplied in // case a percentage is given // // Parameters: @@ -213,13 +213,13 @@ svgedit.units.convertToNum = function(attr, val) { // Return a number if that's what it already is if(!isNaN(val)) return val-0; - + if(val.substr(-1) === '%') { // Deal with percentage, depends on attribute var num = val.substr(0, val.length-1)/100; var width = elementContainer_.getWidth(); var height = elementContainer_.getHeight(); - + if(w_attrs.indexOf(attr) >= 0) { return num * width; } else if(h_attrs.indexOf(attr) >= 0) { @@ -238,7 +238,7 @@ // Function: svgedit.units.isValidUnit // Check if an attribute's value is in a valid format // -// Parameters: +// Parameters: // attr - String with the name of the attribute associated with the value // val - String with the attribute value to check svgedit.units.isValidUnit = function(attr, val, selectedElement) { @@ -273,9 +273,9 @@ } else { valid = true; } - + return valid; }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.eot index 300f592..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.ttf index b20a825..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.woff index 30b176f..b0a29fb 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Anivers-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.svg index 55fd0f6..a18fcf2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.svg @@ -142,4 +142,4 @@ <glyph unicode="™" horiz-adv-x="3623" d="M1577 0v172h144v1153h-144v191h480l481 -1309l487 1309h455v-191h-143v-1153h143v-172h-492v172h162v1164l-530 -1336h-170l-537 1339v-1167h156v-172h-492zM41 1116v400h1352v-400h-205v236h-400v-1180h156v-172h-491v172h139v1180h-346v-236h-205z" /> <glyph unicode="" horiz-adv-x="1035" d="M0 1035h1035v-1035h-1035v1035z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.ttf index a82e385..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Arvo-Regular-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.eot index 1b442b2..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.svg index 510798a..df0285a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.svg @@ -130,4 +130,4 @@ <glyph unicode="−" horiz-adv-x="1331" d="M102 496v137h1127v-137h-1127z" /> <glyph unicode="" horiz-adv-x="1125" d="M0 1125h1125v-1125h-1125v1125z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.ttf index 2d49db0..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.woff index f63f813..8aa47c8 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Junction-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.eot index 08deeb7..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.svg index 7523f75..96d2704 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.svg @@ -232,4 +232,4 @@ <glyph unicode="fi" horiz-adv-x="772" d="M20 934v186h105v31q0 45 1 69.5t7 77t22.5 84t43 67.5t72.5 53.5t108 17.5q33 0 69.5 -4.5t57.5 -8.5l20 -2v-184q-41 12 -110 12q-31 0 -50.5 -18.5t-25.5 -58t-7 -54t-1 -53.5v-29h358v-1120h-207v934h-151v-934h-207v934h-105z" /> <glyph unicode="fl" horiz-adv-x="772" d="M20 934v186h105v31q0 45 1 69.5t7 77t22.5 84t43 67.5t72.5 53.5t108 17.5q33 0 69.5 -4.5t57.5 -8.5l20 -2h164v-1505h-207v1329q-37 4 -67.5 4t-50 -18.5t-25.5 -58t-7 -54t-1 -53.5v-29h104v-186h-104v-934h-207v934h-105z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.ttf index efbe8b4..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.woff index 2e2cda9..58d5ae2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/League_Gothic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.eot index 9912002..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.ttf index bbd01d5..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.woff index 9f38a96..92217fc 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.eot index d0a3ace..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.ttf index add5c02..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.woff index 85adf38..e3b4458 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/Museo_Slab_Italic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bold-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bold-webfont.woff index 403723b..c0f3f42 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bold-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bold-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bolditalic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bolditalic-webfont.woff index b601f26..a5c43e0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bolditalic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-bolditalic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-italic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-italic-webfont.woff index 890b291..dd7a293 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-italic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-italic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-regular-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-regular-webfont.woff index dad6488..31a49d2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-regular-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/arvo-regular-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/euphoriascript-regular-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/euphoriascript-regular-webfont.woff index 57ee337..c0da8d6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/euphoriascript-regular-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/euphoriascript-regular-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.eot index 94f8fae..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.svg index 6bc919a..e9adb68 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.svg @@ -936,4 +936,4 @@ <glyph d="M71 154q0 37 11.5 66.5t32.5 49t35 28.5t34 19q5 3 9.5 4.5t6.5 2.5h2l-2 2q-3 1 -8 4t-11 7q-101 69 -101 158q0 68 49.5 115.5t120.5 47.5q67 0 112.5 -42t45.5 -108q0 -16 -2 -30t-7 -26.5t-9.5 -22.5t-13.5 -20t-14 -16.5t-15.5 -15t-14.5 -12t-15 -11t-12 -8.5 q-9 -7 -9 -8t9 -6q1 -1 17 -9.5t23 -14l22.5 -17t24 -24t19 -29.5t15 -38.5t4.5 -45.5q0 -72 -50 -116t-132 -44q-73 0 -125 45t-52 115zM124 164q0 -63 35 -102.5t93 -39.5q50 0 81.5 39t31.5 92q0 40 -19.5 70.5t-40 45t-59.5 35.5q-22 12 -27 12q-3 0 -33 -21 q-62 -46 -62 -131zM138 507q0 -64 69 -118q34 -26 54 -35l16 -7q3 0 14 10q26 23 49 65t23 78q0 64 -32 100t-83 36q-50 0 -80 -37.5t-30 -91.5z" /> <glyph d="M60 204q0 89 55 141.5t138 52.5q87 0 143.5 -62t56.5 -174q0 -70 -26.5 -130t-68 -99.5t-88.5 -70.5t-91 -47.5t-71.5 -24.5t-34.5 -8q-4 0 -7 9t-3 16q0 2 24 9.5t62 24t79 42t80 71t59 102.5l3 7l3 10.5t0 3.5q-2 0 -20 -12q-54 -33 -125 -33q-77 0 -122.5 47.5 t-45.5 124.5zM125 214q0 -60 35 -105.5t95 -45.5q96 0 126 52q6 11 6 57q0 50 -13 92.5t-43.5 73t-74.5 30.5q-64 0 -97.5 -43.5t-33.5 -110.5z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.ttf index 008d5f9..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.woff index ede3aa2..1aa36e4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.eot index 7cc62dd..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.svg index 816155b..29b08bf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.svg @@ -679,4 +679,4 @@ <glyph horiz-adv-x="415" d="M45 130q0 34 14.5 66t35 54.5t41.5 39.5t35.5 27t14.5 12q0 1 -10.5 10.5t-25 25t-29 35.5t-25 47t-10.5 53q0 71 48 116t124 45q62 0 99.5 -35.5t37.5 -98.5q0 -29 -13.5 -58t-32.5 -49.5t-38.5 -37t-33 -26.5t-13.5 -12q0 -1 11.5 -11.5t28 -28.5t32.5 -40t27.5 -53 t11.5 -61q0 -67 -52.5 -110t-129.5 -43q-68 0 -108 33.5t-40 99.5zM99 145q0 -55 30.5 -89t72.5 -34q48 0 81 35.5t33 82.5q0 22 -11.5 48.5t-27.5 48t-33.5 39.5t-29.5 28.5t-14 10.5q-7 0 -30 -20.5t-47 -62.5t-24 -87zM139 534q0 -36 25.5 -79.5t51 -69.5t30.5 -26 q7 0 30.5 21.5t46.5 62.5t23 82q0 48 -28 80.5t-74 32.5q-48 0 -76.5 -32t-28.5 -72z" /> <glyph horiz-adv-x="437" d="M-6 -185q0 2 32 13q114 40 235 186q20 23 20 32q-2 1 -5 0.5t-12 -4t-12 -4.5q-41 -13 -74 -13q-62 0 -100 45.5t-38 121.5q0 89 62 145.5t146 56.5q70 0 109.5 -52.5t39.5 -138.5q0 -77 -39 -150.5t-101 -125.5q-49 -41 -111.5 -74t-99 -45.5t-43.5 -12.5q-9 0 -9 20z M99 173q0 -55 26.5 -88t79.5 -33q44 0 74 13q25 11 42.5 64t17.5 111q0 61 -25.5 94.5t-66.5 33.5q-66 0 -107 -60.5t-41 -134.5z" /> </font> -</defs></svg> \ No newline at end of file +</defs></svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.ttf index 8f41cca..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.woff index 53156d2..322e9a0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fanwood_italic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.eot b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.eot index 93b9980..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.eot +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.eot Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.ttf index 9ef0f80..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.woff index 144fbc9..afc9c70 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/fertigo-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-bold-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-bold-webfont.woff index 67daa18..fa1b19a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-bold-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-bold-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-light-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-light-webfont.woff index 5aa53e8..106b4fa 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-light-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/oswald-light-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/shadowsintolight-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/shadowsintolight-webfont.woff index af8e15c..3776cb9 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/shadowsintolight-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/shadowsintolight-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-black-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-black-webfont.woff index 1057727..bfa380a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-black-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-black-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-blackitalic-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-blackitalic-webfont.woff index 63080eb..c0efc93 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-blackitalic-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-blackitalic-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-italic-webfont.ttf b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-italic-webfont.ttf index d469c0c..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-italic-webfont.ttf +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-italic-webfont.ttf Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-regular-webfont.woff b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-regular-webfont.woff index 3f8d383..3fbbf03 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-regular-webfont.woff +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/simonetta-regular-webfont.woff Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.html b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.html index e96f143..8921fa8 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.html +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.html @@ -6,14 +6,14 @@ </head> <body> <h2>@font-face in SVG</h2> - + <p style="width: 500px"><strong>Problem:</strong> I'm trying trying to place an images in svg format with custom fonts. It works in <code>svg</code> but not in <code>img</code>. If you open the image in a new tab you will see it rendered with the proper font. The font is served from this same website in this directory.</p> - + <a href="test_ff.svg">Link to the test.svg</a> - + <table> <tr><td> - <svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> + <svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> <defs> <style type="text/css"> @font-face { @@ -30,7 +30,7 @@ </td> <td> <pre> - <svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> + <svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> <defs> <style type="text/css"> @font-face { @@ -55,8 +55,8 @@ </pre> </td> </tr> - </table> - - + </table> + + </body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.svg index ddfe3ef..6ea0e28 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test.svg @@ -1,5 +1,5 @@ -<svg width="300" height="300" version="1.1" xmlns = 'http://www.w3.org/2000/svg' viewBox="0 0 300 300"> +<svg width="300" height="300" version="1.1" xmlns = 'http://www.w3.org/2000/svg' viewBox="0 0 300 300"> <defs> <style type="text/css"> @font-face { @@ -12,4 +12,4 @@ </defs> <rect x="0" y="0" height="300" width="300" fill="#eee" /> <text x="100" y="100" font-family="Arvo" font-weight="normal" font-size="32">Text using CSS @font-face</text> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ff.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ff.svg index 88d0bd7..099d02e 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ff.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ff.svg @@ -1,6 +1,6 @@ -<svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> +<svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> <defs> <style type="text/css"> @font-face { @@ -13,4 +13,4 @@ </defs> <rect x="0" y="0" height="100" width="500" fill="#eee" /> <text x="20" y="50" font-family="Arvo" font-weight="normal" font-size="32">Text using CSS @font-face</text> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ffsvg.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ffsvg.svg index 9e14859..31ec8c0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ffsvg.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/font-files/test_ffsvg.svg @@ -1,4 +1,4 @@ -<svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> +<svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200"> <defs> <font-face font-family="Arvo"> <font-face-src> @@ -10,4 +10,4 @@ </defs> <rect x="0" y="0" height="100" width="500" fill="#eee" /> <text x="20" y="50" font-family="Arvo" font-weight="normal" font-size="32">Text using CSS @font-face</text> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/fonts.css b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/fonts.css index 1604519..28c4e35 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/fonts.css +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/fonts.css @@ -81,4 +81,4 @@ src: url('font-files/fanwood_italic-webfont.woff') format('woff'); font-weight: normal; font-style: italic; -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.compiled.css b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.compiled.css index 3f0345d..2063cec 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.compiled.css +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.compiled.css @@ -414,4 +414,4 @@ #stroke_style_label{font-size:30px;margin-top:33px;letter-spacing:-1px} .stroke_tool .caret{top:60%} #tool_align_relative{position:absolute;top:-5px;left:0;right:20px;display:block} -#tool_align_relative select{width:100%;display:block} \ No newline at end of file +#tool_align_relative select{width:100%;display:block} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.css b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.css index 6eb6e83..ef16f98 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.css +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/css/method-draw.css @@ -89,7 +89,7 @@ vertical-align: top; } -.touch .menu_title { +.touch .menu_title { padding: 7px 17px; height: 26px; line-height: 26px; @@ -167,7 +167,7 @@ .menu_list .menu_item.push_button_pressed { background: transparent; - border: none; + border: none; width: auto; height: auto; margin: 0; @@ -269,7 +269,7 @@ margin-top: -16px; } -#ruler_x > div, +#ruler_x > div, #ruler_y > div { overflow: hidden; } @@ -394,14 +394,14 @@ .touch #tool_switch { display: none; -} +} #use_panel .tool_button, #path_node_panel .tool_button { color: #999; border: solid #3F3F3C 1px; border-radius: 3px; padding: 3px 10px 3px 40px; - background: + background: transparent; position: relative; margin-top: 10px; @@ -476,7 +476,7 @@ position: absolute; top: 10px; width: 14px; - + } #color_tools #tool_switch { @@ -561,13 +561,13 @@ position: absolute; } -.tool_button, +.tool_button, .tool_button_current, .tool_button_pressed { cursor: pointer; } - .tool_button:hover, + .tool_button:hover, .push_button:hover, .buttonup:hover, .buttondown, @@ -630,17 +630,17 @@ color: #999; } -div#font-selector { - width:140px; - height:300px; - overflow:auto; - margin:0 auto; - position:absolute; +div#font-selector { + width:140px; + height:300px; + overflow:auto; + margin:0 auto; + position:absolute; top:27px; right:0; - border:1px solid black; - padding:10px; - display:none; + border:1px solid black; + padding:10px; + display:none; background-color:white; z-index: 10; border-radius: 3px; @@ -920,7 +920,7 @@ right: 50%; border: solid transparent 5px; border-bottom-color: #fff; - + } .dropdown li.special.down:after { @@ -929,13 +929,13 @@ top: auto; border: solid transparent 5px; border-top-color: #fff; - + } - .tool_button, + .tool_button, .push_button, .tool_button_current, - .push_button_pressed + .push_button_pressed { height: 27px; width: 27px; @@ -955,7 +955,7 @@ overflow: hidden; } -#tool_open input, +#tool_open input, #tool_import input, #tool_import_bitmap input { position: absolute; @@ -981,7 +981,7 @@ left: -9999px; } - #tool_bold span, #tool_italic span { + #tool_bold span, #tool_italic span { position: absolute; width: 100%; height: 100%; @@ -1465,7 +1465,7 @@ margin: 5px; border-radius: 0px; -moz-border-radius: 0px; - -webkit-border-radius: 0px; + -webkit-border-radius: 0px; border-width: 0; } @@ -1516,7 +1516,7 @@ } .contextMenu .shortcut { - width: 115px; + width: 115px; text-align:right; float:right; } @@ -1797,7 +1797,7 @@ } - #tool_bold, #tool_italic { + #tool_bold, #tool_italic { font: bold 20px/35px serif; text-align: center; position: absolute; @@ -1854,13 +1854,13 @@ } -.draginput input, .draginput input:hover, .draginput input:active { +.draginput input, .draginput input:hover, .draginput input:active { cursor: url(../images/drag.png), move; cursor: -webkit-grab; cursor: -moz-grab; } -.draginput input[type="checkbox"], .draginput input[type="checkbox"]:hover, .draginput input[type="checkbox"]:active { +.draginput input[type="checkbox"], .draginput input[type="checkbox"]:hover, .draginput input[type="checkbox"]:active { cursor: pointer; } @@ -1868,7 +1868,7 @@ cursor: pointer; } -.draginput.active input, .draginput.active input:hover, .draginput.active input:active { +.draginput.active input, .draginput.active input:hover, .draginput.active input:active { cursor: url(../images/dragging.png), move; cursor: -webkit-grabbing; cursor: -moz-grabbing; @@ -1908,7 +1908,7 @@ margin: 0; z-index: 1; top: 0; - left: 0; + left: 0; } @@ -2080,4 +2080,4 @@ #tool_align_relative select { width: 100%; display: block; -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/embedapi.html b/web/public/SVGOrigin/Method-Draw-master/method-draw/embedapi.html index 889af20..b170cce 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/embedapi.html +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/embedapi.html @@ -12,7 +12,7 @@ function init_embed() { var frame = document.getElementById('svgedit'); svgCanvas = new embedded_svg_edit(frame); - + // Hide main button, as we will be controlling new/load/save etc from the host document var doc; doc = frame.contentDocument; @@ -20,11 +20,11 @@ { doc = frame.contentWindow.document; } - + var mainButton = doc.getElementById('main_button'); - mainButton.style.display = 'none'; + mainButton.style.display = 'none'; } - + function handleSvgData(data, error) { if (error) { @@ -33,15 +33,15 @@ else { alert('Congratulations. Your SVG string is back in the host page, do with it what you will\n\n' + data); - } + } } - + function loadSvg() { var svgexample = '<svg width="640" height="480" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><g><title>Layer 1</title><rect stroke-width="5" stroke="#000000" fill="#FF0000" id="svg_1" height="35" width="51" y="35" x="32"/><ellipse ry="15" rx="24" stroke-width="5" stroke="#000000" fill="#0000ff" id="svg_2" cy="60" cx="66"/></g></svg>'; svgCanvas.setSvgString(svgexample); } - - function saveSvg() { + + function saveSvg() { svgCanvas.getSvgString()(handleSvgData); } </script> @@ -51,6 +51,6 @@ <button onclick="saveSvg();">Save data</button> <br/> - <iframe src="index.html" width="900px" height="600px" id="svgedit" onload="init_embed()"></iframe> + <iframe src="index.html" width="900px" height="600px" id="svgedit" onload="init_embed()"></iframe> </body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/closepath_icons.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/closepath_icons.svg index 7294f5e..b103a6e 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/closepath_icons.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/closepath_icons.svg @@ -38,4 +38,4 @@ </g> <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-arrows.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-arrows.js index 4f45192..3ba48c7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-arrows.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-arrows.js @@ -7,7 +7,7 @@ * */ - + methodDraw.addExtension("Arrows", function(S) { var svgcontent = S.svgcontent, addElem = S.addSvgElementFromJson, @@ -17,7 +17,7 @@ svgCanvas.bind('setnonce', setArrowNonce); svgCanvas.bind('unsetnonce', unsetArrowNonce); - + var lang_list = { "en":[ {"id": "arrow_none", "textContent": "No arrow" } @@ -26,7 +26,7 @@ {"id": "arrow_none", "textContent": "Sans fl猫che" } ] }; - + var prefix = 'se_arrow_'; if (randomize_ids) { var arrowprefix = prefix + nonce + '_'; @@ -38,7 +38,7 @@ fw: {d:"m0,0l10,5l-10,5l5,-5l-5,-5z", refx:8, id: arrowprefix + 'fw'}, bk: {d:"m10,0l-10,5l10,5l-5,-5l5,-5z", refx:2, id: arrowprefix + 'bk'} } - + function setArrowNonce(window, n) { randomize_ids = true; arrowprefix = prefix + n + '_'; @@ -62,17 +62,17 @@ } return S.getElem(m[1]); } - + function showPanel(on) { $('#arrow_panel').toggle(on); - + if(on) { var el = selElems[0]; var end = el.getAttribute("marker-end"); var start = el.getAttribute("marker-start"); var mid = el.getAttribute("marker-mid"); var val; - + if(end && start) { val = "both"; } else if(end) { @@ -85,30 +85,30 @@ val = "mid_bk"; } } - + if(!start && !mid && !end) { val = "none"; } - + $("#arrow_list").val(val); } } - + function resetMarker() { var el = selElems[0]; el.removeAttribute("marker-start"); el.removeAttribute("marker-mid"); el.removeAttribute("marker-end"); } - + function addMarker(dir, type, id) { // TODO: Make marker (or use?) per arrow type, since refX can be different id = id || arrowprefix + dir; - + var marker = S.getElem(id); var data = pathdata[dir]; - + if(type == "mid") { data.refx = 5; } @@ -136,21 +136,21 @@ }); marker.appendChild(arrow); S.findDefs().appendChild(marker); - } - + } + marker.setAttribute('refX', data.refx); - + return marker; } - + function setArrow() { var type = this.value; resetMarker(); - + if(type == "none") { return; } - + // Set marker on element var dir = "fw"; if(type == "mid_bk") { @@ -164,27 +164,27 @@ } else if (type == "start") { dir = "bk"; } - + addMarker(dir, type); svgCanvas.changeSelectedAttribute("marker-"+type, "url(#" + pathdata[dir].id + ")"); S.call("changed", selElems); } - + function colorChanged(elem) { var color = elem.getAttribute('stroke'); - + var mtypes = ['start','mid','end']; var defs = S.findDefs(); - + $.each(mtypes, function(i, type) { var marker = getLinked(elem, 'marker-'+type); if(!marker) return; - + var cur_color = $(marker).children().attr('fill'); var cur_d = $(marker).children().attr('d'); var new_marker = null; if(cur_color === color) return; - + var all_markers = $(defs).find('marker'); // Different color, check if already made all_markers.each(function() { @@ -194,19 +194,19 @@ new_marker = this; } }); - + if(!new_marker) { // Create a new marker with this color var last_id = marker.id; var dir = last_id.indexOf('_fw') !== -1?'fw':'bk'; - + new_marker = addMarker(dir, type, arrowprefix + dir + all_markers.length); $(new_marker).children().attr('fill', color); } - + $(elem).attr('marker-'+type, "url(#" + new_marker.id + ")"); - + // Check if last marker can be removed var remove = true; $(S.svgcontent).find('line, polyline, path, polygon').each(function() { @@ -218,16 +218,16 @@ }); if(!remove) return false; }); - + // Not found, so can safely remove if(remove) { $(marker).remove(); } }); - + } - + return { name: "Arrows", context_tools: [{ @@ -259,13 +259,13 @@ }; }, selectedChanged: function(opts) { - + // Use this to update the current selected elements selElems = opts.elems; - + var i = selElems.length; var marker_elems = ['line','path','polyline','polygon']; - + while(i--) { var elem = selElems[i]; if(elem && $.inArray(elem.tagName, marker_elems) != -1) { @@ -292,7 +292,7 @@ // Has marker, so see if it should match color colorChanged(elem); } - + } }; }); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-closepath.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-closepath.js index dc73f1a..98512ea 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-closepath.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-closepath.js @@ -26,12 +26,12 @@ if (path) updateButton(path); } }, - + toggleClosed = function() { var path = selElems[0]; if (path) { var seglist = path.pathSegList, - last = seglist.numberOfItems - 1; + last = seglist.numberOfItems - 1; // is closed if(seglist.getItem(last).pathSegType == 1) { seglist.removeItem(last); @@ -42,7 +42,7 @@ updateButton(path); } }; - + return { name: "ClosePath", svgicons: "extensions/closepath_icons.svg", @@ -74,7 +74,7 @@ selectedChanged: function(opts) { selElems = opts.elems; var i = selElems.length; - + while(i--) { var elem = selElems[i]; if(elem && elem.tagName == 'path') { diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-connector.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-connector.js index ffd54df..52f77eb 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-connector.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-connector.js @@ -6,7 +6,7 @@ * Copyright(c) 2010 Alexis Deveria * */ - + methodDraw.addExtension("Connector", function(S) { var svgcontent = S.svgcontent, svgroot = S.svgroot, @@ -26,9 +26,9 @@ se_ns, // connect_str = "-SE_CONNECT-", selElems = []; - + elData = $.data; - + var lang_list = { "en":[ {"id": "mode_connect", "title": "Connect two objects" } @@ -37,7 +37,7 @@ {"id": "mode_connect", "title": "Connecter deux objets"} ] }; - + function getOffset(side, line) { var give_offset = !!line.getAttribute('marker-' + side); // var give_offset = $(line).data(side+'_off'); @@ -46,16 +46,16 @@ var size = line.getAttribute('stroke-width') * 5; return give_offset ? size : 0; } - + function showPanel(on) { var conn_rules = $('#connector_rules'); if(!conn_rules.length) { conn_rules = $('<style id="connector_rules"><\/style>').appendTo('head'); - } + } conn_rules.text(!on?"":"#tool_clone, #tool_topath, #tool_angle, #xy_panel { display: none !important; }"); $('#connector_panel').toggle(on); } - + function setPoint(elem, pos, x, y, setMid) { var pts = elem.points; var pt = svgroot.createSVGPoint(); @@ -73,9 +73,9 @@ pt_arr[i] = x + ',' + y; } } - elem.setAttribute("points",pt_arr.join(" ")); + elem.setAttribute("points",pt_arr.join(" ")); } - + if(setMid) { // Add center point var pt_start = pts.getItem(0); @@ -83,7 +83,7 @@ setPoint(elem, 1, (pt_end.x + pt_start.x)/2, (pt_end.y + pt_start.y)/2); } } - + function updateLine(diff_x, diff_y) { // Update line with element var i = connections.length; @@ -91,34 +91,34 @@ var conn = connections[i]; var line = conn.connector; var elem = conn.elem; - + var pre = conn.is_start?'start':'end'; // var sw = line.getAttribute('stroke-width') * 5; - + // Update bbox for this element var bb = elData(line, pre+'_bb'); bb.x = conn.start_x + diff_x; bb.y = conn.start_y + diff_y; elData(line, pre+'_bb', bb); - + var alt_pre = conn.is_start?'end':'start'; - + // Get center pt of connected element var bb2 = elData(line, alt_pre+'_bb'); var src_x = bb2.x + bb2.width/2; var src_y = bb2.y + bb2.height/2; - + // Set point of element being moved var pt = getBBintersect(src_x, src_y, bb, getOffset(pre, line)); // $(line).data(pre+'_off')?sw:0 setPoint(line, conn.is_start?0:'end', pt.x, pt.y, true); - + // Set point of connected element var pt2 = getBBintersect(pt.x, pt.y, elData(line, alt_pre + '_bb'), getOffset(alt_pre, line)); setPoint(line, conn.is_start?'end':0, pt2.x, pt2.y, true); } } - + function findConnectors(elems) { if(!elems) elems = selElems; var connectors = $(svgcontent).find(conn_sel); @@ -128,7 +128,7 @@ connectors.each(function() { var start = elData(this, "c_start"); var end = elData(this, "c_end"); - + var parts = [getElem(start), getElem(end)]; for(var i=0; i<2; i++) { var c_elem = parts[i]; @@ -140,7 +140,7 @@ add_this = true; } }); - + if(!c_elem || !c_elem.parentNode) { $(this).remove(); continue; @@ -153,12 +153,12 @@ is_start: (i === 0), start_x: bb.x, start_y: bb.y - }); + }); } } }); } - + function updateConnectors(elems) { // Updates connector lines based on selected elements // Is not used on mousemove, as it runs getStrokedBBox every time, @@ -174,29 +174,29 @@ var sw = line.getAttribute('stroke-width') * 5; var pre = conn.is_start?'start':'end'; - + // Update bbox for this element var bb = svgCanvas.getStrokedBBox([elem]); bb.x = conn.start_x; bb.y = conn.start_y; elData(line, pre+'_bb', bb); var add_offset = elData(line, pre+'_off'); - + var alt_pre = conn.is_start?'end':'start'; - + // Get center pt of connected element var bb2 = elData(line, alt_pre+'_bb'); var src_x = bb2.x + bb2.width/2; var src_y = bb2.y + bb2.height/2; - + // Set point of element being moved var pt = getBBintersect(src_x, src_y, bb, getOffset(pre, line)); setPoint(line, conn.is_start?0:'end', pt.x, pt.y, true); - + // Set point of connected element var pt2 = getBBintersect(pt.x, pt.y, elData(line, alt_pre + '_bb'), getOffset(alt_pre, line)); setPoint(line, conn.is_start?'end':0, pt2.x, pt2.y, true); - + // Update points attribute manually for webkit if(navigator.userAgent.indexOf('AppleWebKit') != -1) { var pts = line.points; @@ -205,14 +205,14 @@ for(var j=0; j< len; j++) { var pt = pts.getItem(j); pt_arr[j] = pt.x + ',' + pt.y; - } - line.setAttribute("points",pt_arr.join(" ")); + } + line.setAttribute("points",pt_arr.join(" ")); } } } } - + function getBBintersect(x, y, bb, offset) { if(offset) { offset -= 0; @@ -222,54 +222,54 @@ bb.x -= offset/2; bb.y -= offset/2; } - + var mid_x = bb.x + bb.width/2; var mid_y = bb.y + bb.height/2; var len_x = x - mid_x; var len_y = y - mid_y; - + var slope = Math.abs(len_y/len_x); - + var ratio; - + if(slope < bb.height/bb.width) { ratio = (bb.width/2) / Math.abs(len_x); } else { ratio = (bb.height/2) / Math.abs(len_y); } - - + + return { x: mid_x + len_x * ratio, y: mid_y + len_y * ratio } } - + // Do once (function() { var gse = svgCanvas.groupSelectedElements; - + svgCanvas.groupSelectedElements = function() { svgCanvas.removeFromSelection($(conn_sel).toArray()); return gse.apply(this, arguments); } - + var mse = svgCanvas.moveSelectedElements; - + svgCanvas.moveSelectedElements = function() { svgCanvas.removeFromSelection($(conn_sel).toArray()); var cmd = mse.apply(this, arguments); updateConnectors(); return cmd; } - + se_ns = svgCanvas.getEditorNS(); }()); - + // Do on reset function init() { // Make sure all connectors have data set - $(svgcontent).find('*').each(function() { + $(svgcontent).find('*').each(function() { var conn = this.getAttributeNS(se_ns, "connector"); if(conn) { this.setAttribute('class', conn_sel.substr(1)); @@ -285,18 +285,18 @@ }); // updateConnectors(); } - + // $(svgroot).parent().mousemove(function(e) { -// // if(started +// // if(started // // || svgCanvas.getMode() != "connector" // // || e.target.parentNode.parentNode != svgcontent) return; -// +// // console.log('y') // // if(e.target.parentNode.parentNode === svgcontent) { -// // +// // // // } // }); - + return { name: "Connector", svgicons: "images/conn.svg", @@ -326,27 +326,27 @@ start_x = opts.start_x, start_y = opts.start_y; var mode = svgCanvas.getMode(); - + if(mode == "connector") { - + if(started) return; - + var mouse_target = e.target; - + var parents = $(mouse_target).parents(); - + if($.inArray(svgcontent, parents) != -1) { // Connectable element - + // If child of foreignObject, use parent var fo = $(mouse_target).closest("foreignObject"); start_elem = fo.length ? fo[0] : mouse_target; - + // Get center of source element var bb = svgCanvas.getStrokedBBox([start_elem]); var x = bb.x + bb.width/2; var y = bb.y + bb.height/2; - + started = true; cur_line = addElem({ "element": "polyline", @@ -374,27 +374,27 @@ var e = opts.event; var x = opts.mouse_x/zoom; var y = opts.mouse_y/zoom; - + var diff_x = x - start_x, diff_y = y - start_y; - + var mode = svgCanvas.getMode(); - + if(mode == "connector" && started) { - + var sw = cur_line.getAttribute('stroke-width') * 3; // Set start point (adjusts based on bb) var pt = getBBintersect(x, y, elData(cur_line, 'start_bb'), getOffset('start', cur_line)); start_x = pt.x; start_y = pt.y; - + setPoint(cur_line, 0, pt.x, pt.y, true); - + // Set end point setPoint(cur_line, 'end', x, y, true); } else if(mode == "select") { var slen = selElems.length; - + while(slen--) { var elem = selElems[slen]; // Look for selected connector elements @@ -408,9 +408,9 @@ if(connections.length) { updateLine(diff_x, diff_y); - + } - } + } }, mouseUp: function(opts) { var zoom = svgCanvas.getZoom(); @@ -418,11 +418,11 @@ x = opts.mouse_x/zoom, y = opts.mouse_y/zoom, mouse_target = e.target; - + if(svgCanvas.getMode() == "connector") { var fo = $(mouse_target).closest("foreignObject"); if(fo.length) mouse_target = fo[0]; - + var parents = $(mouse_target).parents(); if(mouse_target == start_elem) { @@ -432,7 +432,7 @@ keep: true, element: null, started: started - } + } } else if($.inArray(svgcontent, parents) === -1) { // Not a valid target element, so remove line $(cur_line).remove(); @@ -445,7 +445,7 @@ } else { // Valid end element end_elem = mouse_target; - + var start_id = start_elem.id, end_id = end_elem.id; var conn_str = start_id + " " + end_id; var alt_str = end_id + " " + start_id; @@ -462,9 +462,9 @@ started: false } } - + var bb = svgCanvas.getStrokedBBox([end_elem]); - + var pt = getBBintersect(start_x, start_y, bb, getOffset('start', cur_line)); setPoint(cur_line, 'end', pt.x, pt.y, true); $(cur_line) @@ -490,16 +490,16 @@ selectedChanged: function(opts) { // TODO: Find better way to skip operations if no connectors are in use if(!$(svgcontent).find(conn_sel).length) return; - + if(svgCanvas.getMode() == 'connector') { svgCanvas.setMode('select'); } - + // Use this to update the current selected elements selElems = opts.elems; - + var i = selElems.length; - + while(i--) { var elem = selElems[i]; if(elem && elData(elem, 'c_start')) { @@ -523,7 +523,7 @@ svgcontent = elem; init(); } - + // Has marker, so change offset if(elem && ( elem.getAttribute("marker-start") || @@ -537,16 +537,16 @@ $(elem) .data("start_off", !!start) .data("end_off", !!end); - + if(elem.tagName == "line" && mid) { // Convert to polyline to accept mid-arrow - + var x1 = elem.getAttribute('x1')-0; var x2 = elem.getAttribute('x2')-0; var y1 = elem.getAttribute('y1')-0; var y2 = elem.getAttribute('y2')-0; var id = elem.id; - + var mid_pt = (' '+((x1+x2)/2)+','+((y1+y2)/2) + ' '); var pline = addElem({ "element": "polyline", diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-eyedropper.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-eyedropper.js index 9ab7433..ae766d2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-eyedropper.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-eyedropper.js @@ -21,7 +21,7 @@ ChangeElementCommand = svgedit.history.ChangeElementCommand, addToHistory = function(cmd) { svgCanvas.undoMgr.addCommandToHistory(cmd); }, currentStyle = {fillPaint: "red", fillOpacity: 1.0, - strokePaint: "black", strokeOpacity: 1.0, + strokePaint: "black", strokeOpacity: 1.0, strokeWidth: 5, strokeDashArray: null, opacity: 1.0, strokeLinecap: 'butt', @@ -34,7 +34,7 @@ var tool = $('#tool_eyedropper'); } - + var getPaint = function(color, opac, type) { // update the editor's fill paint var opts = null; @@ -48,7 +48,7 @@ opts = { alpha: opac }; opts[refElem.tagName] = refElem; - } + } else if (color.indexOf("#") === 0) { opts = { alpha: opac, @@ -63,7 +63,7 @@ } return new $.jGraduate.Paint(opts); }; - + return { name: "eyedropper", svgicons: "extensions/eyedropper-icon.xml", @@ -80,7 +80,7 @@ } } }], - + mouseDown: function(opts) { var mode = svgCanvas.getMode(); var e = opts.event; @@ -132,4 +132,4 @@ } } }; -}); \ No newline at end of file +}); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-foreignobject.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-foreignobject.js index e5a04c8..58af5a8 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-foreignobject.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-foreignobject.js @@ -3,8 +3,8 @@ * * Licensed under the Apache License, Version 2 * - * Copyright(c) 2010 Jacques Distler - * Copyright(c) 2010 Alexis Deveria + * Copyright(c) 2010 Jacques Distler + * Copyright(c) 2010 Alexis Deveria * */ @@ -23,8 +23,8 @@ svgdoc = S.svgroot.parentNode.ownerDocument, started, newFO; - - + + var properlySourceSizeTextArea = function(){ // TODO: remove magic numbers here and get values from CSS var height = $('#svg_source_container').height() - 80; @@ -35,7 +35,7 @@ var fc_rules = $('#fc_rules'); if(!fc_rules.length) { fc_rules = $('<style id="fc_rules"><\/style>').appendTo('head'); - } + } fc_rules.text(!on?"":" #tool_topath { display: none !important; }"); $('#foreignObject_panel').toggle(on); } @@ -44,8 +44,8 @@ $('#tool_source_save, #tool_source_cancel').toggle(!on); $('#foreign_save, #foreign_cancel').toggle(on); } - - + + // Function: setForeignString(xmlString, elt) // This function sets the content of element elt to the input XML. // @@ -69,7 +69,7 @@ console.log(e); return false; } - + return true; }; @@ -86,13 +86,13 @@ properlySourceSizeTextArea(); $('#svg_source_textarea').focus(); } - + function setAttr(attr, val) { svgCanvas.changeSelectedAttribute(attr, val); S.call("changed", selElems); } - - + + return { name: "foreignObject", svgicons: "extensions/foreignobject-icons.xml", @@ -116,7 +116,7 @@ } } }], - + context_tools: [{ type: "input", panel: "foreignObject_panel", @@ -154,8 +154,8 @@ } } } - - + + ], callback: function() { $('#foreignObject_panel').hide(); @@ -168,12 +168,12 @@ } // TODO: Needs to be done after orig icon loads - setTimeout(function() { + setTimeout(function() { // Create source save/cancel buttons var save = $('#tool_source_save').clone() .hide().attr('id', 'foreign_save').unbind() .appendTo("#tool_source_back").click(function() { - + if (!editingforeign) return; if (!setForeignString($('#svg_source_textarea').val())) { @@ -184,20 +184,20 @@ } else { endChanges(); } - // setSelectMode(); + // setSelectMode(); }); - + var cancel = $('#tool_source_cancel').clone() .hide().attr('id', 'foreign_cancel').unbind() .appendTo("#tool_source_back").click(function() { endChanges(); }); - + }, 3000); }, mouseDown: function(opts) { var e = opts.event; - + if(svgCanvas.getMode() == "foreign") { started = true; @@ -245,14 +245,14 @@ } } - + }, selectedChanged: function(opts) { // Use this to update the current selected elements selElems = opts.elems; - + var i = selElems.length; - + while(i--) { var elem = selElems[i]; if(elem && elem.tagName == "foreignObject") { @@ -260,7 +260,7 @@ $('#foreign_font_size').val(elem.getAttribute("font-size")); $('#foreign_width').val(elem.getAttribute("width")); $('#foreign_height').val(elem.getAttribute("height")); - + showPanel(true); } else { showPanel(false); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-grid.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-grid.js index 76c95b5..26f716b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-grid.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-grid.js @@ -21,7 +21,7 @@ var svgCanvas = methodDraw.canvas; var showGrid = false; var assignAttributes = s.assignAttributes; - + var hcanvas = document.createElement('canvas'); $(hcanvas).hide().appendTo('body'); @@ -35,11 +35,11 @@ 'overflow': 'visible', 'display': 'none' }); - + var canvBG = $('#canvas_background'); canvBG.after(canvasgrid); - - + + // grid-pattern var gridPattern = svgdoc.createElementNS(svgns, "pattern"); @@ -51,7 +51,7 @@ 'width': 100, 'height': 100 }); - + var gridimg = svgdoc.createElementNS(svgns, "image"); assignAttributes(gridimg, { 'x': 0, @@ -59,7 +59,7 @@ 'width': 100, 'height': 100 }); - + gridPattern.appendChild(gridimg); $('#svgroot defs').append(gridPattern); @@ -81,25 +81,25 @@ function updateGrid(zoom) { // TODO: Try this with <line> elements, then compare performance difference - + var bgwidth = +canvBG.attr('width'); var bgheight = +canvBG.attr('height'); - + var units = svgedit.units.getTypeMap(); var unit = units[methodDraw.curConfig.baseUnit]; // 1 = 1px var r_intervals = [.01, .1, 1, 10, 100, 1000]; - + var d = 0; var is_x = (d === 0); var dim = is_x ? 'x' : 'y'; var lentype = is_x?'width':'height'; var c_elem = svgCanvas.getContentElem(); var content_d = c_elem.getAttribute(dim)-0; - + var hcanv = hcanvas; - + var u_multi = unit * zoom; - + // Calculate the main number interval var raw_m = 100 / u_multi; var multi = 1; @@ -110,7 +110,7 @@ break; } } - + var big_int = multi * u_multi; // Set the canvas size to the width of the container @@ -118,9 +118,9 @@ hcanv.height = big_int; var ctx = hcanv.getContext("2d"); - var ruler_d = 0; + var ruler_d = 0; var cur_d = .5; - + var part = big_int / 10; ctx.globalAlpha = 0.2; @@ -135,7 +135,7 @@ ctx.lineTo(line_num ,sub_d); } ctx.stroke(); - ctx.beginPath(); + ctx.beginPath(); ctx.globalAlpha = 0.5; ctx.moveTo(cur_d, big_int); ctx.lineTo(cur_d, 0); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-helloworld.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-helloworld.js index 419e9e2..f5705a1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-helloworld.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-helloworld.js @@ -6,13 +6,13 @@ * Copyright(c) 2010 Alexis Deveria * */ - -/* + +/* This is a very basic SVG-Edit extension. It adds a "Hello World" button in the left panel. Clicking on the button, and then the canvas will show the user the point on the canvas that was clicked on. */ - + methodDraw.addExtension("Hello World", function() { return { @@ -20,55 +20,55 @@ // For more notes on how to make an icon file, see the source of // the hellorworld-icon.xml svgicons: "extensions/helloworld-icon.xml", - + // Multiple buttons can be added in this array buttons: [{ // Must match the icon ID in helloworld-icon.xml - id: "hello_world", - + id: "hello_world", + // This indicates that the button will be added to the "mode" // button panel on the left side - type: "mode", - + type: "mode", + // Tooltip text - title: "Say 'Hello World'", - + title: "Say 'Hello World'", + // Events events: { 'click': function() { // The action taken when the button is clicked on. - // For "mode" buttons, any other button will + // For "mode" buttons, any other button will // automatically be de-pressed. svgCanvas.setMode("hello_world"); } } }], - // This is triggered when the main mouse button is pressed down + // This is triggered when the main mouse button is pressed down // on the editor canvas (not the tool panels) mouseDown: function() { // Check the mode on mousedown if(svgCanvas.getMode() == "hello_world") { - - // The returned object must include "started" with + + // The returned object must include "started" with // a value of true in order for mouseUp to be triggered return {started: true}; } }, - + // This is triggered from anywhere, but "started" must have been set // to true (see above). Note that "opts" is an object with event info mouseUp: function(opts) { // Check the mode on mouseup if(svgCanvas.getMode() == "hello_world") { var zoom = svgCanvas.getZoom(); - + // Get the actual coordinate by dividing by the zoom value var x = opts.mouse_x / zoom; var y = opts.mouse_y / zoom; - - var text = "Hello World!\n\nYou clicked here: " + + var text = "Hello World!\n\nYou clicked here: " + x + ", " + y; - + // Show the text using the custom alert function $.alert(text); } diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.js index d609574..542c2e2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.js @@ -10,7 +10,7 @@ methodDraw.addExtension("imagelib", function() { var uiStrings = methodDraw.uiStrings; - + $.extend(uiStrings, { imagelib: { select_lib: 'Select an image library', @@ -25,20 +25,20 @@ name: 'Demo library (local)', url: 'extensions/imagelib/index.html', description: 'Demonstration library for SVG-edit on this server' - }, + }, { name: 'IAN Symbol Libraries', url: 'http://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php', description: 'Free library of illustrations' } ]; - + var xlinkns = "http://www.w3.org/1999/xlink"; function closeBrowser() { $('#imgbrowse_holder').hide(); } - + function importImage(url) { var newImage = svgCanvas.addSvgElementFromJson({ "element": "image", @@ -61,26 +61,26 @@ var cur_meta; var tranfer_stopped = false; var pending = {}; - + window.addEventListener("message", function(evt) { // Receive postMessage data var response = evt.data; - + if(!response) { // Do nothing return; } - + var char1 = response.charAt(0); - + var svg_str; var img_str; - + if(char1 != "{" && tranfer_stopped) { tranfer_stopped = false; return; } - + if(char1 == '|') { var secondpos = response.indexOf('|', 1); var id = response.substr(1, secondpos-1); @@ -88,28 +88,28 @@ char1 = response.charAt(0); } - - + + // Hide possible transfer dialog box $('#dialog_box').hide(); - + switch (char1) { case '{': // Metadata tranfer_stopped = false; var cur_meta = JSON.parse(response); - + pending[cur_meta.id] = cur_meta; - + var name = (cur_meta.name || 'file'); - + var message = uiStrings.notification.retrieving.replace('%s', name); - + if(mode != 'm') { $.process_cancel(message, function() { tranfer_stopped = true; // Should a message be sent back to the frame? - + $('#dialog_box').hide(); }); } else { @@ -117,7 +117,7 @@ preview.append(entry); cur_meta.entry = entry; } - + return; case '<': svg_str = true; @@ -137,10 +137,10 @@ default: // TODO: See if there's a way to base64 encode the binary data stream // var str = 'data:;base64,' + svgCanvas.Utils.encode64(response, true); - + // Assume it's raw image data // importImage(str); - + // Don't give warning as postMessage may have been used by something else if(mode !== 'm') { closeBrowser(); @@ -156,7 +156,7 @@ // }); return; } - + switch (mode) { case 's': // Import one @@ -203,7 +203,7 @@ } else { var entry = '<img src="' + response + '">'; } - + if(cur_meta) { preview.children().each(function() { if($(this).data('id') == id) { @@ -231,11 +231,11 @@ break; } }, true); - + var preview, submit; function toggleMulti(show) { - + $('#lib_framewrap, #imglib_opts').css({right: (show ? 200 : 10)}); if(!preview) { preview = $('<div id=imglib_preview>').css({ @@ -247,7 +247,7 @@ background: '#fff', overflow: 'auto' }).insertAfter('#lib_framewrap'); - + submit = $('<button disabled>Import selected</button>').appendTo('#imgbrowse').click(function() { $.each(multi_arr, function(i) { var type = this[0]; @@ -269,7 +269,7 @@ }); } - + preview.toggle(show); submit.toggle(show); } @@ -286,14 +286,14 @@ var lib_opts = $('<ul id=imglib_opts>').appendTo(browser); var frame = $('<iframe/>').prependTo(browser).hide().wrap('<div id=lib_framewrap>'); - + var header = $('<h1>').prependTo(browser).text(all_libs).css({ position: 'absolute', top: 0, left: 0, width: '100%' }); - + var cancel = $('<button>' + uiStrings.common.cancel + '</button>').appendTo(browser).click(function() { $('#imgbrowse_holder').hide(); }).css({ @@ -301,9 +301,9 @@ top: 5, right: -10 }); - + var leftBlock = $('<span>').css({position:'absolute',top:5,left:10}).appendTo(browser); - + var back = $('<button hidden>' + uiStrings.imagelib.show_list + '</button>').appendTo(leftBlock).click(function() { frame.attr('src', 'about:blank').hide(); lib_opts.show(); @@ -312,8 +312,8 @@ }).css({ 'margin-right': 5 }).hide(); - - var type = $('<select><option value=s>' + + + var type = $('<select><option value=s>' + uiStrings.imagelib.import_single + '</option><option value=m>' + uiStrings.imagelib.import_multi + '</option><option value=o>' + uiStrings.imagelib.open + '</option></select>').appendTo(leftBlock).change(function() { @@ -323,7 +323,7 @@ case 'o': toggleMulti(false); break; - + case 'm': // Import multiple toggleMulti(true); @@ -331,10 +331,10 @@ }).css({ 'margin-top': 10 }); - + cancel.prepend($.getSvgIcon('cancel', true)); back.prepend($.getSvgIcon('tool_imagelib', true)); - + $.each(img_libs, function(i, opts) { $('<li>').appendTo(lib_opts).text(opts.name).click(function() { frame.attr('src', opts.url).show(); @@ -343,12 +343,12 @@ back.show(); }).append('<span>' + opts.description + '</span>'); }); - + } else { $('#imgbrowse_holder').show(); } } - + return { buttons: [{ id: "tool_imagelib", @@ -361,7 +361,7 @@ } }], callback: function() { - + $('<style>').text('\ #imgbrowse_holder {\ position: absolute;\ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.xml index 42f9509..97129f4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-imagelib.xml @@ -11,4 +11,4 @@ </g> </svg> </g> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-markers.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-markers.js index 4024203..1b3d9e1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-markers.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-markers.js @@ -3,26 +3,26 @@ * * Licensed under the Apache License, Version 2 * - * Copyright(c) 2010 Will Schleter + * Copyright(c) 2010 Will Schleter * based on ext-arrows.js by Copyright(c) 2010 Alexis Deveria * * This extension provides for the addition of markers to the either end - * or the middle of a line, polyline, path, polygon. - * + * or the middle of a line, polyline, path, polygon. + * * Markers may be either a graphic or arbitary text - * + * * to simplify the coding and make the implementation as robust as possible, * markers are not shared - every object has its own set of markers. * this relationship is maintained by a naming convention between the * ids of the markers and the ids of the object - * + * * The following restrictions exist for simplicty of use and programming * objects and their markers to have the same color * marker size is fixed * text marker font, size, and attributes are fixed * an application specific attribute - se_type - is added to each marker element * to store the type of marker - * + * * TODO: * remove some of the restrictions above * add option for keeping text aligned to horizontal @@ -39,15 +39,15 @@ var marker_prefix = 'se_marker_'; var id_prefix = 'mkr_'; - + // note - to add additional marker types add them below with a unique id // and add the associated icon(s) to marker-icons.svg // the geometry is normallized to a 100x100 box with the origin at lower left // Safari did not like negative values for low left of viewBox // remember that the coordinate system has +y downward var marker_types = { - nomarker: {}, - leftarrow: + nomarker: {}, + leftarrow: {element:'path', attr:{d:'M0,50 L100,90 L70,50 L100,10 Z'}}, rightarrow: {element:'path', attr:{d:'M100,50 L0,90 L30,50 L0,10 Z'}}, @@ -71,8 +71,8 @@ mcircle: {element:'circle', attr:{r:30, cx:50, cy:50}} } - - + + var lang_list = { "en":[ {id: "start_marker_list", title: "Select start marker type" }, @@ -104,7 +104,7 @@ $.each(['leftarrow','rightarrow','box','star','mcircle','triangle'],function(i,v) { marker_types[v+'_o'] = marker_types[v]; }); - + // elem = a graphic element will have an attribute like marker-start // attr - marker-start, marker-mid, or marker-end // returns the marker element that is linked to the graphic element @@ -149,24 +149,24 @@ txtbox.hide() // hide text box } } - txtbox.val(val); + txtbox.val(val); setIcon(pos,ci); }) } - } + } function addMarker(id, val) { var txt_box_bg = '#ffffff'; var txt_box_border = 'none'; var txt_box_stroke_width = 0; - + var marker = S.getElem(id); if (marker) return; if (val=='' || val=='\\nomarker') return; - var el = selElems[0]; + var el = selElems[0]; var color = el.getAttribute('stroke'); //NOTE: Safari didn't like a negative value in viewBox //so we use a standardized 0 0 100 100 @@ -181,7 +181,7 @@ else se_type='textmarker'; if (!marker_types[se_type]) return; // an unknown type! - + // create a generic marker marker = addElem({ "element": "marker", @@ -239,7 +239,7 @@ marker.setAttribute("orient",0); marker.appendChild(box); marker.appendChild(text); - } + } marker.setAttribute("viewBox",viewBox); marker.setAttribute("markerWidth", markerWidth); @@ -305,11 +305,11 @@ var m = elem.getAttribute(nam); if (m) pline.setAttribute(nam,elem.getAttribute(nam)); }); - + var batchCmd = new S.BatchCommand(); batchCmd.addSubCommand(new S.RemoveElementCommand(elem, elem.parentNode)); batchCmd.addSubCommand(new S.InsertElementCommand(pline)); - + $(elem).after(pline).remove(); svgCanvas.clearSelection(); pline.id = id; @@ -367,14 +367,14 @@ //if (val.substr(0,1)=='\\') txtbox.hide(); //else txtbox.show(); } - + function setIcon(pos,id) { if (id.substr(0,1)!='\\') id='\\textmarker' var ci = '#'+id_prefix+pos+'_'+id.substr(1); methodDraw.setIcon('#cur_' + pos +'_marker_list', $(ci).children()); $(ci).addClass('current').siblings().removeClass('current'); } - + function setMarkerSet(obj) { var parts = this.id.split('_'); var set = parts[2]; @@ -396,28 +396,28 @@ break; } } - + function showTextPrompt(pos) { var def = $('#'+pos+'_marker').val(); if (def.substr(0,1)=='\\') def=''; $.prompt('Enter text for ' + pos + ' marker', def , function(txt) { if (txt) triggerTextEntry(pos,txt); }); } - + // callback function for a toolbar button click function setArrowFromButton(obj) { - + var parts = this.id.split('_'); var pos = parts[1]; var val = parts[2]; if (parts[3]) val+='_'+parts[3]; - + if (val!='textmarker') { triggerTextEntry(pos,'\\'+val); } else { showTextPrompt(pos); } } - + function getTitle(lang,id) { var list = lang_list[lang]; for (var i in list) { @@ -425,8 +425,8 @@ } return id; } - - + + // build the toolbar button array from the marker definitions // TODO: need to incorporate language specific titles function buildButtonList() { @@ -530,7 +530,7 @@ } ], callback: function() { $('#marker_panel').addClass('toolset').hide(); - + }, addLangData: function(lang) { return { data: lang_list[lang] }; @@ -558,7 +558,7 @@ } }, - elementChanged: function(opts) { + elementChanged: function(opts) { //console.log('elementChanged',opts); var elem = opts.elems[0]; if(elem && ( diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_moinsave.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_moinsave.js index dac0c28..c075edf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_moinsave.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_moinsave.js @@ -14,10 +14,10 @@ callback: function() { var save_svg_action = '/+modify'; - + // Create upload target (hidden iframe) var target = $('<iframe name="output_frame" src="#"/>').hide().appendTo('body'); - + methodDraw.setCustomHandlers({ save: function(win, data) { var svg = "<?xml version=\"1.0\"?>\n" + data; @@ -50,7 +50,7 @@ top.window.location = '/'+name; }, }); - + } }); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_opensave.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_opensave.js index 140e920..5e4dddf 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_opensave.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-server_opensave.js @@ -12,17 +12,17 @@ //var save_svg_action = 'extensions/filesave.php'; //var save_png_action = 'extensions/filesave.php'; - + // Create upload target (hidden iframe) var target = $('<iframe name="output_frame" />').hide().appendTo('body'); - + //methodDraw.setCustomHandlers({ // save: function(win, data) { // var svg = "<?xml version=\"1.0\"?>\n" + data; - // + // // var title = svgCanvas.getDocumentTitle(); // var filename = title.replace(/[^a-z0-9\.\_\-]+/gi, '_'); - // + // // var form = $('<form>').attr({ // method: 'post', // action: save_svg_action, @@ -34,33 +34,33 @@ // }, // pngsave: function(win, data) { // var issues = data.issues; - // + // // if(!$('#export_canvas').length) { // $('<canvas>', {id: 'export_canvas'}).hide().appendTo('body'); // } // var c = $('#export_canvas')[0]; - // + // // c.width = svgCanvas.contentW; // c.height = svgCanvas.contentH; // canvg(c, data.svg, {renderCallback: function() { // var datauri = c.toDataURL('image/png'); - // + // // var uiStrings = methodDraw.uiStrings; // var note = ''; - // + // // // Check if there's issues // if(issues.length) { // var pre = "\n \u2022 "; // note += ("\n\n" + pre + issues.join(pre)); - // } - // + // } + // // if(note.length) { // alert(note); // } - // + // // var title = svgCanvas.getDocumentTitle(); // var filename = title.replace(/[^a-z0-9\.\_\-]+/gi, '_'); - // + // // var form = $('<form>').attr({ // method: 'post', // action: save_png_action, @@ -71,33 +71,33 @@ // .submit().remove(); // }}); // - // + // // } //}); - + // Do nothing if client support is found if(window.FileReader) return; - + var cancelled = false; - + // Change these to appropriate script file var open_svg_action = 'extensions/fileopen.php?type=load_svg'; var import_svg_action = 'extensions/fileopen.php?type=import_svg'; var import_img_action = 'extensions/fileopen.php?type=import_img'; - + // Set up function for PHP uploader to use methodDraw.processFile = function(str64, type) { if(cancelled) { cancelled = false; return; } - + $('#dialog_box').hide(); - + if(type != 'import_img') { var xmlstr = svgCanvas.Utils.decode64(str64); } - + switch ( type ) { case 'load_svg': svgCanvas.clear(); @@ -106,14 +106,14 @@ break; case 'import_svg': svgCanvas.importSvgString(xmlstr); - methodDraw.updateCanvas(); + methodDraw.updateCanvas(); break; case 'import_img': svgCanvas.setGoodImage(str64); break; } } - + // Create upload form var open_svg_form = $('<form>'); open_svg_form.attr({ @@ -122,31 +122,31 @@ action: open_svg_action, target: 'output_frame' }); - + // Create import form var import_svg_form = open_svg_form.clone().attr('action', import_svg_action); - + // Create image form var import_img_form = open_svg_form.clone().attr('action', import_img_action); - - // It appears necessory to rebuild this input every time a file is + + // It appears necessory to rebuild this input every time a file is // selected so the same file can be picked and the change event can fire. function rebuildInput(form) { form.empty(); var inp = $('<input type="file" name="svg_file">').appendTo(form); - - + + function submit() { // This submits the form, which returns the file data using methodDraw.uploadSVG form.submit(); - + rebuildInput(form); $.process_cancel("Uploading...", function() { cancelled = true; $('#dialog_box').hide(); }); } - + if(form[0] == open_svg_form[0]) { inp.change(function() { // This takes care of the "are you sure" dialog box @@ -165,7 +165,7 @@ }); } } - + // Create the input elements rebuildInput(open_svg_form); rebuildInput(import_svg_form); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.js index c01f3ef..f134898 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.js @@ -9,7 +9,7 @@ */ methodDraw.addExtension("shapes", function() { - + var current_d, cur_shape_id; var canv = methodDraw.canvas; @@ -17,7 +17,7 @@ var start_x, start_y; var svgroot = canv.getRootElem(); var lastBBox = {}; - + // This populates the category list var categories = { basic: 'Basic', @@ -33,7 +33,7 @@ ui: 'User Interface', social: 'Social Web' }; - + var library = { 'basic': { data: { @@ -61,28 +61,28 @@ "divide": "m150,0.99785l0,0c25.17819,0 45.58916,20.41097 45.58916,45.58916c0,25.17821 -20.41096,45.58916 -45.58916,45.58916c-25.17822,0 -45.58916,-20.41093 -45.58916,-45.58916c0,-25.1782 20.41093,-45.58916 45.58916,-45.58916zm0,296.25203c-25.17822,0 -45.58916,-20.41095 -45.58916,-45.58917c0,-25.17819 20.41093,-45.58916 45.58916,-45.58916c25.17819,0 45.58916,20.41096 45.58916,45.58916c0,25.17822 -20.41096,45.58917 -45.58916,45.58917zm-134.06754,-193.71518l268.13507,0l0,91.17833l-268.13507,0z", "minus": "m0.99887,102.39503l297.49445,0l0,95.2112l-297.49445,0z", "times": "m1.00089,73.36786l72.36697,-72.36697l76.87431,76.87368l76.87431,-76.87368l72.36765,72.36697l-76.87433,76.87431l76.87433,76.87431l-72.36765,72.36765l-76.87431,-76.87433l-76.87431,76.87433l-72.36697,-72.36765l76.87368,-76.87431l-76.87368,-76.87431z" - + }, buttons: [] } }; - + var cur_lib = library.basic; - + var mode_id = 'shapelib'; - + function loadIcons() { $('#shape_buttons').empty(); - + // Show lib ones $('#shape_buttons').append(cur_lib.buttons); } - + function loadLibrary(cat_id) { - + var lib = library[cat_id]; - + if(!lib) { $('#shape_buttons').html('Loading...'); $.getJSON('extensions/shapelib/' + cat_id + '.json', function(result, textStatus) { @@ -96,19 +96,19 @@ }); return; } - + cur_lib = lib; if(!lib.buttons.length) makeButtons(cat_id, lib); loadIcons(); } - + function makeButtons(cat, shapes) { var size = cur_lib.size || 300; var fill = cur_lib.fill || false; var off = size * .05; var vb = [-off, -off, size + off*2, size + off*2].join(' '); var stroke = fill ? 0: (size/30); - + var shape_icon = new DOMParser().parseFromString( '<svg xmlns="http://www.w3.org/2000/svg"><svg viewBox="' + vb + '"><path fill="#333" stroke="transparent" stroke-width="' + stroke + '" /><\/svg><\/svg>', 'text/xml'); @@ -118,29 +118,29 @@ shape_icon.documentElement.setAttribute('width', width); shape_icon.documentElement.setAttribute('height', height); var svg_elem = $(document.importNode(shape_icon.documentElement,true)); - + var data = shapes.data; - + cur_lib.buttons = []; - + for(var id in data) { var path_d = data[id]; var icon = svg_elem.clone(); icon.find('path').attr('d', path_d); - + var icon_btn = icon.wrap('<div class="tool_button">').parent().attr({ id: mode_id + '_' + id, title: id }); - - + + // Store for later use cur_lib.buttons.push(icon_btn[0]); } - + } - + return { svgicons: "extensions/ext-shapes.xml", buttons: [{ @@ -157,21 +157,21 @@ }], callback: function() { - + var btn_div = $('<div id="shape_buttons">'); $('#tools_shapelib > *').wrapAll(btn_div); - + var shower = $('#tools_shapelib_show'); - + loadLibrary('basic'); - + // Do mouseup on parent element rather than each button $('#shape_buttons').mouseup(function(evt) { var btn = $(evt.target).closest('div.tool_button'); - + if(!btn.length) return; - + var copy = btn.children().clone().attr({width: 24, height: 24}); shower.children(':not(.flyout_arrow_horiz)').remove(); shower @@ -179,56 +179,56 @@ .attr('data-curopt', '#' + btn[0].id) // This sets the current mode .mouseup(); canv.setMode(mode_id); - + cur_shape_id = btn[0].id.substr((mode_id+'_').length); current_d = cur_lib.data[cur_shape_id]; - + $('.tools_flyout').fadeOut(); }); -// +// var shape_cats = $('<div id="shape_cats">'); var cat_str = ''; - + $.each(categories, function(id, label) { cat_str += '<div data-cat=' + id + '>' + label + '</div>'; }); - + shape_cats.html(cat_str).children().bind('mouseup', function() { var catlink = $(this); catlink.siblings().removeClass('current'); catlink.addClass('current'); - + loadLibrary(catlink.attr('data-cat')); // Get stuff - + return false; }); - + shape_cats.children().eq(0).addClass('current'); - + $('#tools_shapelib').prepend(shape_cats); shower.mouseup(function() { canv.setMode(current_d ? mode_id : 'select'); }); - + $('#tool_shapelib').remove(); - + var h = $('#tools_shapelib').height(); $('#tools_shapelib').css({ 'margin-top': -(h/2), 'margin-left': 3 }); - + }, mouseDown: function(opts) { var mode = canv.getMode(); if(mode !== mode_id) return; - + var e = opts.event; var x = start_x = opts.start_x; var y = start_y = opts.start_y; @@ -250,8 +250,8 @@ cur_shape.setAttribute('d', current_d); canv.pathActions.fixEnd(cur_shape); } - - cur_shape.setAttribute('transform', "translate(" + x + "," + y + ") scale(0.005) translate(" + -x + "," + -y + ")"); + + cur_shape.setAttribute('transform', "translate(" + x + "," + y + ") scale(0.005) translate(" + -x + "," + -y + ")"); // console.time('b'); canv.recalculateDimensions(cur_shape); var tlist = canv.getTransformList(cur_shape); @@ -268,15 +268,15 @@ mouseMove: function(opts) { var mode = canv.getMode(); if(mode !== mode_id) return; - + var zoom = canv.getZoom(); var evt = opts.event - + var x = opts.mouse_x/zoom; var y = opts.mouse_y/zoom; - + var tlist = canv.getTransformList(cur_shape), - box = cur_shape.getBBox(), + box = cur_shape.getBBox(), left = box.x, top = box.y, width = box.width, height = box.height; var dx = (x-start_x), dy = (y-start_y); @@ -290,27 +290,27 @@ var ts = null, tx = 0, ty = 0, - sy = height ? (height+dy)/height : 1, + sy = height ? (height+dy)/height : 1, sx = width ? (width+dx)/width : 1; var sx = newbox.width / lastBBox.width; var sy = newbox.height / lastBBox.height; - + sx = sx || 1; sy = sy || 1; - + // Not perfect, but mostly works... - + if(x < start_x) { tx = lastBBox.width; } if(y < start_y) ty = lastBBox.height; - + // update the transform list with translate,scale,translate var translateOrigin = svgroot.createSVGTransform(), scale = svgroot.createSVGTransform(), translateBack = svgroot.createSVGTransform(); - + translateOrigin.setTranslate(-(left+tx), -(top+ty)); if(evt.shiftKey) { replaced = true @@ -339,7 +339,7 @@ mouseUp: function(opts) { var mode = canv.getMode(); if(mode !== mode_id) return; - + if(opts.mouse_x == start_x && opts.mouse_y == start_y) { return { keep: false, @@ -353,6 +353,6 @@ element: cur_shape, started: false } - } + } } }); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.xml index 129cb54..6294273 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/ext-shapes.xml @@ -5,4 +5,4 @@ l3.445-6.979l3.447,6.98l7.702,1.121l-5.573,5.434L20.328,24.166z"/> </svg> </g> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/eyedropper-icon.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/eyedropper-icon.xml index 0133ea7..4939d83 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/eyedropper-icon.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/eyedropper-icon.xml @@ -12,6 +12,6 @@ l-2.5,2.482l0.167,0.166c0.46,0.457,0.46,1.197,0,1.655l-1.5,1.489c-0.46,0.456-1.207,0.456-1.667,0l-0.333-0.332L7.708,22.809l-0.223,0.037c-1.787,0.296-3.805,1.978-3.826,1.995l-0.496,0.417L2.702,24.801z"/> </svg> </g> - + <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/fileopen.php b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/fileopen.php index 8aad827..7b44a5c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/fileopen.php +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/fileopen.php @@ -11,15 +11,15 @@ */ // Very minimal PHP file, all we do is Base64 encode the uploaded file and // return it to the editor - + $file = $_FILES['svg_file']['tmp_name']; - + $output = file_get_contents($file); - + $type = $_REQUEST['type']; - + $prefix = ''; - + // Make Data URL prefix for import image if($type == 'import_img') { $info = getimagesize($file); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/filesave.php b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/filesave.php index 9f1d009..26a5ea7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/filesave.php +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/filesave.php @@ -8,7 +8,7 @@ * Copyright(c) 2010 Alexis Deveria * */ - + if(!isset($_POST['output_svg']) && !isset($_POST['output_png'])) { die('post fail'); } @@ -38,7 +38,7 @@ header("Content-Disposition: attachment; filename=" . $file); header("Content-Type: " . $mime); header("Content-Transfer-Encoding: binary"); - + echo $contents; - -?> \ No newline at end of file + +?> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/foreignobject-icons.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/foreignobject-icons.xml index 8001aee..d8919f0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/foreignobject-icons.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/foreignobject-icons.xml @@ -31,7 +31,7 @@ </g> </svg> </g> - + <g id="edit_foreign"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="34 38 170 170" overflow="hidden"> <g fill="#000088"> @@ -91,6 +91,6 @@ </g> </svg> </g> - + <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/grid-icon.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/grid-icon.xml index 68c1421..0d6f1e1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/grid-icon.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/grid-icon.xml @@ -1,10 +1,10 @@ <svg xmlns="http://www.w3.org/2000/svg"> -<!-- +<!-- Sample icons file. This file looks like an SVG file with groups as its children. Each group element has an ID that must match the ID of the button given in the extension. The SVG inside the group makes up the actual icon, and needs use a viewBox instead of width/height for it to scale properly. - + Multiple icons can be included, each within their own group. --> <g id="view_grid"> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/helloworld-icon.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/helloworld-icon.xml index f08bd1f..e43a1d1 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/helloworld-icon.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/helloworld-icon.xml @@ -1,10 +1,10 @@ <svg xmlns="http://www.w3.org/2000/svg"> -<!-- +<!-- Sample icons file. This file looks like an SVG file with groups as its children. Each group element has an ID that must match the ID of the button given in the extension. The SVG inside the group makes up the actual icon, and needs use a viewBox instead of width/height for it to scale properly. - + Multiple icons can be included, each within their own group. --> <g id="hello_world"> @@ -18,4 +18,4 @@ </g> </svg> </g> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/index.html b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/index.html index 7cc4d36..9e8f363 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/index.html +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/index.html @@ -15,7 +15,7 @@ $('a').click(function() { var href = this.href; var target = window.parent; - // Convert Non-SVG images to data URL first + // Convert Non-SVG images to data URL first // (this could also have been done server-side by the library) if(this.href.indexOf('.svg') === -1) { @@ -24,7 +24,7 @@ id: href }); target.postMessage(meta_str, "*"); - + var img = new Image(); img.onload = function() { var canvas = document.createElement("canvas"); @@ -55,7 +55,7 @@ data = '|' + href + '|' + data; // This is where the magic happens! target.postMessage(data, "*"); - + }, 'html'); // 'html' is necessary to keep returned data as a string } return false; diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/smiley.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/smiley.svg index 21a798d..048a1f6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/smiley.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/imagelib/smiley.svg @@ -9,4 +9,4 @@ <stop stop-color="#ffff00" offset="1"/> </linearGradient> </defs> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/markers-icons.xml b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/markers-icons.xml index 9fe5ad4..4dcad98 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/markers-icons.xml +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/markers-icons.xml @@ -87,7 +87,7 @@ </g> <g id="textmarker"> <svg viewBox="-60 -60 120 120" xmlns="http://www.w3.org/2000/svg"> - <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="120" y="40" x="0" stroke-width="0" stroke="#ff7f00" fill="#ff7f00">T</text> + <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="120" y="40" x="0" stroke-width="0" stroke="#ff7f00" fill="#ff7f00">T</text> </svg> </g> <g id="mkr_markers_off"> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/arrow.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/arrow.json index 4296fc7..74fbe7b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/arrow.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/arrow.json @@ -33,8 +33,8 @@ "u_turn": "m1.00059,299.00055l0,-167.62497l0,0c0,-72.00411 58.37087,-130.37499 130.375,-130.37499l0,0l0,0c34.57759,0 67.73898,13.7359 92.18906,38.18595c24.45006,24.45005 38.18593,57.61144 38.18593,92.18904l0,18.625l37.24997,0l-74.49995,74.50002l-74.50002,-74.50002l37.25,0l0,-18.625c0,-30.8589 -25.0161,-55.87498 -55.87498,-55.87498l0,0l0,0c-30.85892,0 -55.875,25.01608 -55.875,55.87498l0,167.62497z", "up": "m1.49805,149.64304l148.50121,-148.00241l148.50121,148.00241l-74.25061,0l0,148.71457l-148.5012,0l0,-148.71457z", "3_ways": "m1,159.61292l52.87097,-52.87097l0,26.43549l69.69355,0l0,-79.30646l-26.43549,0l52.87096,-52.87097l52.87097,52.87097l-26.43549,0l0,79.30646l69.69356,0l0,-26.43549l52.87096,52.87097l-52.87096,52.87097l0,-26.43549l-192.25807,0l0,26.43549l-52.87097,-52.87097z", - + "maximize_2": "m1,149.99998l67.05,-67.05l0,33.52501l48.425,0l0,-48.425l-33.52501,0l67.05,-67.05l67.04999,67.05l-33.52499,0l0,48.425l48.42502,0l0,-33.52501l67.04997,67.05l-67.04997,67.04999l0,-33.52499l-48.42502,0l0,48.42502l33.52499,0l-67.04999,67.04997l-67.05,-67.04997l33.52501,0l0,-48.42502l-48.425,0l0,33.52499l-67.05,-67.04999z", "raph_download": "m149.92238,36.82233c-65.72484,0 -119.00005,53.27818 -119.00005,119c0,65.72183 53.27521,119 119.00005,119c65.7218,0 118.99995,-53.27817 118.99995,-119c0,-65.72182 -53.27815,-119 -118.99995,-119zm0,223.73889c-12.68407,0 -22.97548,-10.28841 -22.97548,-22.97537s10.28215,-22.97583 22.97548,-22.97583c12.69009,0 22.97223,10.28247 22.97223,22.97583s-10.28214,22.97537 -22.97223,22.97537zm0,-63.08578l-64.34113,-53.72815l28.40379,0l0,-71.87465l71.88103,0l0,71.87465l28.39413,0l-64.33783,53.72815z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/dialog_balloon.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/dialog_balloon.json index 8600e4e..8a95f67 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/dialog_balloon.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/dialog_balloon.json @@ -11,4 +11,4 @@ "raph_talkq": "m151.95413,37.83469c-77.87229,0 -140.99913,47.34782 -140.99913,105.75328c0,19.94707 7.46298,38.60376 20.30468,54.52449l-20.30468,44.51276l56.5302,-14.49918c23.55888,13.25453 52.74399,21.2072 84.46893,21.2072c77.87204,0 141.00085,-47.3481 141.00085,-105.74527s-63.12881,-105.75328 -141.00085,-105.75328zm8.74214,165.54159l-19.83006,0l0,-19.02583l19.83006,0l0,19.02583zm-0.96628,-33.04105l-17.89746,0l-1.77126,-81.41087l21.28053,0l-1.61182,81.41087z", "raph_talke": "m151.46997,37.82469c-78.14881,0 -141.49997,47.50852 -141.49997,106.12126c0,20.02579 7.4895,38.74088 20.37584,54.71835l-20.37584,44.67868l56.73113,-14.55873c23.6405,13.30168 52.9314,21.29042 84.76884,21.29042c78.149,0 141.50003,-47.51628 141.50003,-106.12872s-63.35103,-106.12126 -141.50003,-106.12126zm9.92621,166.12944l-19.90253,0l0,-19.09268l19.90253,0l0,19.09268zm0,-39.48112l0,6.31543l-19.90253,0l0,-7.77286c0,-23.45735 26.69424,-27.17406 26.69424,-43.83023c0,-7.60336 -6.79172,-13.43297 -15.69612,-13.43297c-9.21872,0 -17.31352,6.79367 -17.31352,6.79367l-11.32195,-14.0807c0,0 11.15999,-11.65153 30.41292,-11.65153c18.29469,0 35.27467,11.32766 35.27467,30.41285c0.0097,26.71156 -28.14772,29.78053 -28.14772,47.24634z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/flowchart.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/flowchart.json index 335e17b..ca878f3 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/flowchart.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/flowchart.json @@ -17,4 +17,4 @@ "punched_tape": "m1.00047,30.80047l0,0c0,16.45808 33.35479,29.8 74.50001,29.8c41.1452,0 74.49998,-13.34192 74.49998,-29.8l0,0c0,-16.45809 33.3548,-29.8 74.50002,-29.8c41.14522,0 74.49998,13.34192 74.49998,29.8l0,238.4c0,-16.45808 -33.35477,-29.80002 -74.49998,-29.80002c-41.14522,0 -74.50002,13.34193 -74.50002,29.80002c0,16.45807 -33.35478,29.79999 -74.49998,29.79999c-41.14522,0 -74.50001,-13.34192 -74.50001,-29.79999z", "wave": "m1,37.20809c99.33355,-125.42461 198.66708,125.4246 298.00061,0l0,225.76426c-99.33353,125.42462 -198.66706,-125.42459 -298.00061,0z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/game.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/game.json index ebad41f..62cd1f4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/game.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/game.json @@ -10,4 +10,4 @@ "chess_queen": "m59.54884,298.46313c-11.18457,2.51251 -19.80814,-14.30008 -5.94004,-16.129c12.20336,0.23074 -3.0349,-11.94995 7.98012,-16.05304c12.67021,-12.36537 25.23749,-25.26018 33.3575,-41.17609c-4.09126,-5.42482 -10.84344,-10.60782 -9.96117,-18.03085c7.964,-2.71161 19.82806,-0.87375 20.29981,-13.44502c7.24239,-22.68985 9.1741,-46.67986 10.76167,-70.3136c-7.99255,-6.33596 -24.45116,-0.33371 -35.62089,-3.56097c-16.94488,-4.5746 6.31873,-13.33291 13.78075,-12.6113c6.70493,0.01006 16.63324,-4.12222 5.41084,-7.2804c9.46686,-0.43687 23.08297,-12.44518 7.51486,-16.77373c11.54188,-8.28655 2.64816,-26.31929 -2.17102,-36.68976c-7.265,-12.52285 -19.21146,-21.59242 -32.71435,-26.42871c-2.18616,-12.77 18.63421,-8.99565 27.07909,-9.65835c12.78728,0.48775 25.82639,-0.15282 36.96732,-7.11507c15.05278,-6.96464 27.8495,4.65901 41.61934,7.11611c13.92807,0.89699 28.41634,-2.50577 41.97807,1.44028c4.20209,2.98911 11.18788,7.71034 2.77457,9.97613c-16.06789,8.94404 -31.07338,22.15693 -35.10127,40.92605c-6.0766,10.44077 4.6955,19.50048 -5.15381,26.98807c-0.10249,8.80961 22.85634,10.04067 10.00395,14.37878c8.80815,4.77542 27.69864,1.76332 29.62625,12.3696c-7.99612,6.2903 -19.2092,3.80788 -28.79007,4.39512c-3.2489,1.10706 -11.41316,-2.70125 -10.17032,2.89742c-0.6366,25.08775 5.87923,49.75521 12.1806,73.83221c0.00804,11.79608 29.09497,5.10777 12.92737,18.49597c-11.94247,10.28146 5.56685,24.68452 11.63272,33.82986c8.25099,10.03221 22.89711,15.11021 21.67468,29.8362c8.40468,0.60507 18.40166,13.69095 6.78131,16.95151c-62.8902,1.31946 -125.82766,2.22778 -188.72791,1.83258z", "chess_rock": "m70.40736,299.11804c-15.60727,2.87628 -15.90823,-19.81082 -1.8931,-20.53482c-4.2011,-9.73361 -0.98556,-21.67557 5.22356,-30.68398c8.90442,-15.05035 22.29623,-30.00999 19.52936,-48.8515c-0.95786,-9.8022 -13.10349,-27.37677 5.72565,-24.85997c5.09087,-9.77498 2.13017,-24.16621 5.9483,-35.39389c3.33424,-21.28385 10.75552,-43.9948 2.86147,-65.09612c-4.97705,-11.23243 -17.62387,-18.62589 -16.26645,-32.35733c-1.42947,-13.39034 -0.95647,-26.88279 0.60455,-40.23392c6.07738,0.50975 12.84039,-1.27954 18.38155,1.475c-0.04153,12.96106 12.26991,10.08973 10.7935,-0.92486c3.23881,-1.28251 8.60017,-0.18413 12.6562,-0.55014c18.03256,0 36.06522,0 54.09778,0c-2.06311,7.51434 3.5195,17.19948 10.5887,8.35272c-1.93379,-11.75267 14.25911,-7.86334 10.37854,2.24694c0.22855,13.39515 1.87041,27.25403 -1.89201,40.29753c-6.12787,5.2086 -6.22449,15.45995 -13.90137,21.60233c-6.16908,11.51656 -3.45045,25.43306 -2.7644,37.9428c2.61279,18.51363 6.92676,36.79671 8.00221,55.52328c-0.76923,10.18126 20.18948,7.18474 11.15244,19.71645c-9.87662,8.41151 -4.0954,22.61668 -0.18413,32.66171c7.71916,17.36203 23.99019,32.95758 21.5343,53.32025c-1.94743,8.89606 14.16618,5.88821 9.97758,17.34372c-0.12151,14.11871 -21.10172,5.04239 -30.39526,8.00793c-46.7146,0.56656 -93.44374,1.44144 -140.159,0.99585z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/math.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/math.json index 156cdd9..5577b90 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/math.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/math.json @@ -5,4 +5,4 @@ "times": "m1.00089,73.36786l72.36697,-72.36697l76.87431,76.87368l76.87431,-76.87368l72.36765,72.36697l-76.87433,76.87431l76.87433,76.87431l-72.36765,72.36765l-76.87431,-76.87433l-76.87431,76.87433l-72.36697,-72.36765l76.87368,-76.87431l-76.87368,-76.87431z", "plus": "m1.00211,102.40185l101.39974,0l0,-101.39975l95.45412,0l0,101.39975l101.3997,0l0,95.45412l-101.3997,0l0,101.3997l-95.45412,0l0,-101.3997l-101.39974,0z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/misc.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/misc.json index 9f0dd3d..2277c39 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/misc.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/misc.json @@ -1,6 +1,6 @@ {"data": { - + } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/music.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/music.json index 0d10878..74e60d5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/music.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/music.json @@ -18,4 +18,4 @@ "note_half": "m126.15042,298.46863c-16.82465,-2.00256 -23.94094,-21.72537 -20.50175,-36.48892c5.91676,-23.32147 29.06407,-39.43811 52.28738,-42.05833c8.81128,-0.72736 18.52644,-0.60411 25.78337,4.94891c5.95566,-2.36537 1.76544,-11.69408 2.85246,-17.2854c0,-68.81003 0,-137.6201 0,-206.43012c14.97716,-2.18183 5.30603,19.02521 7.94768,27.71113c-0.09924,75.95386 0.62134,151.91534 -0.76007,227.86198c-7.30341,28.38443 -39.39244,46.36703 -67.60907,41.74075zm2.8452,-12.40747c22.98492,-7.3089 44.37535,-22.56259 55.31068,-44.49013c0.95541,-13.55527 -16.00528,-10.73553 -23.6718,-6.15868c-13.5024,6.76553 -26.21068,15.65268 -36.74068,26.51123c-6.99238,6.4256 -15.89267,26.17618 0.78696,25.05563l2.30408,-0.3252l2.01074,-0.59286l0,0z", "note_whole": "m130.51953,195.65829c-18.47874,-2.9818 -38.13104,-9.41365 -49.81914,-24.96915c-4.87284,-6.5025 -6.85786,-14.78229 -6.23731,-22.81049c-0.81288,-10.41815 5.23877,-19.78279 13.11027,-26.04227c15.71593,-12.69998 36.4436,-17.12403 56.18739,-18.21444c21.01479,-0.84168 42.85126,2.6237 61.20964,13.32044c11.19275,6.86285 21.10484,18.66567 20.54733,32.45548c0.612,8.09668 -0.91914,16.68852 -6.59294,22.84065c-11.24144,13.63681 -28.92738,19.59387 -45.72455,22.87505c-14.06622,2.54445 -28.55254,2.69426 -42.68069,0.54472zm34.33258,-7.95905c9.06644,-1.9348 15.01314,-11.03741 14.88672,-20.03276c1.54852,-18.89767 -4.73529,-39.56404 -20.09192,-51.52234c-8.61502,-6.06224 -20.8895,-6.65757 -30.00668,-1.42353c-6.79661,4.10276 -9.33514,12.23845 -9.31819,19.7824c-0.73656,16.04378 3.97748,32.8201 14.66045,45.0217c7.49542,7.87076 19.3475,12.08484 29.86963,8.17453z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/nature.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/nature.json index 799643e..23087c6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/nature.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/nature.json @@ -19,18 +19,18 @@ "shark": "M 0.0576 184.3533 C -1 180.6667 16.109 171.9119 28.5757 164.4365 C 38.4736 158.5251 49.2812 151.3596 59.5749 145.0374 C 68.1791 139.7532 87.1667 130.8333 89.3069 125.0559 C 91.8073 118.3062 96.2785 105.8677 101.081 96.5857 C 104.7343 89.4927 111.6667 80.1667 115.4351 80.0032 C 116.8965 79.9398 118.1484 83.3223 118.1484 83.3223 C 118.1484 83.3223 122.1099 105.8601 130.8815 116.7246 C 134.3825 121.0713 144.5294 120.8968 148.261 120.6279 C 173.1667 118.8333 205.8755 122.4387 205.8755 122.4387 C 205.8755 122.4387 216.5042 115.1404 218.2813 114.3643 C 222.787 112.4434 218.2767 117.0532 229.4009 125.4153 C 235.5 130 238.8499 128.6677 243.6637 127.1807 C 245.6044 126.5642 246.7613 124.552 248.3672 123.3879 C 250.4222 121.9041 291.7726 94.0098 295.9696 92.7549 C 300.1667 91.5 299.9836 99.5272 299.2917 101.4797 C 291.6667 123 270.9678 137.8057 270.9678 137.8057 C 270.9678 137.8057 269.3696 140.9553 270.0887 144.2822 C 270.7395 147.3027 281.8333 169.5 276.0176 168.1533 C 273.6004 168.4127 267.6419 165.6692 267.6419 165.6692 C 267.6419 165.6692 261.6635 162.3462 257.3862 157.6331 C 254.3608 154.2813 252.5989 149.0752 252.5989 149.0752 C 252.5989 149.0752 251.2239 144.8431 247.1571 143.6204 C 237.3333 140.6667 229.9983 144.0425 227.4753 146.9565 C 225.3138 149.4482 226.6418 153.6443 226.6418 153.6443 C 226.6418 153.6443 229.6977 156.9539 227.8292 157.125 C 219.7236 157.823 215.9372 151.9265 210.3013 148.6626 C 208.3377 147.5349 205.3333 145.6667 200.2473 149.5073 C 197.6903 151.4382 195.8333 161.3333 191.8562 164.625 C 189.1771 166.8424 184.8923 164.2864 184.8923 164.2864 C 184.8923 164.2864 178.3735 162.0303 173.7651 161.9048 C 152.75 172.25 114.5828 181.7512 114.5828 181.7512 C 114.5828 181.7512 119.6706 187.7639 122.3383 191.9104 C 123.6625 193.978 123.6093 195.7603 123.6093 195.7603 C 123.6093 195.7603 124.9374 198.5923 122.1708 198.9861 C 120.5306 199.2144 104.5744 196.5801 96.0502 193.2532 C 88.873 190.4495 83.203 186.3447 83.203 186.3447 C 83.203 186.3447 57.0849 188.4819 40.3333 189.1667 C 30.5761 189.551 1.5102 189.4165 0.0576 184.3533 Z", "dolphin": "M151.054, 51.526c-5.487, 2.029-10.494, 4.734-15.541, 7.145c-1.72, 0.821-3.674, 2.126-5.268, 2.525c-4.062, 1.013-10.418-0.759-15.596-0.944c-12.942-0.459-21.321, 0.493-31.96, 2.097c-4.979, 0.749-10.134, 1.451-14.504, 2.732c-3.733, 1.095-8.013, 3.542-12.19, 5.6c-6.601, 3.253-11.097, 6.316-16.244, 10.238 c-8.603, 6.551-14.019, 14.798-20.314, 23.859c-2.749, 3.955-6.708, 9.848-6.905, 14.528c-3.639, 5.515-9.168, 8.882-10.555, 16.955c1.939, 4.721, 6.964, 0.523, 9.992-1.049c2.504-1.304, 5.198-2.862, 7.417-3.487c11.533-3.251, 27.605, 1.396, 38.834-1.583c3.98-1.055, 7.428-3.185, 11.382-4.087c3.755-0.859, 6.627, 0.662, 9.304, 1.818c1.422, 0.616, 2.92, 1.45, 4.212, 2.113 c8.366, 4.323, 16.728, 8.906, 27.96, 10.632c9.015, 1.383, 16.847-1.256, 24.175-2.682c1.86-0.363, 4.263-0.231, 5.674-1.819 c-5.849-1.321-10.703-3.574-16.811-5.979c-8.023-3.156-14.255-5.291-17.287-11.627c3.591-0.94, 7.75-0.243, 11.488, 0.412 c4.082, 0.712, 8.133, 1.381, 12.05, 2.025c16.539, 2.723, 28.995, 7.294, 41.585, 13.224c6.116, 2.877, 11.752, 6.886, 16.936, 10.251 c10.617, 6.9, 19.68, 15.468, 28.228, 24.802c3.869, 4.226, 7.325, 9.518, 11.521, 14.562c1.834, 2.205, 3.678, 4.665, 5.638, 7.388 c1.873, 2.587, 4.731, 5.758, 5.127, 8.021c0.446, 2.499-0.881, 5.239-1.549, 7.97c-1.155, 4.744-2.007, 9.833-1.62, 14.704 c0.506, 6.3, 1.914, 12.436, 4.866, 17.209c1.281-1.139, 1.804-3.144, 2.464-4.98c3.236-4.136, 7.541-8.267, 7.648-15.15 c8.839, 4.568, 26.008, 4.185, 36.316, 4.066c3.099-0.036, 6.256, 0.292, 8.823-0.913c-5.414-3.138-9.388-7.109-14.094-11.163c-7.12-6.125-13.009-11.285-23.505-14.562c-3.402-1.062-7.297-1.637-9.161-3.605c-1.433-1.506-1.869-4.842-2.596-8.055 c-1.955-8.687-4.497-17.904-6.765-25.215c-6.806-21.976-17.194-41.507-31.015-56.675c-7.004-7.692-15.368-13.956-24.386-20.921 c-1.541-2.416-4.428-5.675-5.024-9.359c-0.61-3.793, 0.49-7.122, 2.834-9.67c5.128-3.742, 13.185-4.156, 16.669-9.757 c-4.555-3.279-10.207-4.24-15.753-4.776C171.573, 47.185, 160.348, 48.085, 151.054, 51.526z", "he_hen": "m176.04681,296.29803c-8.82596,-3.77927 -18.43298,1.74493 -27.86224,-3.75964c7.62581,-0.4744 19.08463,-0.03574 17.06104,-11.34488c3.33665,-13.20654 -3.43475,-27.06163 2.20258,-38.55534c-8.82878,-8.42361 -18.09561,-18.39673 -22.80272,-30.16238c-0.9447,4.74663 -1.81537,8.52257 -3.158,0.33916c-0.76965,-4.00471 -0.30261,9.89931 -3.24527,0.14346c-3.10373,-8.67493 -11.4597,-31.29446 -14.05236,-10.31462c-1.0768,10.8262 -4.45592,3.14465 -6.0004,-3.72562c-1.56924,-13.22943 -7.23737,-25.48523 -8.72193,-38.68883c5.80227,-8.36407 -0.82715,-9.5029 -3.91098,-1.15848c-3.39584,13.23767 -6.30494,26.33923 -2.7624,39.9769c-4.70789,3.85124 -13.79493,-17.92216 -9.61541,-26.27414c3.62592,-9.45018 2.81974,-19.09607 3.42313,-25.48878c3.31529,-7.21146 -3.22571,-15.04807 0.25123,-22.73853c-8.88477,9.68631 -16.83011,16.38615 -14.33428,31.58234c-1.10283,3.79079 3.703,25.58844 0.64231,17.56184c-5.77861,-15.66916 -5.78305,-33.02271 -1.43442,-49.01125c0.00535,-12.20366 -9.89253,21.0744 -9.16187,4.76299c-0.93676,-12.30159 4.13303,-25.82869 8.93452,-35.55499c-5.46675,-6.50523 -23.17289,-1.89566 -14.79648,-15.70558c8.24343,-7.01884 7.35999,-16.67057 -3.85936,-8.18394c-17.3246,12.72424 -31.69814,29.07174 -47.58007,43.52234c15.25898,-19.61487 32.46107,-38.59572 53.7519,-51.75492c20.64337,-12.99951 50.5769,-14.34346 68.38963,4.28573c4.53072,7.97979 15.06177,13.26968 17.57275,20.45337c-1.84586,10.76744 5.10652,16.10654 5.85289,25.57021c4.38731,7.30244 -3.95828,20.43125 8.52597,16.64671c14.20137,-0.01996 33.63664,-3.16645 34.74754,-20.87874c5.66772,-25.50935 8.27689,-54.0092 26.4256,-74.31131c10.08655,-5.89642 3.82147,-4.32716 -3.54926,-5.29837c-6.51613,-7.58361 6.57724,-19.75743 13.02319,-21.14511c-1.112,-17.9227 10.53479,10.74471 13.86426,-2.41437c4.99586,0.09501 7.43144,12.08141 10.46855,2.29789c9.05719,7.66376 18.6297,19.25661 6.66562,29.92943c13.61102,6.52517 -13.86911,2.29947 -2.14532,12.29652c9.6759,9.35194 2.83621,26.62759 -5.10654,34.15639c-0.3085,5.66077 9.31277,13.88494 11.24728,20.75249c9.99454,19.34809 11.9986,42.36646 8.16797,63.56847c-5.39346,19.98318 -25.46588,28.67906 -39.65833,41.37386c-12.12337,9.93893 -7.85776,27.37115 -13.59781,40.42342c0.57072,7.5369 4.77751,16.1196 10.7547,20.66925c8.66214,4.84064 18.81006,7.96561 25.81393,15.05286c-6.39667,3.34055 -19.43893,-10.21753 -19.56508,0.39017c-9.50252,-12.34393 -23.7677,-4.06104 -34.21234,-13.55405c8.69193,1.65643 19.99033,0.8027 10.47188,-9.61145c-3.75841,-8.80696 -15.07852,-11.84618 -15.37883,-22.49022c-10.66643,6.69647 -17.92447,15.81358 -25.66988,24.90395c-12.85808,-0.80322 -13.41248,25.11618 0.47165,24.73163c5.7019,1.45825 27.10161,9.40335 10.25006,7.35107c-5.02289,-0.89746 -10.47203,-4.04099 -10.31842,1.85727c-2.30338,-0.41431 -4.35982,-1.56003 -6.48019,-2.47418z", - "hen": "m131.70792,299.20142c-2.65045,-8.04401 -50.59061,2.01245 -25.50379,-8.40613c9.71836,-2.24731 29.67359,0.57056 9.8335,-5.50568c22.5928,7.62228 32.60569,-19.08859 34.06422,-37.09636c-21.02885,-6.55212 -24.67069,-31.02429 -46.83106,-37.61485c-16.88445,-13.23645 -41.63732,-12.83168 -52.35418,-33.24014c-10.17476,-18.17259 -4.4284,-40.29292 -2.74405,-59.92338c4.00956,-20.72375 12.14967,-41.69897 10.53991,-62.75727c-16.41068,9.44812 -22.4106,-11.67328 -22.78485,-18.27062c-12.07958,3.08904 -19.7317,3.22594 -6.59584,-7.5194c5.87008,-8.14037 8.78346,-25.92081 18.16113,-23.25189c2.47408,-10.763 9.04029,4.89351 16.30021,-4.61621c4.44867,3.35889 13.85731,7.10325 3.42817,13.02555c18.83147,9.50194 34.07959,23.95835 41.92437,42.43233c7.86127,18.77559 23.52317,39.06593 48.8149,33.98585c22.90038,3.93186 49.73083,-9.80992 48.68822,-32.86776c0.44391,-16.33654 16.52325,-54.48924 38.19395,-35.09801c16.24046,6.22802 34.92778,21.65468 31.09642,39.16159c-2.21887,18.0508 -0.50452,36.25767 1.60162,54.45551c-13.60181,10.0825 -11.15982,27.59631 -20.65894,40.7838c7.8804,18.56862 0.29095,38.62871 -12.60841,53.70848c-12.90314,13.89935 -31.76248,26.24356 -52.66508,24.4381c-7.98578,13.29396 9.42929,24.99069 15.57339,25.73553c-16.01053,-5.1321 -13.75549,4.70874 -8.47672,15.2244c4.94576,19.6875 -10.58037,-17.53909 -20.60904,0.27255c-7.77597,7.68976 -38.86531,10.29276 -13.69539,1.07587c21.48048,-7.96875 -24.12099,-12.95142 -13.99879,5.00586c3.34996,7.49203 22.77361,10.79092 2.32814,7.93628c-9.02753,-4.74515 -13.85625,12.10397 -21.02202,8.92599zm43.09088,-34.62769c7.8596,-9.56569 10.12141,-37.24054 -6.87671,-17.06372c-13.43553,10.88889 -18.29311,29.6301 6.87671,17.06372z", + "hen": "m131.70792,299.20142c-2.65045,-8.04401 -50.59061,2.01245 -25.50379,-8.40613c9.71836,-2.24731 29.67359,0.57056 9.8335,-5.50568c22.5928,7.62228 32.60569,-19.08859 34.06422,-37.09636c-21.02885,-6.55212 -24.67069,-31.02429 -46.83106,-37.61485c-16.88445,-13.23645 -41.63732,-12.83168 -52.35418,-33.24014c-10.17476,-18.17259 -4.4284,-40.29292 -2.74405,-59.92338c4.00956,-20.72375 12.14967,-41.69897 10.53991,-62.75727c-16.41068,9.44812 -22.4106,-11.67328 -22.78485,-18.27062c-12.07958,3.08904 -19.7317,3.22594 -6.59584,-7.5194c5.87008,-8.14037 8.78346,-25.92081 18.16113,-23.25189c2.47408,-10.763 9.04029,4.89351 16.30021,-4.61621c4.44867,3.35889 13.85731,7.10325 3.42817,13.02555c18.83147,9.50194 34.07959,23.95835 41.92437,42.43233c7.86127,18.77559 23.52317,39.06593 48.8149,33.98585c22.90038,3.93186 49.73083,-9.80992 48.68822,-32.86776c0.44391,-16.33654 16.52325,-54.48924 38.19395,-35.09801c16.24046,6.22802 34.92778,21.65468 31.09642,39.16159c-2.21887,18.0508 -0.50452,36.25767 1.60162,54.45551c-13.60181,10.0825 -11.15982,27.59631 -20.65894,40.7838c7.8804,18.56862 0.29095,38.62871 -12.60841,53.70848c-12.90314,13.89935 -31.76248,26.24356 -52.66508,24.4381c-7.98578,13.29396 9.42929,24.99069 15.57339,25.73553c-16.01053,-5.1321 -13.75549,4.70874 -8.47672,15.2244c4.94576,19.6875 -10.58037,-17.53909 -20.60904,0.27255c-7.77597,7.68976 -38.86531,10.29276 -13.69539,1.07587c21.48048,-7.96875 -24.12099,-12.95142 -13.99879,5.00586c3.34996,7.49203 22.77361,10.79092 2.32814,7.93628c-9.02753,-4.74515 -13.85625,12.10397 -21.02202,8.92599zm43.09088,-34.62769c7.8596,-9.56569 10.12141,-37.24054 -6.87671,-17.06372c-13.43553,10.88889 -18.29311,29.6301 6.87671,17.06372z", "mythic_unicorn_2": "m182.0204,297.85391c-5.77818,-7.90314 -14.7635,-8.80438 -16.9241,-20.05347c-1.69348,-6.11859 -17.65829,-14.32483 -8.20955,-3.3428c7.2961,6.61768 15.96432,31.02682 -1.98563,23.31473c-13.65228,-5.01041 -14.2377,-20.48209 -17.89716,-32.06519c-11.90031,-8.25644 3.07674,-25.71408 -9.73651,-36.29276c-10.87482,-11.04288 -3.30119,-31.72456 -18.8404,-39.55457c-7.79965,-3.16566 -11.1757,18.69177 -12.48895,2.70163c-4.27309,-16.17242 -19.36451,7.86156 -29.42789,5.31358c-8.12057,-0.70595 13.58361,-6.35143 3.22626,-7.87068c-6.08933,3.33348 -11.72343,9.09727 -12.68681,-0.44351c-7.3251,-4.35046 -22.68599,-11.29797 -22.28696,-18.20909c6.3611,-1.99829 27.83545,3.78387 24.11403,-4.25029c-6.38573,-2.42343 -7.54573,-9.04803 0.27553,-4.60205c15.41352,0.48352 33.48255,-5.66917 46.30758,6.09853c6.68958,4.11612 13.26701,18.87857 16.84827,4.53223c11.5443,-13.92389 34.83883,-15.10329 41.95536,-33.13124c1.72211,-8.72215 -5.28903,-13.69839 -11.24521,-15.46512c-1.15878,-2.86641 -3.13139,-15.03612 -8.05675,-8.8949c0.22449,-5.37502 4.84473,-18.22859 -5.38927,-12.53831c-1.03801,-11.44846 8.74879,-22.87025 -4.19783,-31.20716c12.13029,2.25027 9.73825,-11.57887 7.09616,-13.77212c7.19073,-1.02106 15.62939,-7.49186 11.66467,-15.50808c7.80894,14.17675 8.07971,-17.19902 14.50877,-3.67512c11.83272,1.93988 -3.67599,-10.57163 7.20721,-7.77902c6.21443,0.21264 4.83423,-6.80917 10.41692,-1.50957c7.3886,-4.03149 -5.66409,-16.21531 6.26559,-7.74985c4.01033,3.484 16.77809,12.60911 14.48726,0.56772c11.33586,12.0923 20.25659,-11.23169 29.67625,-16.06186c3.73633,-4.47003 11.8613,-9.20071 4.36795,-0.66791c-4.97461,10.87669 -21.85179,22.64296 -17.31131,33.45053c-4.10985,3.74163 8.29224,8.44421 -1.58034,7.02768c-5.8488,6.31351 7.84134,18.1257 8.93388,28.06219c-3.13588,6.80826 -15.07657,14.53744 -19.90688,14.29315c1.76543,-8.76564 -2.06178,-20.19066 -13.24036,-15.23595c6.26202,11.45789 14.72818,22.40379 20.03253,34.86404c5.18462,12.24902 13.59059,26.39416 24.64981,10.62966c7.04883,-10.04763 27.18559,-9.90218 21.65419,6.41521c-2.82767,16.0232 4.74286,37.1706 -9.80374,48.20794c-8.77531,16.90973 -18.50392,-6.2874 -11.60965,-15.06308c-1.75673,-2.50781 -3.11575,-4.27809 2.02489,-7.7061c-1.06146,-2.57137 14.7939,-12.24554 6.80286,-18.18176c-9.0885,10.30594 -22.38708,22.23511 -18.69125,37.55475c2.99957,10.26601 -21.73944,27.86615 -19.76117,10.82875c0.44312,-6.62131 9.89648,-19.45415 7.72044,-21.10741c-6.90181,12.95006 -16.71997,25.39136 -31.55621,29.23625c-12.34084,0.73132 -18.80547,10.66779 -12.94504,21.69241c1.11998,15.62238 -7.12646,29.76141 -9.02499,44.972c3.52914,16.13283 25.01552,19.39287 27.93198,35.84959c5.01138,11.05234 -7.52405,9.41898 -13.36446,6.32639zm-30.55545,-48.12944c-1.80891,-7.29253 -5.53151,18.95699 -0.94273,5.02481l0.68695,-2.46143l0.25578,-2.56339z", - + "rhino":"M 31.2973 189.1916 C 30.374 186.1509 30.2876 182.8892 30.2876 182.8892 C 30.2876 182.8892 18.6488 172.7592 12.9338 167.0182 C 8.1162 162.1747 0.1206 148.2926 0.1206 148.2926 C 0.1206 148.2926 -0.3045 144.7842 0.4415 144.6859 C 1.6515 144.5302 7.9245 150.0048 14.0462 153.201 C 20.3518 156.4936 27.5875 158.6592 27.5875 158.6592 L 35.5018 158.6592 C 35.5018 158.6592 29.0012 141.5758 37.34 143.8147 C 40.3528 144.0688 42.0178 150.5315 46.6067 151.2422 C 51.9836 149.9209 54.6313 134.4272 54.6313 134.4272 C 54.6313 134.4272 52.9961 131.5424 53.0697 128.803 C 53.129 126.9918 54.9114 124.9244 54.9114 124.9244 C 54.9114 124.9244 51.1096 125.5576 48.5035 124.7196 C 46.155 123.9635 42.5672 121.0233 41.6173 118.8496 C 40.4416 116.1589 40.7466 113.1821 39.4977 111.4715 C 39.3738 110.1291 41.1021 109.6715 42.02 110.3015 C 45.4753 112.6733 50.0547 112.9256 51.043 113.4111 C 55.1783 115.443 62.1528 115.7264 63.1698 115.3193 C 54.0175 103.9211 65.6289 101.5547 67.2467 101.3131 C 69.2713 103.514 72.3221 106.16 73.1967 108.5642 C 74.3559 110.0273 74.2616 107.9475 74.2616 107.9475 C 74.2616 107.9475 74.3209 101.8131 76.9637 97.2195 C 77.5729 96.1479 80.9405 92.7265 83.1856 92.4271 C 83.9995 92.3186 85.7254 92.0741 87.5618 90.4255 C 92.2537 86.2132 105.0561 86.9177 105.0561 86.9177 C 105.0561 86.9177 106.0924 87.3971 108.0301 87.3889 C 109.7409 87.3788 139.8456 85.6026 152.1574 90.03 C 160.433 93.0059 175.2345 92.1159 193.0635 87.0243 C 198.6909 85.4173 214.9442 85 214.9442 85 C 214.9442 85 221.0913 85.3409 226.0806 87.0274 C 233.8591 89.6567 248.6718 88.6388 257.7491 89.6018 C 261.2524 89.9747 267.9599 93.2576 273.5101 96.3221 C 290.9601 105.9565 301.1294 127.5316 299.8999 134.8799 C 297.5037 149.2014 283.2316 173.735 276.9266 184.5226 C 274.3758 188.8869 273.0623 195.5137 273.6205 200.5527 C 273.7831 202.0202 271.6895 205.6906 267.7195 208.1928 C 262.1246 211.7193 266.3419 216.8904 266.8591 219.2671 C 267.3741 221.6376 267.2024 224.6782 265.6837 225.3544 C 264.1713 226.0263 242.5547 229.81 241.9206 224.7663 C 238.7548 219.072 254.3001 210.4229 252.5226 200.3702 C 247.4359 193.6818 246.2545 178.7816 245.4402 176.4947 C 244.5885 166.2041 227.9237 182.3253 219.5206 185.6245 C 195.3696 195.1066 168.116 190.8322 165.9726 190.0358 C 163.0314 198.9738 166.1362 203.3924 166.3365 204.4804 C 165.6754 210.5755 172.1837 220.3454 173.6375 226.3336 C 174.8277 231.1329 154.4893 231.1329 148.9116 230.9416 C 144.3201 229.7082 151.2226 220.7226 152.3475 219.7199 C 153.8791 212.0003 145.337 205.08 145.337 205.08 C 145.337 205.08 144.7269 212.0003 143.029 217.8104 C 143.0998 220.549 145.8231 222.5392 146.2197 224.9814 C 146.6408 227.5896 144.6581 227.9297 144.6581 227.9297 C 144.6581 227.9297 129.0663 230.7259 125.1382 227.4769 C 123.1681 226.8586 121.4508 227.8662 120.0711 226.7946 C 119.1125 226.0447 120.6945 221.7545 121.8821 220.5681 C 122.8979 219.5479 129.6764 219.3277 129.7289 211.1167 C 128.0493 196.5313 114.2192 190.4252 113.1891 184.7516 C 106.4906 187.3721 99.4475 182.4468 99.4475 182.4468 C 99.4475 182.4468 97.6059 184.5796 95.5782 184.9831 C 93.9512 185.3028 87.9826 181.4695 85.9838 179.2361 C 85.3387 187.9827 78.1289 185.6491 78.1289 185.6491 C 78.1289 185.6491 75.58 189.9465 71.5288 192.0231 C 61.5427 197.142 59.7122 196.7349 55.59 200.6408 C 53.2684 202.8405 49.1881 199.5904 46.4922 200.6021 C 36.7298 204.2658 30.8317 199.5844 31.2973 189.1916 Z", - + "tree": "M 27.2254 74.2515 C 25.9396 74.2515 25.2787 72.9597 25.2787 71.4106 C 25.2787 70.1191 25.6091 68.8652 26.5645 68.8652 C 27.2254 68.8652 28.2203 70.1191 28.5507 71.4106 C 29.2116 73.291 28.5507 74.2515 27.2254 74.2515 ZM 247.0194 147.96 C 249.9611 147.96 250.6219 148.2913 248.9661 150.5051 C 248.0107 152.0542 246.0245 153.3457 245.0691 153.3457 C 244.0743 153.3457 243.0829 152.0542 243.0829 150.5051 C 243.0829 148.918 244.4083 147.96 247.0194 147.96 ZM 41.6425 57.7979 C 38.7009 57.1711 38.3704 53.9971 41.6425 53.0388 C 43.2982 52.7437 44.2537 53.6655 44.2537 55.5842 C 44.2537 57.1711 43.2982 58.0933 41.6425 57.7979 ZM 4.9748 158.0671 C 8.9113 157.1448 8.9113 156.4819 7.586 154.3042 C 6.5946 152.719 6.2642 150.8005 6.9251 150.1736 C 7.2555 149.2136 8.9113 150.1736 9.8667 152.0542 C 11.192 154.5996 12.1833 154.9329 14.7945 153.3457 C 16.4144 152.3875 17.7361 151.759 17.7361 152.719 C 17.7361 153.3457 18.731 152.719 20.0168 151.4275 C 22.0031 149.5469 22.3335 145.4146 20.3473 143.2007 C 18.731 141.3201 10.5276 141.947 8.2469 144.1589 C 6.9251 145.7461 5.9302 145.4146 4.6444 142.574 C 2.6582 137.8508 2.6582 137.1877 7.2555 136.8926 C 11.192 136.8926 11.192 136.8926 7.9164 134.9741 C 6.2642 134.0518 4.6444 132.1335 4.6444 130.8796 C 4.6444 127.7058 9.2058 125.8252 11.192 128.0391 C 11.8529 128.9612 13.1388 129.9197 14.4641 129.9197 C 17.0753 129.9197 29.542 119.1853 29.542 116.9714 C 29.542 116.0115 30.8314 115.3848 32.1532 116.0115 C 33.773 116.3447 36.7147 115.3848 39.6958 113.7976 C 43.9232 111.2524 43.9232 110.957 41.6425 106.8264 C 40.0262 103.9858 38.04 103.0256 33.4426 103.0256 C 28.2203 103.0256 26.895 103.6526 25.2787 107.4534 C 24.6142 109.9985 22.6281 111.8792 21.3422 111.8792 C 19.0615 111.8792 18.4006 109.0403 20.6813 107.4534 C 21.6726 106.8264 22.3335 104.6128 22.3335 102.3989 C 22.3335 98.9312 21.6726 98.3044 17.4057 99.2268 C 13.1388 99.8535 13.1388 99.5581 14.1336 94.7988 C 14.7945 91.9583 15.7499 89.4131 16.4144 89.1177 C 17.0753 88.7864 17.7361 85.9456 17.7361 83.105 C 17.7361 77.4233 19.6864 76.4651 23.2925 80.5596 C 24.9446 82.7734 25.9396 83.105 26.5645 81.1863 C 27.2254 79.9326 29.542 79.6372 33.1481 80.2639 C 38.04 81.5178 38.3704 81.1863 37.7095 77.4233 C 37.3791 75.2097 37.0451 72.6643 36.7147 72.0376 C 36.7147 71.0791 35.0984 69.8237 33.1481 68.8652 C 29.2116 67.2786 28.2203 63.4795 31.8228 63.4795 C 32.8177 63.4795 33.773 62.8525 33.773 61.5969 C 33.773 60.6384 35.7593 60.0117 38.3704 60.3052 C 41.9765 60.6384 43.9232 59.3833 48.851 52.7437 C 52.4571 47.9844 55.0682 45.4392 55.3987 46.7307 C 55.7291 48.3159 57.3849 49.238 59.0047 49.238 C 61.6159 49.238 61.9464 48.3159 60.991 44.1853 C 60.657 41.3445 59.0047 37.8772 58.0099 36.29 C 55.0682 32.7849 55.0682 28.6904 58.0099 29.9438 C 60.3265 31.1995 67.535 27.7319 67.535 25.5181 C 67.535 24.5581 68.494 23.9312 69.8157 23.9312 C 71.1411 23.9312 71.766 25.8496 71.766 28.3589 C 71.766 31.531 72.4269 32.7849 74.0827 31.8625 C 75.3685 31.1995 76.3635 29.3171 76.3635 28.0635 C 76.3635 24.2625 86.844 17.6228 89.4551 19.5051 C 90.4501 20.1323 91.4413 19.5051 91.7755 17.2915 C 92.7308 12.8638 98.6499 9.3962 101.261 11.6101 C 102.5864 12.5322 103.8723 12.2371 104.2063 11.2788 C 104.8671 10.0232 107.4783 9.0649 110.4199 8.7693 C 113.3615 8.438 117.298 7.1824 118.9538 5.8909 C 125.1674 1.7964 131.3847 2.0918 133.9958 6.5198 C 135.6516 9.6917 136.3124 9.6917 136.3124 7.4778 C 136.3124 4.637 137.6019 4.3057 145.4713 5.2642 C 157.9381 6.5198 159.8884 6.5198 164.4858 4.9326 C 167.4274 4.0103 168.4222 4.3057 168.4222 6.8508 C 168.4222 8.438 169.3777 9.6917 170.703 9.6917 C 171.6943 9.6917 172.6497 8.7693 172.6497 7.8093 C 172.6497 5.2642 177.9116 4.0103 182.5089 5.2642 C 186.0755 6.5198 186.4059 6.8508 185.4505 15.373 C 185.1201 20.4636 185.4505 23.9312 186.0755 23.9312 C 186.7363 23.9312 187.4008 21.7173 187.4008 18.5452 C 187.4008 13.1953 191.0033 10.9832 192.3286 15.373 C 192.6591 16.9583 193.6144 16.3313 194.2753 13.824 C 195.9312 7.1824 199.5372 10.6499 198.5422 17.9185 C 197.551 23.9312 197.551 23.9312 200.4926 21.7173 C 202.1483 20.759 203.4341 18.25 203.4341 16.6646 C 203.4341 15.0776 204.4291 13.1953 205.7509 12.5322 C 208.3619 11.2788 211.3072 16.0361 210.3482 19.5051 C 210.0178 21.0906 210.0178 22.3459 210.9731 22.3459 C 211.6376 22.3459 212.2985 21.4238 212.2985 20.759 C 212.2985 19.8367 213.9183 19.5051 215.9045 20.1323 C 220.1679 21.0906 220.7928 23.6357 217.1904 25.1848 C 216.235 25.8496 215.2401 27.3987 215.2401 28.6904 C 215.2401 30.9043 215.9045 30.9043 219.507 28.6904 C 225.3902 24.8914 228.0013 25.1848 228.9963 29.3171 C 229.6571 31.531 230.9465 32.491 232.2683 31.531 C 233.5936 31.1995 236.5352 32.491 238.816 34.7031 C 240.8022 36.5854 243.7438 38.1707 245.0691 38.1707 C 247.0194 38.1707 247.0194 39.7578 246.3549 44.1853 C 245.6941 48.9446 245.6941 49.5713 247.6803 47.6531 C 250.2914 44.5168 251.2828 44.812 252.2418 49.238 C 252.5722 51.4519 254.8888 53.0388 257.5 53.9971 C 260.4416 54.626 262.0615 56.2109 262.0615 58.0933 C 262.0615 60.0117 263.0527 62.2239 264.0477 63.4795 C 266.6589 65.6931 265.9944 72.3328 263.0527 74.5466 C 262.0615 75.2097 260.7721 74.8782 260.4416 73.9199 C 259.7808 72.9597 257.5 72.9597 253.233 73.9199 C 246.3549 76.1318 245.0691 76.7605 246.6854 79.6372 C 247.6803 81.5178 259.1198 80.8911 265.3694 78.6772 C 267.3197 77.7188 267.9806 78.6772 267.9806 83.105 C 267.9806 86.2769 267.3197 88.7864 266.3284 88.7864 C 265.6639 88.7864 265.039 89.7446 265.039 91.3315 C 265.039 95.1321 266.6589 94.7988 270.9258 90.373 C 273.2029 87.8279 274.5282 87.1992 276.1481 88.7864 C 277.8003 90.373 278.1343 90.373 278.1343 87.8279 C 278.1343 86.2769 277.4698 84.9873 276.4786 84.9873 C 275.8536 84.9873 275.1891 83.7317 275.1891 82.4778 C 275.1891 80.8911 276.1481 79.6372 277.4698 79.6372 C 278.4647 79.6372 279.7865 80.2639 279.7865 81.1863 C 279.7865 82.1467 281.0759 83.4001 282.7317 83.7317 C 285.0089 84.6919 285.6733 85.9456 285.3428 89.7446 C 284.6784 97.0127 286.0038 99.2268 290.8956 97.9731 C 293.2123 97.3442 294.498 97.9731 293.5068 99.2268 C 293.2123 99.8535 293.5068 101.4407 294.1677 102.1033 C 296.8183 103.9858 295.8234 108.4119 292.8818 108.4119 C 289.2758 108.4119 288.2844 109.9985 290.2348 112.8394 C 291.5565 114.4263 292.5514 114.72 293.8372 113.4663 C 296.8183 110.2942 297.4433 112.8394 297.7737 125.4939 C 297.7737 131.8379 298.4346 136.8926 299.0955 136.8926 C 300.7153 136.8926 300.0904 143.8655 297.7737 146.7061 C 296.4843 148.2913 296.4843 149.8403 297.4433 151.1318 C 299.7599 153.9727 297.4433 162.1995 294.498 162.1995 C 291.887 162.1995 286.9591 168.2122 286.9591 171.053 C 286.9591 174.5225 282.7317 171.053 281.7368 167.2539 C 280.7455 163.7864 280.7455 163.7864 280.081 166.2939 C 279.4561 169.1724 283.0262 178.0259 286.0038 180.5349 C 287.954 182.4536 284.348 185.6255 281.7368 184.334 C 280.4114 183.7073 279.7865 181.8267 279.7865 179.9082 C 279.7865 174.5225 271.5866 160.9456 265.3694 155.8552 C 262.0615 153.3457 259.1198 150.5051 259.1198 149.5469 C 259.1198 147.6284 248.6357 141.6516 242.7525 139.7332 C 239.4768 138.7732 238.4855 139.1064 238.4855 141.6516 C 238.4855 143.5322 237.8606 144.1589 236.5352 143.5322 C 233.5936 142.2783 232.2683 145.1194 234.8795 147.96 C 238.4855 151.4275 237.8606 155.5596 233.9241 153.9727 C 231.277 153.0144 230.9465 153.3457 231.9379 158.7319 C 232.2683 161.8679 232.9328 166 232.9328 167.8806 C 232.9328 169.7991 233.5936 171.053 234.2545 171.053 C 235.2136 171.053 235.5439 170.426 234.8795 169.4678 C 234.5491 168.5076 235.2136 167.5854 236.5352 167.5854 C 237.5302 167.5854 238.4855 168.8408 238.4855 170.0945 C 238.4855 171.3862 237.1962 172.6396 234.8795 172.3086 C 232.9328 172.3086 231.277 171.3862 231.277 170.7593 C 231.277 167.8806 222.4486 148.2913 219.8375 145.4146 C 216.8958 142.2783 218.8461 141.3201 195.6006 156.1865 C 191.9982 158.4004 188.0617 163.1594 186.0755 166.6272 C 184.4556 170.0945 181.8445 173.6001 180.5227 174.2268 C 179.1974 174.8538 174.3055 179.9082 170.0385 185.2942 C 151.6849 209.0139 154.666 211.8547 155.9519 260.2944 C 161.5082 297 161.5082 297 161.5082 297 C 148.4129 297 148.4129 297 148.4129 297 C 137.6019 297 137.6019 297 137.6019 297 C 138.5932 263.1331 138.5932 263.1331 138.5932 263.1331 C 139.254 260.2944 139.5881 254.5752 139.9186 251.4028 C 140.249 249.5205 130.7238 241.2937 131.0543 239.4133 C 131.0543 237.8264 140.9099 242.2542 140.9099 240.667 C 142.5297 217.574 140.9099 199.2021 136.6429 189.4246 C 135.6516 183.4116 127.4482 164.0818 126.1624 164.0818 C 125.8319 164.0818 123.5153 162.1995 121.2346 159.9856 C 117.298 155.8552 115.6818 155.5596 93.7221 154.3042 C 70.1462 153.0144 70.1462 153.0144 70.1462 153.0144 C 64.5575 157.4404 64.5575 157.4404 64.5575 157.4404 C 61.2855 160.3188 58.0099 162.1995 57.0544 162.1995 C 55.0682 162.1995 46.8648 168.8408 43.2982 172.6396 C 42.9678 172.6396 42.6374 172.3086 42.6374 172.0129 C 42.3069 172.0129 42.3069 172.0129 42.3069 171.6814 C 41.9765 170.7593 41.6425 169.7991 40.9816 168.8408 C 42.9678 167.2539 44.5876 166.2939 45.2485 166.6272 C 46.2398 167.2539 47.1988 166.6272 47.1988 165.04 C 47.1988 163.4548 45.2485 162.8262 40.0262 163.4548 C 33.773 164.4133 32.1532 164.7446 31.1619 168.5076 C 29.542 170.426 29.2116 173.2668 30.1706 175.4807 C 29.8365 178.3213 29.8365 180.2397 30.1706 180.2397 C 30.501 180.2397 30.8314 179.613 31.8228 178.9482 C 31.8228 179.2798 32.1532 179.613 32.4872 179.9082 C 29.2116 180.8665 27.5558 183.7073 27.8898 186.5479 C 26.2341 187.8394 24.6142 188.4663 22.6281 189.4246 C 22.6281 189.4246 22.6281 189.0933 22.3335 189.0933 C 23.6229 186.2527 24.2838 183.0803 24.6142 178.3213 C 25.2787 172.9712 24.9446 169.4678 23.9534 169.4678 C 23.2925 169.4678 22.6281 170.7593 22.6281 172.6396 C 22.9584 174.2268 22.3335 175.812 21.0117 176.1074 C 20.0168 176.4387 19.356 175.812 19.356 174.2268 C 19.356 170.426 18.0701 170.426 15.1249 173.8936 C 13.8032 175.1851 11.192 176.7344 8.9113 177.3992 C 5.9302 178.3213 4.9748 177.6943 3.6495 174.2268 C 2.6582 171.3862 1.9973 168.2122 2.6582 166.9585 C 2.9886 165.3716 2.9886 164.0818 1.7028 164.0818 C -1.9033 164.0818 0.7079 159.0271 4.9748 158.0671 ZM 33.1481 85.3186 C 31.1619 84.9873 29.542 84.0649 28.8812 82.7734 C 28.5507 80.8911 28.2203 80.8911 28.2203 82.7734 C 28.2203 84.0649 26.895 84.9873 25.6091 85.3186 C 23.2925 85.3186 23.2925 85.6501 25.9396 86.9058 C 27.5558 87.5325 29.2116 88.4907 29.542 88.4907 C 29.8365 88.4907 31.4923 87.5325 33.1481 86.9058 C 36.0897 85.3186 36.0897 85.3186 33.1481 85.3186 ZM 292.8818 136.2656 C 293.5068 136.8926 294.1677 135.9324 294.1677 134.3472 C 294.1677 133.0918 293.5068 131.8379 292.8818 131.8379 C 291.887 131.8379 291.2261 132.4648 291.2261 133.387 C 291.2261 134.3472 291.887 135.6387 292.8818 136.2656 ZM 290.5652 139.1064 C 290.2348 138.1462 288.6149 136.8926 287.2896 136.8926 C 286.3342 136.8926 285.6733 138.1462 286.3342 139.1064 C 286.6287 140.0647 287.954 140.6917 289.2758 140.6917 C 290.5652 140.6917 290.8956 140.0647 290.5652 139.1064 ZM 287.6236 153.3457 C 288.6149 153.3457 289.9402 153.0144 289.9402 152.719 C 289.9402 152.0542 288.6149 151.4275 287.6236 150.8005 C 286.3342 150.1736 285.3428 150.5051 285.3428 151.4275 C 285.3428 152.3875 286.3342 153.3457 287.6236 153.3457 ZM 290.2348 123.28 C 291.5565 122.6528 292.2209 121.6929 291.887 120.7705 C 290.8956 118.5208 285.3428 118.5208 285.3428 120.7705 C 285.3428 123.28 287.2896 124.2383 290.2348 123.28 ZM 272.2476 99.5581 C 270.5918 100.5183 269.6005 102.3989 269.9308 103.3589 C 271.5866 105.8665 273.537 105.2395 275.1891 101.145 C 276.809 97.3442 276.1481 96.7175 272.2476 99.5581 ZM 265.9944 148.2913 C 274.5282 156.8132 274.8587 157.1448 274.8587 154.3042 C 274.8587 152.719 274.1978 151.4275 273.2029 151.4275 C 272.2476 151.4275 270.5918 149.8403 269.6005 147.96 C 268.645 146.0774 266.6589 144.1589 265.039 144.1589 C 262.0615 144.1589 262.0615 144.4922 265.9944 148.2913 ZM 259.1198 133.387 C 261.1025 133.387 262.0615 132.7603 260.7721 132.4648 C 259.7808 131.8379 258.1609 131.8379 257.1696 132.4648 C 256.1746 132.7603 257.1696 133.387 259.1198 133.387 ZM 249.6306 90.373 C 250.6219 91.3315 253.5635 92.5852 256.1746 93.2139 C 260.7721 94.1721 261.1025 94.1721 258.4913 91.627 C 255.5138 88.4907 247.3499 87.5325 249.6306 90.373 ZM 229.6571 37.8772 C 228.6658 38.7993 228.3354 40.7178 228.6658 41.9714 C 229.3267 44.5168 231.277 42.303 231.277 38.5039 C 231.277 36.5854 230.9465 36.29 229.6571 37.8772 ZM 239.4768 106.1997 C 242.088 107.7847 243.0829 107.7847 244.4083 105.571 C 247.0194 102.1033 245.3636 100.5183 240.4717 102.7305 C 236.5352 104.2813 236.5352 104.2813 239.4768 106.1997 ZM 232.9328 90.373 C 237.8606 86.9058 237.8606 86.9058 233.9241 86.9058 C 231.277 86.9058 229.3267 88.1592 228.3354 90.373 C 227.7104 92.5852 227.046 93.8408 227.3764 93.8408 C 227.3764 93.8408 229.9876 91.9583 232.9328 90.373 ZM 225.7242 141.6516 C 228.0013 145.1194 231.9379 145.1194 230.652 141.3201 C 230.3216 140.0647 229.9876 138.4795 229.9876 138.1462 C 229.9876 137.8508 228.6658 137.8508 227.046 138.4795 C 224.3989 139.1064 224.3989 140.0647 225.7242 141.6516 ZM 215.5705 128.6658 C 218.1816 132.1335 219.507 132.4648 222.4486 129.9197 C 224.3989 128.3345 224.3989 128.3345 222.4486 128.0391 C 221.4573 128.0391 218.8461 127.7058 216.5654 127.0789 C 213.2898 125.8252 213.2898 125.8252 215.5705 128.6658 ZM 215.2401 94.1721 C 216.8958 94.1721 218.8461 89.1177 217.8513 87.5325 C 216.5654 85.9456 213.9183 88.4907 213.9183 91.3315 C 213.9183 92.9185 214.5792 94.1721 215.2401 94.1721 ZM 199.2067 115.6799 C 197.2205 116.9714 197.551 117.2671 200.1622 117.2671 C 201.8179 117.2671 203.7646 116.6382 204.4291 115.6799 C 205.4203 113.1709 202.1483 113.1709 199.2067 115.6799 ZM 199.5372 143.5322 C 199.8317 143.8655 200.823 143.2007 201.8179 141.6516 C 202.8091 140.3601 205.7509 138.7732 208.0315 138.1462 C 210.9731 137.1877 212.2985 135.6387 212.2985 133.387 C 212.2985 128.0391 207.7011 129.624 202.8091 136.561 C 200.823 140.0647 199.2067 142.9055 199.5372 143.5322 ZM 195.9312 128.9612 C 198.8727 125.4939 198.8727 124.865 196.556 123.9067 C 193.9449 122.6528 191.9982 125.4939 191.9982 130.5464 C 191.6642 134.3472 191.6642 134.3472 195.9312 128.9612 ZM 190.6729 91.627 C 191.0033 94.1721 191.6642 93.8408 193.6144 89.1177 C 195.9312 84.0649 195.9312 83.4001 193.9449 83.4001 C 192.6591 83.4001 191.3337 84.3586 191.0033 85.9456 C 190.3424 87.1992 190.3424 90.0779 190.6729 91.627 ZM 189.053 65.6931 C 189.053 66.9829 189.6779 70.1191 190.3424 72.3328 C 191.3337 76.7605 191.3337 76.7605 192.3286 72.9597 C 193.6144 69.1609 192.3286 63.4795 190.3424 63.4795 C 189.3834 63.4795 189.053 64.4375 189.053 65.6931 ZM 166.1056 76.1318 C 164.4858 78.3457 164.4858 80.5596 165.7716 87.1992 C 166.4361 91.9583 168.0919 96.7175 169.0472 97.6399 C 170.703 99.2268 171.0334 97.6399 171.3638 87.8279 C 171.3638 75.8381 169.7081 72.0376 166.1056 76.1318 ZM 169.0472 109.6672 C 169.3777 110.2942 170.0385 109.0403 169.7081 107.158 C 169.7081 105.2395 169.3777 104.9441 168.7168 106.1997 C 168.4222 107.4534 168.4222 109.0403 169.0472 109.6672 ZM 180.8531 79.9326 C 180.5227 80.5596 180.5227 84.9873 181.514 89.7446 C 182.5089 97.9731 182.8034 98.3044 183.1339 92.2915 C 183.4643 82.4778 182.8034 77.7188 180.8531 79.9326 ZM 169.7081 169.1724 C 171.6943 165.3716 174.9664 159.0271 177.2471 155.2266 C 179.8582 151.1318 181.514 145.7461 182.1749 140.3601 C 183.1339 131.8379 183.1339 131.8379 183.1339 131.8379 C 179.1974 136.561 179.1974 136.561 179.1974 136.561 C 177.2471 139.1064 175.9253 141.947 175.9253 142.9055 C 175.9253 145.4146 169.7081 161.241 167.7578 164.0818 C 166.7665 165.6667 165.1107 169.1724 164.8162 171.6814 C 163.1604 178.9482 166.1056 177.6943 169.7081 169.1724 ZM 146.4626 201.7476 C 147.4575 208.0557 147.4575 208.0557 150.7296 194.4792 C 152.6799 187.1746 155.6215 175.4807 157.6077 168.2122 C 160.2188 159.0271 161.2137 151.4275 161.2137 140.6917 C 161.2137 126.7473 160.8797 126.4519 158.2686 128.0391 C 152.3494 132.1335 149.0738 143.5322 147.752 165.6667 C 147.1271 177.0676 146.4626 188.4663 145.8018 190.9756 C 145.4713 193.5208 145.8018 198.28 146.4626 201.7476 ZM 147.1271 120.7705 C 148.4129 123.9067 149.7383 126.4519 149.7383 126.4519 C 150.0687 126.4519 151.6849 124.5334 153.0103 122.0244 C 154.666 119.8123 157.2772 117.2671 158.2686 116.3447 C 162.1691 113.4663 163.1604 104.6128 159.8884 98.5999 C 157.2772 93.2139 150.0687 87.1992 148.7433 89.1177 C 148.0825 89.7446 147.1271 95.7593 146.4626 102.7305 C 145.1409 113.1709 145.1409 116.3447 147.1271 120.7705 ZM 145.1409 48.3159 C 145.8018 48.9446 146.4626 48.6113 146.4626 47.6531 C 146.4626 46.3975 145.8018 45.1436 145.1409 44.5168 C 144.146 43.8521 143.521 44.1853 143.521 45.4392 C 143.521 46.3975 144.146 47.6531 145.1409 48.3159 ZM 39.0313 133.387 C 43.5927 133.7202 43.5927 133.7202 43.5927 133.7202 C 48.1901 133.7202 52.7875 129.624 52.7875 126.1206 C 52.7875 123.9067 52.4571 123.9067 39.0313 133.387 ZM 40.9816 124.5334 C 40.9816 125.4939 41.6425 126.4519 42.6374 126.4519 C 44.2537 126.4519 48.851 120.7705 47.8597 119.8123 C 46.8648 118.5208 40.9816 122.6528 40.9816 124.5334 ZM 44.5876 102.7305 C 49.5155 109.0403 51.7962 109.6672 54.4073 105.571 C 57.0544 101.7722 54.7378 99.2268 46.8648 98.3044 C 40.3207 97.3442 40.3207 97.3442 44.5876 102.7305 ZM 40.9816 84.9873 C 40.9816 85.6501 43.2982 87.1992 45.9094 88.4907 C 58.0099 94.5037 60.3265 94.5037 59.996 88.7864 C 59.996 85.3186 55.0682 77.7188 53.1179 77.7188 C 50.8013 77.7188 40.9816 83.7317 40.9816 84.9873 ZM 58.6743 129.9197 C 62.2768 129.9197 62.6072 128.9612 59.6656 127.4121 C 58.3403 127.0789 57.0544 127.4121 56.724 128.3345 C 56.0595 129.2925 57.0544 129.9197 58.6743 129.9197 ZM 61.2855 55.5842 C 59.0047 53.9971 56.0595 53.3704 54.7378 53.9971 C 52.4571 55.2527 52.7875 55.5842 56.0595 56.5422 C 57.6794 57.1711 60.991 57.7979 62.6072 58.0933 C 64.5575 58.0933 64.5575 57.4646 61.2855 55.5842 ZM 60.991 66.9829 C 62.9376 66.9829 63.2717 66.6514 61.9464 65.6931 C 60.991 65.3979 59.6656 65.3979 59.0047 66.0247 C 58.6743 66.6514 59.6656 67.2786 60.991 66.9829 ZM 62.9376 74.2515 C 58.3403 74.2515 58.3403 74.5466 60.991 77.092 C 64.263 79.9326 65.2184 80.2639 66.5438 78.3457 C 68.8244 75.8381 67.2046 74.2515 62.9376 74.2515 ZM 69.4854 38.5039 C 68.16 36.917 67.8296 39.7578 68.494 43.2253 C 68.8244 45.4392 70.1462 47.3574 70.8107 47.3574 C 72.0965 47.3574 71.1411 40.3845 69.4854 38.5039 ZM 79.9659 80.2639 C 79.3051 80.5596 80.9608 82.4778 82.9111 84.0649 C 84.8973 85.6501 86.5135 86.2769 86.5135 85.3186 C 86.5135 83.105 80.9608 78.9727 79.9659 80.2639 ZM 71.766 82.4778 C 68.8244 84.6919 70.4802 90.373 74.7436 91.3315 C 77.0243 91.9583 80.6304 94.5037 82.9111 97.0127 C 84.8973 99.5581 86.5135 100.5183 86.5135 99.5581 C 86.5135 96.386 73.4218 81.1863 71.766 82.4778 ZM 85.1918 108.7451 C 83.2416 103.6526 80.9608 101.145 76.6938 99.5581 C 73.4218 98.3044 70.1462 97.6399 69.1549 97.9731 C 68.16 98.3044 72.0965 102.3989 77.6888 107.158 C 88.1693 115.3848 88.1693 115.3848 85.1918 108.7451 ZM 102.5864 60.0117 C 101.9255 60.0117 101.261 61.2656 101.261 62.5193 C 101.261 64.1062 101.9255 65.0647 102.5864 65.0647 C 103.5418 65.0647 104.2063 64.1062 104.2063 62.5193 C 104.2063 61.2656 103.5418 60.0117 102.5864 60.0117 ZM 99.6089 85.9456 C 99.6089 88.1592 105.1976 86.5725 107.4783 83.7317 C 110.7504 78.9727 110.4199 77.7188 106.153 77.7188 C 103.2114 77.7188 99.6089 82.1467 99.6089 85.9456 ZM 109.1341 17.6228 C 108.1392 21.7173 107.4783 25.1848 107.8088 25.5181 C 108.8036 26.772 111.4149 17.2915 111.4149 13.4907 C 111.4149 11.9055 110.4199 13.824 109.1341 17.6228 ZM 126.1624 81.5178 C 124.5066 81.5178 123.2207 82.1467 123.2207 83.4001 C 123.2207 84.3586 124.1761 84.9873 125.1674 84.9873 C 126.4927 84.9873 127.7786 84.3586 128.1126 83.4001 C 128.7735 82.1467 127.7786 81.5178 126.1624 81.5178 ZM 122.2258 140.9868 C 124.1761 146.7061 127.1177 152.0542 128.7735 153.3457 C 130.4293 154.3042 133.7013 158.7319 135.6516 163.1594 C 137.6019 167.5854 139.5881 171.053 139.9186 171.053 C 141.5348 171.053 138.2628 141.947 135.9821 133.0918 C 133.9958 125.4939 133.3708 118.5208 133.7013 107.4534 C 133.9958 99.2268 133.7013 91.9583 133.0405 91.3315 C 132.71 90.7046 130.4293 90.7046 128.4431 91.3315 C 124.837 92.5852 124.5066 93.5454 124.5066 100.5183 C 124.5066 105.8665 123.8456 108.7451 122.2258 109.9985 C 117.6285 112.8394 117.9589 128.9612 122.2258 140.9868 ZM 112.7366 98.5999 C 112.0757 93.8408 111.4149 93.2139 107.8088 93.2139 C 103.5418 93.2139 103.5418 93.5454 103.8723 100.1851 C 103.8723 104.2813 104.5367 109.0403 104.8671 111.2524 C 105.1976 113.4663 106.487 115.6799 107.8088 116.0115 C 110.4199 117.5986 113.3615 106.5313 112.7366 98.5999 ZM 107.8088 130.5464 C 104.8671 126.7473 102.881 122.6528 102.5864 121.6929 C 102.5864 120.4392 100.9307 117.2671 98.9839 114.4263 C 96.9977 111.5857 94.717 108.0803 93.7221 106.8264 C 90.4501 102.3989 91.1109 106.1997 94.717 116.0115 C 96.9977 122.6528 100.9307 128.6658 105.528 133.7202 C 114.0259 142.2783 115.0173 140.6917 107.8088 130.5464 ZM 102.5864 146.0774 C 106.153 146.0774 105.8585 145.7461 100.9307 140.6917 C 97.6586 137.5193 95.3779 134.0518 95.3779 132.4648 C 95.3779 131.2112 91.1109 126.7473 86.1832 122.6528 C 81.2912 118.5208 76.6938 114.4263 76.033 113.1709 C 75.3685 111.5857 75.0381 111.5857 75.0381 113.4663 C 75.0381 115.3848 73.4218 115.6799 68.16 114.72 C 64.5575 114.093 61.6159 114.093 61.6159 114.4263 C 61.6159 115.0532 62.9376 118.8523 64.263 122.6528 C 66.5438 128.9612 67.535 130.2529 74.7436 132.7603 C 79.3051 134.3472 86.5135 138.1462 91.1109 140.9868 C 95.3779 143.8655 100.6002 146.0774 102.5864 146.0774 ZM 51.4622 156.8132 C 52.7875 156.8132 54.7378 156.1865 56.0595 155.2266 C 58.3403 153.0144 56.3936 153.0144 52.1266 155.2266 C 50.1763 156.1865 49.8459 156.4819 51.4622 156.8132 ZM 47.8597 148.918 C 51.1318 147.6284 61.6159 146.3728 71.1411 146.3728 C 89.1248 146.0774 92.7308 145.1194 85.5222 143.2007 C 83.2416 142.574 78.0192 140.9868 73.7523 139.4016 C 66.2133 136.561 50.8013 137.5193 49.185 140.6917 C 48.851 141.3201 47.1988 141.6516 45.579 141.3201 C 42.3069 140.3601 39.0313 142.9055 38.04 147.96 C 36.7147 152.0542 39.0313 152.3875 47.8597 148.918 ZM 21.6726 156.1865 C 22.3335 158.7319 25.6091 159.0271 28.2203 156.8132 C 29.8365 155.5596 29.8365 154.9329 28.2203 153.0144 C 26.895 151.1318 25.9396 151.1318 23.9534 152.719 C 22.6281 153.6414 21.6726 155.2266 21.6726 156.1865 ZM 11.192 178.3213 C 12.4779 178.3213 13.1388 179.2798 12.4779 181.1621 C 12.1833 182.4536 11.192 183.7073 10.5276 183.7073 C 9.5363 183.7073 8.9113 182.4536 8.9113 181.1621 C 8.9113 179.613 9.8667 178.3213 11.192 178.3213 Z", "maple-leaf": "M 82.7949 242.2583 C 77.6862 252.9512 74.1093 258.564 56.7309 264.1697 C 53.66 265.6975 57.7499 269.2642 59.8018 268.7527 C 75.1283 262.6421 78.7051 257.541 85.8658 246.3296 C 89.4427 260.6033 97.6154 269.7756 111.4169 275.3813 L 112.4428 272.3191 C 131.3531 282.5146 145.6606 284.554 157.9232 282.0032 C 169.6797 279.4526 183.4743 277.4204 194.7248 278.9482 C 187.571 273.342 183.4743 266.7134 181.9492 258.564 C 193.6989 246.3296 216.699 250.9192 227.9426 243.7856 L 225.3847 238.1729 C 249.9168 230.0234 270.872 216.7727 300 220.8511 L 251.9617 186.1934 L 252.9807 181.6035 C 238.6732 170.9036 222.3208 168.3528 203.9166 175.4932 C 210.0513 157.6528 203.9166 138.2915 220.7888 124.5298 C 216.699 116.8848 220.7888 106.1848 227.9426 96.5007 C 228.9686 78.1558 234.0704 61.8464 243.2691 47.0679 C 228.4487 56.752 213.6351 65.4128 198.3017 73.0613 L 195.7438 67.4521 C 189.616 77.1394 180.9233 84.2729 169.1668 88.3442 L 167.1219 82.7385 C 151.2755 98.5398 132.3721 106.6892 120.6155 129.6306 C 124.1924 107.2007 117.5447 85.2891 108.3461 67.4521 L 104.7692 71.0222 C 98.1284 49.1072 74.6222 34.8369 59.8018 17 C 65.9296 65.9243 48.0383 72.0383 48.5581 99.0513 L 42.4165 99.5557 C 51.1091 127.0801 39.3525 139.8193 44.9744 158.6758 C 30.6669 151.5422 12.2626 156.6365 0 145.425 C 14.8204 168.8713 19.9362 197.4048 44.9744 216.7727 L 41.3975 218.3005 C 50.5961 228.489 62.3527 237.157 82.7949 242.2583 Z", - + "butterfly": "M 132.1899 141.4731 C 133.2701 142.188 135.5561 140.834 136.6667 140.6667 C 135.4167 139.0417 140.125 131.125 138.5 128.25 C 138 121.75 125.3439 107.0776 123.75 105.375 C 124.358 104.2332 131.1718 105.2957 130.9684 105.4595 C 128.125 107.75 140.5635 120.8953 142 128.5 C 144.6469 128.3535 148.1237 127.3618 149.6667 129 C 151.1076 127.4255 162.2255 115.3953 162.8333 105 C 162.9204 103.5103 168.9546 104.4531 167.8195 105.3611 C 166 111.8333 153.1691 130.0051 152.1667 130.6667 C 153.3333 136.3333 152.861 136.7217 160.3125 141.1279 C 163.666 133.2534 170.8113 126.5691 177.3557 119.9163 C 184.7454 112.4465 189.7048 105.2905 197.845 97.5144 C 208.5609 87.6365 222.2463 78.6233 234.7805 73.2429 C 243.5 69.5 258.1094 66.2913 260.349 66.0813 C 264.498 65.6785 268.25 65.75 273.1679 66.4807 C 280.4244 67.5588 287.5098 68.1609 295.1284 71.7371 C 302.2921 76.3269 299.8157 82.0793 298.48 87.4675 C 287.4467 99.6348 276.1462 114.2068 272.5872 129.1147 C 271.3906 134.6348 269.2391 144.147 264.1613 150.1221 C 255.9979 159.313 246.0071 158.9731 236.6201 160.219 C 242.3398 161.8567 248.5434 167.2041 254.1089 172.5776 C 262.7908 181.0295 267.0212 189.697 264.7792 199.1331 C 264.3019 201.1123 256.0239 216.1243 251.975 220.8347 C 236.6072 238.771 215.6852 250.9351 198.8225 248.9609 C 192.75 248.25 176 235.5 172.9885 231.7378 C 165.5126 222.3984 159.372 211.1333 159.1196 201.2981 C 158.1903 200.3696 157.0538 200.301 157.5549 199.0588 C 156.6237 201.9033 153.6667 211.1667 149.289 217.0229 C 142.9601 225.4893 137.1667 212.8333 134.8217 202.5698 C 134.0178 199.0515 134.6078 198.4424 133.6702 196.3386 C 129.2367 198.0208 131.5711 202.8984 129.8312 206.8386 C 128.3561 210.2698 121.75 220.75 119.9257 223.1392 C 114.0942 230.7764 101 242.3333 91.5037 245.1064 C 82.69 247.6802 75.22 247.3191 68.1365 243.686 C 59 239 46.124 228.1169 38.2026 219.2678 C 28.1746 208.3184 19.4099 191.8674 27.7518 180.2795 C 33.0762 173.0493 43.0985 162.2744 52.8922 159.6267 C 45.9788 158.78 30.683 154.2236 24.9946 141.5679 C 23.1688 137.5554 22.4915 131.3167 22.0271 126.853 C 21.2715 119.4836 17.9091 111.0168 15.1179 103.7605 C 12.8741 97.1265 8.9083 88.6335 4.7579 81.3755 C 0.4083 73.759 -3.1577 61.1648 4.4119 54.9631 C 7.0561 52.7964 15.2436 50.2693 16.9547 50.0891 C 22.936 49.4504 31.085 52.3877 37.1343 54.1499 C 41.0975 55.314 58.487 61.5269 63.2961 64.9478 C 95 87.5 117.5438 115.5918 132.1899 141.4731 Z", "leaf_1": "m35.63904,285.5213c9.77121,-31.99348 23.14531,-59.08864 35.83149,-72.59245c13.5912,-14.46718 7.56125,-20.74258 -6.45918,-6.72212c-5.89857,5.89853 -7.58387,1.61555 -7.58387,-19.2735c0,-49.83961 25.83589,-80.67891 87.99842,-105.04016c52.59872,-20.61333 91.37741,-43.79435 107.45589,-64.23479l13.10197,-16.65652l0,28.9807c0,35.83507 -11.11781,89.97318 -23.42422,114.0641c-13.0549,25.55626 -57.80217,72.72934 -79.76038,84.08435c-19.67261,10.17316 -61.687,13.16808 -84.14172,5.99792c-11.19011,-3.57314 -14.7415,-0.84308 -20.53963,15.78944c-3.8556,11.06018 -7.0102,26.79501 -7.0102,34.96616c0,9.27652 -3.72057,14.8566 -9.90572,14.8566c-7.3461,0 -8.78352,-3.67429 -5.56284,-14.21973z", "drop": "m115.15536,295.759c-42.01334,-15.78687 -72.12711,-65.94934 -65.28346,-108.74701c4.3154,-26.98718 95.35947,-190.81818 103.3105,-185.90417c2.59511,1.60386 25.68835,39.79974 51.31831,84.87975c41.0565,72.21342 46.5999,85.67899 46.5999,113.19665c0,55.77716 -44.6394,101.46498 -98.23825,100.54555c-15.6409,-0.26834 -32.60906,-2.05518 -37.707,-3.97076zm42.09262,-28.05386c1.39066,-7.22116 -1.85785,-10.74289 -9.90955,-10.74289c-18.35065,0 -43.80598,-23.24161 -49.49309,-45.18889c-6.0666,-23.41179 -22.15186,-26.19615 -24.52774,-4.24574c-4.57746,42.29059 76.21872,100.22086 83.93037,60.17752z", "feather":"M 188.7044 276.8495 C 188.7044 276.8495 159.7298 274.7077 144.3849 266.5197 C 129.04 258.3316 121.8791 247.8918 121.8791 247.8918 C 121.8791 247.8918 129.932 256.8966 141.2327 263.7194 C 148.1224 267.879 156.2198 271.2277 164.4356 271.2277 C 164.4356 271.2277 151.7511 264.0633 142.2365 269.1805 C 142.2365 269.1805 149.0907 264.4724 160.9574 268.0547 C 172.8248 271.6369 178.7574 269.5897 178.7574 269.5897 C 178.7574 269.5897 158.7075 269.4874 150.0116 263.7557 C 141.3156 258.024 139.1672 254.7494 139.1672 254.7494 C 139.1672 254.7494 148.1699 264.0633 155.1263 265.1892 C 162.0827 266.3151 174.0517 264.9839 174.0517 264.9839 C 174.0517 264.9839 161.6738 265.2915 157.7859 263.5511 C 153.8987 261.8116 138.5538 258.3316 135.792 265.5983 C 135.792 265.5983 138.8605 257.9217 152.8756 260.1735 C 166.8907 262.4253 168.2213 261.7093 168.2213 261.7093 C 168.2213 261.7093 143.3618 252.0877 129.449 257.5126 C 115.5361 262.9374 116.4569 267.5432 116.4569 267.5432 C 116.4569 267.5432 117.3778 251.5763 151.3414 254.4418 C 151.3414 254.4418 135.4853 252.0877 129.6534 247.3797 C 123.8231 242.6716 123.4134 239.6015 123.4134 239.6015 C 123.4134 239.6015 130.0624 249.7337 138.2471 249.836 C 146.4311 249.939 148.784 249.2223 148.784 249.2223 C 148.784 249.2223 132.825 245.5378 125.2544 246.356 C 117.6845 247.1751 105.4089 249.836 98.9636 238.168 C 98.9636 238.168 104.9992 249.3246 121.4702 245.4355 C 137.9404 241.5457 148.2721 245.8446 148.2721 245.8446 C 148.2721 245.8446 123.3111 241.0342 118.1957 236.2239 C 113.081 231.4135 112.4676 223.1224 112.4676 223.1224 C 112.4676 223.1224 114.616 237.0421 125.1521 238.3734 C 135.6898 239.7038 151.6481 239.3962 155.8427 244.2073 C 155.8427 244.2073 145.3058 236.4284 134.3592 237.452 C 123.4134 238.4756 106.5335 252.5999 97.9405 248.9154 C 89.3476 245.2309 85.4597 248.301 85.4597 248.301 C 85.4597 248.301 89.0409 244.7188 95.1779 246.356 C 101.3165 247.9941 102.6463 250.4504 113.1832 243.1837 C 123.7201 235.917 141.6224 226.91 152.9779 234.6881 C 152.9779 234.6881 99.9193 219.9849 94.1912 190.099 C 94.1912 190.099 99.2355 210.0254 125.1521 218.8946 C 151.0695 227.7638 152.5689 227.0827 152.5689 227.0827 C 152.5689 227.0827 112.6046 222.8512 93.9171 186.8237 C 93.9171 186.8237 110.148 214.8002 135.3831 218.4847 C 135.3831 218.4847 114.1041 211.1158 97.599 188.5989 C 81.0962 166.0812 80.4116 158.5744 80.4116 158.5744 C 80.4116 158.5744 100.4645 194.6018 138.3849 201.0169 C 138.3849 201.0169 108.6819 192.5198 87.4036 165.3971 C 66.1254 138.2744 72.7751 132.9519 72.7751 132.9519 C 72.7751 132.9519 68.1716 123.2288 71.649 121.0793 C 71.649 121.0793 64.7948 113.3004 66.7388 106.955 C 66.7388 106.955 71.649 131.0069 96.713 146.7693 C 121.7769 162.5309 123.9253 164.4758 123.9253 164.4758 C 123.9253 164.4758 97.9405 146.667 89.7565 138.0691 C 81.5725 129.4719 72.3654 122.8189 67.0455 104.3964 C 67.0455 104.3964 72.161 122.6143 88.3245 135.1013 C 104.4873 147.5883 107.6595 147.383 107.6595 147.383 C 107.6595 147.383 74.5138 130.3932 66.6366 102.2469 C 66.6366 102.2469 71.2401 123.0242 107.7618 142.8802 C 107.7618 142.8802 71.1379 121.2839 66.6366 98.2548 C 66.6366 98.2548 65.8187 94.8772 67.3529 93.2399 C 67.3529 93.2399 65.5112 88.8386 66.1254 83.3115 C 66.7388 77.7851 67.4552 71.8489 67.4552 71.8489 C 67.4552 71.8489 65.8187 95.1848 88.529 113.1982 C 88.529 113.1982 61.7263 81.0583 71.2757 54.5849 C 71.2757 54.5849 69.228 69.1872 75.6392 75.8736 C 75.6392 75.8736 70.1822 64.1389 72.7751 50.3548 C 72.7751 50.3548 72.0921 64.9572 78.9129 78.1943 C 85.7338 91.4314 107.5573 117.0872 107.5573 117.0872 C 107.5573 117.0872 81.9148 87.0635 77.8224 70.1419 C 73.7308 53.2203 76.0481 42.1668 76.0481 42.1668 C 76.0481 42.1668 73.7308 57.9959 83.6876 73.8271 C 93.6444 89.6577 97.0552 91.4314 97.0552 91.4314 C 97.0552 91.4314 69.6369 62.9085 80.0027 31.249 C 80.0027 31.249 79.3219 63.3184 90.6426 77.1018 C 101.9655 90.8858 105.3733 91.295 105.3733 91.295 C 105.3733 91.295 82.0489 72.8717 82.8668 47.0795 C 83.6861 21.2872 88.0526 19.9227 88.0526 19.9227 C 88.0526 19.9227 78.3662 41.7555 93.9156 62.7729 C 109.4657 83.7903 106.329 79.8316 106.329 79.8316 C 106.329 79.8316 84.2329 51.1739 88.5979 28.7926 C 92.9629 6.4114 101.2824 6.6849 101.2824 6.6849 C 101.2824 6.6849 92.145 12.6886 92.5539 26.4719 C 92.9629 40.2553 106.0578 67.0029 106.0578 67.0029 C 106.0578 67.0029 91.4619 30.2943 95.418 18.9665 C 99.3726 7.6395 107.6944 4.2285 107.6944 4.2285 C 107.6944 4.2285 91.4604 13.5084 100.872 38.3459 C 100.872 38.3459 95.0076 14.7387 110.6925 3.6845 C 110.6925 3.6845 99.5089 14.3296 104.1458 34.1167 C 104.1458 34.1167 102.7819 9.8239 117.6489 1.5002 C 117.6489 1.5002 108.1033 9.0071 107.9662 24.1549 C 107.9662 24.1549 110.0124 8.8692 121.3324 0.272 C 121.3324 0.272 112.7387 13.3727 113.2854 32.2051 C 113.2854 32.2051 119.6966 13.6477 122.8348 0 C 122.8348 0 123.3786 7.3697 121.0605 16.5117 C 118.7424 25.6551 117.6512 26.4734 117.6512 26.4734 C 117.6512 26.4734 125.9707 14.1917 126.3804 2.1828 C 126.3804 2.1828 126.7894 13.9197 123.2437 23.7458 C 123.2437 23.7458 129.9972 18.3128 130.8477 6.2743 C 130.861 6.0949 130.8714 5.914 130.8817 5.7317 C 130.8817 5.7317 132.7901 23.3344 125.8337 38.2103 C 118.8773 53.0869 115.6035 54.4507 115.6035 54.4507 C 115.6035 54.4507 131.0188 39.8476 133.3369 19.6514 C 133.3369 19.6514 133.6095 30.9769 129.5179 40.8023 C 125.4262 50.6283 121.0605 58.1352 121.0605 58.1352 C 121.0605 58.1352 141.6564 39.437 138.2471 5.8681 C 138.2471 5.8681 142.2017 24.5626 138.6561 38.7558 C 135.1104 52.949 117.6489 74.7833 117.6489 74.7833 C 117.6489 74.7833 144.7946 50.764 146.0214 12.6901 C 146.0214 12.6901 149.2952 35.207 136.8143 55.6767 C 136.8143 55.6767 155.2285 34.7978 154.8196 14.9418 C 154.8196 14.9418 158.912 24.9717 155.433 38.6869 C 151.9555 52.402 135.3831 84.5397 118.1957 92.3186 C 118.1957 92.3186 164.8446 67.14 161.776 23.9489 C 161.776 23.9489 166.8907 43.5996 160.5485 62.6373 C 154.2062 81.6742 130.0624 110.7418 130.0624 110.7418 C 130.0624 110.7418 164.6401 78.8087 169.7556 44.0087 C 169.7556 44.0087 171.3921 33.3651 169.3459 27.0189 C 169.3459 27.0189 177.7351 30.7034 178.3485 46.4658 C 178.9619 62.2274 170.7787 83.5168 165.0498 98.4594 C 159.3209 113.4027 147.0453 133.2587 147.0453 133.2587 C 147.0453 133.2587 186.9422 72.258 181.2126 42.3714 C 181.2126 42.3714 191.4435 55.2675 190.2152 72.0535 C 188.9884 88.8386 180.3947 135.5105 156.4568 156.5946 C 156.4568 156.5946 182.2364 136.1249 189.3973 98.8693 C 189.3973 98.8693 193.08 79.0133 192.4659 68.1636 C 192.4659 68.1636 197.5806 91.0904 195.7396 108.2855 C 193.8986 125.4806 174.6658 163.9644 174.6658 163.9644 C 174.6658 163.9644 195.7396 131.826 197.1716 111.7654 C 197.1716 111.7654 199.4223 123.8425 197.7858 134.8968 C 196.1493 145.9503 186.7377 166.6253 178.7574 178.7024 C 178.7574 178.7024 195.5351 154.5482 199.0133 143.9031 C 202.4916 133.2587 201.8774 127.1179 201.8774 127.1179 C 201.8774 127.1179 205.9698 160.2799 199.4223 175.8369 C 192.8748 191.3939 172.2107 214.5253 170.7787 225.3742 C 170.7787 225.3742 180.3947 200.1964 201.264 196.3066 C 222.1333 192.4175 234 198.3538 234 198.3538 C 234 198.3538 202.2871 188.1186 185.3049 207.3608 C 185.3049 207.3608 176.712 217.8006 176.5068 227.2168 C 176.5068 227.2168 198.6044 211.6598 202.0819 190.3703 C 205.5608 169.0816 221.7244 165.8062 221.7244 165.8062 C 221.7244 165.8062 203.7191 172.5615 203.9236 190.9848 C 204.1281 209.408 183.4632 231.1059 178.553 230.4922 C 178.553 230.4922 195.3307 225.7841 201.264 211.6598 C 201.264 211.6598 197.3761 225.9886 188.9884 234.279 C 180.5992 242.5693 183.361 246.1515 183.361 246.1515 C 183.361 246.1515 186.2258 237.2475 194.6143 229.7754 C 203.0035 222.3041 214.0515 209.408 214.1538 200.7078 C 214.256 192.0084 223.3609 183.3082 223.3609 183.3082 C 223.3609 183.3082 216.2 192.4175 215.8925 198.9682 C 215.5858 205.5182 216.6089 215.7534 204.64 224.3513 C 192.6703 232.9485 187.6578 248.4033 187.8623 255.1585 C 187.8623 255.1585 196.2174 231.0377 220.7702 226.2621 C 220.7702 226.2621 197.3079 230.9013 188.9884 257.377 C 188.9884 257.377 204.537 230.9028 225.2707 223.9429 C 225.2707 223.9429 203.1739 233.3591 192.5347 256.4223 C 192.5347 256.4223 198.8089 240.044 218.4499 239.3629 C 218.4499 239.3629 202.0819 241.5457 195.3996 256.9671 C 195.3996 256.9671 198.3999 250.4186 209.5851 248.0979 C 220.7702 245.7772 230.1803 237.7255 227.8622 230.0823 C 227.8622 230.0823 230.7263 240.7252 216.1326 247.8229 C 201.5374 254.9206 195.4055 271.9161 195.4055 271.9161 C 195.4055 271.9161 207.2904 283.1744 216.8995 292.6617 C 216.1409 297.9746 213.5212 299.4365 211.0835 299.9987 C 210.2119 300.1997 189.8638 277.3056 188.7044 276.8495 Z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/object.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/object.json index 07d06a9..70cba95 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/object.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/object.json @@ -4,8 +4,8 @@ "raph_boy": "m210.33144,143.89894c-6.95941,-12.57172 -15.47375,-22.74984 -24.01424,-29.86983c-9.96541,7.29803 -22.10274,11.74199 -35.33479,11.74199c-13.25803,0 -25.41282,-4.45262 -35.36066,-11.74199c-8.54047,7.11999 -17.06351,17.29811 -24.04,29.86983c-16.19487,29.18793 -17.97591,59.1273 -3.98808,66.89018c6.26434,3.49693 12.83241,0.89052 19.61797,-5.6474c-1.19028,6.62904 -1.88538,13.81406 -1.88538,21.32939c0,33.38869 12.97153,60.43492 28.95753,60.43492c9.6353,0 14.40506,-9.84814 16.69862,-24.92639c2.2851,15.07825 7.05482,24.92639 16.6552,24.92639c16.01227,0 28.98392,-27.04623 28.98392,-60.43492c0,-7.51534 -0.69533,-14.70035 -1.91148,-21.32939c6.80278,6.53792 13.36221,9.14433 19.64394,5.6474c13.97922,-7.76288 12.17188,-37.70226 -4.02254,-66.89018zm-59.36613,-29.51799c26.89833,0 48.71428,-21.8159 48.71428,-48.72745s-21.81595,-48.72751 -48.71428,-48.72751c-26.90748,0 -48.74066,21.82024 -48.74066,48.72751s21.83318,48.72745 48.74066,48.72745z", "raph_girl": "m210.47775,159.31802c-6.5556,-11.85419 -14.5853,-21.4483 -22.63556,-28.15549c-9.39328,6.87933 -20.83389,11.06407 -33.31883,11.06407c-12.49292,0 -23.95,-4.19719 -33.33109,-11.06407c-8.05025,6.70718 -16.07988,16.3013 -22.66017,28.15549c-15.26108,27.50842 -16.94806,55.72913 -3.76718,63.05058c5.9046,3.29617 12.09998,0.83537 18.49591,-5.32317c-1.12607,6.24446 -1.79353,13.01715 -1.79353,20.10512c0,31.47218 12.22685,56.96574 27.29962,56.96574c9.078,0 13.57817,-9.28665 15.73595,-23.49945c2.15787,14.2128 6.65384,23.49945 15.71159,23.49945c15.09309,0 27.3199,-25.49356 27.3199,-56.96574c0,-7.08797 -0.65509,-13.86066 -1.80157,-20.10512c6.41638,6.15854 12.59937,8.61934 18.5162,5.32317c13.20151,-7.32146 11.4939,-35.54216 -3.77124,-63.05058zm-55.96663,-27.82361c25.36684,0 45.93047,-20.56793 45.93047,-45.93063s-20.56363,-45.93048 -45.93047,-45.93048c-25.36276,0 -45.94283,20.56364 -45.94283,45.93048s20.58006,45.93063 45.94283,45.93063zm31.37788,-94.27703c13.25461,4.88095 5.27805,-7.78414 5.27805,-16.43626s8.1813,-19.23294 -5.27805,-14.92929c-14.12682,4.52865 -25.57977,7.01829 -25.57977,15.68267s11.45296,10.47439 25.57977,15.68288zm-31.29187,-6.16252c8.39418,0 3.70572,-4.25034 3.70572,-9.48752c0,-5.24121 4.70074,-9.47933 -3.70572,-9.47933s-4.01289,4.25037 -4.01289,9.47933c0,5.24941 -4.38142,9.48752 4.01289,9.48752zm-31.47208,6.16252c14.12683,-5.1963 25.57968,-7.02252 25.57968,-15.68288s-11.45285,-11.15402 -25.57968,-15.68267c-13.45937,-4.31592 -5.28221,6.26888 -5.28221,14.92929s-7.98471,21.30898 5.28221,16.43626z", "raph_pen": "m146.83684,115.71881c-0.45042,-0.67755 -1.00925,-1.34163 -1.72177,-1.85109c-3.04871,-2.2215 -7.351,-1.54391 -9.58611,1.52216c-2.23131,3.07336 -1.52603,7.36902 1.52969,9.59677c2.77647,2.01186 6.48155,1.52948 8.8457,-0.83739l-64.87093,89.42747l-20.16745,73.20351l63.32053,-41.89926l144.20293,-198.7902l-43.17049,-31.31054l-13.91629,19.18622c-0.79611,-3.19165 -2.57372,-6.18823 -5.45471,-8.29767c-6.68427,-4.84662 -16.02917,-3.38049 -20.87282,3.3172c-27.75597,38.28942 -12.36926,48.48591 -38.13829,86.73282zm-31.75805,119.69107l-32.57163,21.55399l10.37183,-37.68758l22.19981,16.13359zm38.36887,-121.63963c19.98219,-29.52283 18.07886,-37.52791 35.18015,-63.73244c2.82889,1.94135 6.07655,2.62617 9.2648,2.45808l-44.44495,61.27437z", - "raph_clip": "m254.98035,21.30912c-21.11665,-15.11687 -50.51465,-10.26612 -65.65204,10.86102l-118.72278,165.76295c-10.80711,15.07626 -7.34069,36.07983 7.75584,46.88922c15.09648,10.78922 36.07957,7.32249 46.88668,-7.77365l83.82764,-117.02809l-10.92749,-7.83544l-83.81487,117.03815l0,0c-6.49191,9.03548 -19.08845,11.1275 -28.12135,4.6667c-9.04539,-6.47157 -11.11713,-19.07556 -4.63807,-28.13162l0,0l118.70741,-165.75288l0.01529,-0.01052l-0.02554,-0.01006c10.79433,-15.04511 31.84402,-18.52175 46.89943,-7.74307c15.05548,10.78889 18.53748,31.84415 7.75841,46.89928l0,-0.01001l-130.12462,181.67987l0.01277,0.02063c-15.10905,21.08588 -44.57393,25.95731 -65.66481,10.86099c-21.09067,-15.12738 -25.94428,-44.56136 -10.84798,-65.66789l94.56806,-132.03191l-10.93002,-7.82487l-94.56529,132.03193c-19.45266,27.15742 -13.20177,64.92889 13.96575,84.37384c27.16738,19.46548 64.93915,13.20953 84.39181,-13.93738l130.12166,-181.69052c15.09668,-21.11655 10.25589,-50.49928 -10.87589,-65.63668z", - "raph_tshirt": "m191.01682,41.7402c-6.65135,16.37186 -22.65103,27.93963 -41.39505,27.93963c-18.75568,0 -34.7588,-11.56777 -41.3954,-27.93963l-101.36017,42.98543l28.51685,67.20866l31.32125,-13.28813l0,137.02332l166.93693,0l0,-136.53912l30.19667,12.81158l28.52783,-67.2086l-101.34891,-42.99313z", + "raph_clip": "m254.98035,21.30912c-21.11665,-15.11687 -50.51465,-10.26612 -65.65204,10.86102l-118.72278,165.76295c-10.80711,15.07626 -7.34069,36.07983 7.75584,46.88922c15.09648,10.78922 36.07957,7.32249 46.88668,-7.77365l83.82764,-117.02809l-10.92749,-7.83544l-83.81487,117.03815l0,0c-6.49191,9.03548 -19.08845,11.1275 -28.12135,4.6667c-9.04539,-6.47157 -11.11713,-19.07556 -4.63807,-28.13162l0,0l118.70741,-165.75288l0.01529,-0.01052l-0.02554,-0.01006c10.79433,-15.04511 31.84402,-18.52175 46.89943,-7.74307c15.05548,10.78889 18.53748,31.84415 7.75841,46.89928l0,-0.01001l-130.12462,181.67987l0.01277,0.02063c-15.10905,21.08588 -44.57393,25.95731 -65.66481,10.86099c-21.09067,-15.12738 -25.94428,-44.56136 -10.84798,-65.66789l94.56806,-132.03191l-10.93002,-7.82487l-94.56529,132.03193c-19.45266,27.15742 -13.20177,64.92889 13.96575,84.37384c27.16738,19.46548 64.93915,13.20953 84.39181,-13.93738l130.12166,-181.69052c15.09668,-21.11655 10.25589,-50.49928 -10.87589,-65.63668z", + "raph_tshirt": "m191.01682,41.7402c-6.65135,16.37186 -22.65103,27.93963 -41.39505,27.93963c-18.75568,0 -34.7588,-11.56777 -41.3954,-27.93963l-101.36017,42.98543l28.51685,67.20866l31.32125,-13.28813l0,137.02332l166.93693,0l0,-136.53912l30.19667,12.81158l28.52783,-67.2086l-101.34891,-42.99313z", "ball": "m1.36762,144.54343c-0.61252,-24.33647 11.43968,-48.24649 31.71385,-61.85355c33.0555,-25.12355 76.68359,-36.57172 117.69406,-29.65477c20.30775,-3.13354 29.29549,17.94864 22.15137,34.18353c-11.04268,10.79923 -30.25032,0.52836 -44.5518,6.11385c-46.3661,5.97041 -92.1348,26.12911 -123.47163,61.54787c-0.19116,-3.78908 -5.04203,-6.31387 -3.53584,-10.33693zm0.56006,21.59657c2.46893,-17.16783 19.59014,-26.10648 31.49495,-36.53964c40.07716,-28.36518 90.31613,-39.61352 138.89854,-37.70576c1.20387,19.56051 -8.00084,38.23036 -19.07559,53.7263c-15.20721,8.47826 -34.11861,-1.17561 -50.23914,6.54221c-28.27367,6.8441 -59.74523,15.46761 -77.84163,40.11734c-6.57559,19.79451 -20.47401,-0.35286 -21.54921,-12.00313c-1.52846,-4.62877 -1.3158,-9.384 -1.6879,-14.13731zm7.76269,-58.70418c2.42006,-21.53997 16.61662,-39.35048 29.64042,-55.76294c14.68114,-17.49181 34.66698,-30.31521 57.12629,-35.01287c17.80165,-4.64955 36.14864,-6.58389 54.39959,-8.53692c13.84103,10.63111 22.64574,29.11792 20.32661,46.60463c-10.75017,2.72292 -29.7578,-6.48294 -44.25362,-4.23798c-41.11142,0.38721 -83.13954,16.86419 -110.9226,47.60359c-2.31326,2.96635 -4.3931,6.11006 -6.31669,9.34248zm-2.20363,84.97105c15.37329,12.3277 15.8773,33.69405 25.32488,49.77684c-11.32475,-14.57886 -21.29314,-31.61081 -25.32488,-49.77684zm12.17333,11.7446c4.82258,-13.28815 19.94093,-31.96367 32.55468,-30.57486c5.04242,12.98813 7.22698,27.06129 15.42273,38.77007c22.00548,40.39473 62.27551,75.33984 110.15025,76.43997c7.82913,1.58691 28.58411,-3.6853 27.74063,-1.50394c-20.00963,9.82742 -43.17618,11.98239 -65.22374,11.19174c-40.94611,-2.71915 -81.7309,-22.38535 -106.34646,-55.65858c-6.96676,-11.95032 -10.92698,-25.33659 -14.29809,-38.66251zm33.70255,-33.88084c11.04849,-5.13829 31.74819,-20.7682 40.05036,-8.17067c20.26116,39.90601 54.51507,73.83781 96.68548,89.7942c21.8947,7.30453 46.52556,7.18939 67.87685,-1.92662c-8.90472,13.82597 -23.64018,22.69292 -37.52655,30.83714c-35.49046,15.14874 -78.39111,6.93469 -108.29421,-16.68286c-28.94243,-22.9118 -51.66176,-55.70389 -58.71476,-92.285l-0.04169,-0.84726l-0.03548,-0.71893l0,0l0,0zm14.80587,-143.69432c26.85995,-18.47492 60.14433,-27.13922 92.60995,-24.83766c-16.61871,10.60714 -37.47179,6.57748 -55.695,12.32051c-12.71339,2.76803 -25.33243,6.4903 -36.91495,12.51714zm23.19239,130.17215c17.68391,-8.37067 37.80864,-8.2348 56.92004,-7.08942c11.52194,17.94525 19.73788,38.80402 37.6284,51.74121c20.84937,18.617 51.18832,23.87227 77.45898,15.12419c9.02167,-6.09496 19.03778,-2.20023 14.1109,9.88971c-5.93085,20.07378 -26.98962,28.88977 -46.28781,29.86346c-39.48146,3.94382 -75.60028,-18.48682 -102.27098,-45.57831c-15.55914,-15.57706 -28.70033,-33.74123 -37.55954,-53.95085zm59.9713,-149.25921c14.39017,-11.41684 33.98842,-1.08634 48.71259,4.37706c14.6449,12.52997 16.60739,33.37817 20.47758,51.17717c6.47049,41.78263 3.85324,86.6684 -15.69031,124.8082c-4.67027,13.36929 -18.09242,20.61154 -26.69522,6.15724c-9.99724,-11.02568 -17.64142,-23.85532 -24.85538,-36.77173c-4.26648,-12.35977 9.69913,-21.07201 12.62395,-32.37317c5.6987,-11.2672 7.1479,-23.94022 7.7876,-36.27168c2.68518,-18.44756 0.04341,-37.58501 -4.80806,-55.44724c-3.40224,-9.88385 -8.92734,-19.45691 -17.55275,-25.65586zm41.36089,197.33399c28.32747,-32.0033 32.81847,-77.44762 30.6862,-118.36129c-1.29825,-24.12249 -4.96657,-49.05092 -17.68674,-70.0582c13.14473,0.40704 27.28206,12.75397 37.58124,21.8466c29.18982,37.11403 37.77368,91.40852 15.58273,134.05255c-8.72922,17.24329 -20.55305,32.80717 -34.43375,46.22929c-11.62009,-0.9548 -23.39864,-5.3515 -31.72969,-13.70895zm32.30334,13.89389c30.50691,-29.40305 52.59978,-71.66214 46.00664,-114.99303c-2.62479,-20.29454 -10.03497,-39.89902 -21.13239,-57.06778c20.32477,12.66527 31.62595,35.09759 41.79111,55.93748c14.61285,36.42265 6.66864,80.8159 -19.44537,109.92648c-13.41086,7.60643 -32.33356,8.77071 -47.21999,6.19685zm50.22404,-6.80072c10.46527,-18.28113 22.34006,-36.81323 23.43076,-58.50224c1.62656,-7.25171 -0.89633,14.22787 -1.77191,18.74721c-2.78329,15.96013 -6.41766,32.99399 -16.3092,46.01608c-2.27573,-1.26239 -1.2605,-7.4102 -5.34964,-6.26105z", "bolt": "m178.14388,74.00616l-108.49727,68.79685l107.15599,23.63498l-99.04335,73.85934l-39.98779,-12.47227l28.36194,71.19228l112.7131,-31.06076l-47.58928,-12.98325l129.22581,-106.08589l-118.12698,-19.22734l114.07071,-71.6874l-65.0681,-10.76349l70.86891,-45.56109l-26.03423,-0.65478l-109.97452,62.50492l51.92505,10.50792z", "car_smart": "m28.92024,238.37814c-20.54175,-8.15092 -27.36674,-32.3504 -27.6178,-52.52942c-2.7836,-14.94118 14.71887,-25.93048 8.95686,-41.2937c-2.18657,-22.71175 4.68564,-45.20703 14.9548,-65.22043c0.32475,-12.85873 10.87969,-17.84956 22.37955,-17.11762c37.15603,-4.71741 74.98359,-4.84966 112.15372,-0.39277c22.18198,4.11681 39.85953,19.32546 58.61859,30.81274c11.63586,8.63808 25.21985,14.32888 36.92355,22.63131c12.64026,10.62529 24.51556,22.47708 33.27448,36.57193c3.15143,14.09033 7.38165,28.09947 9.54742,42.2829c4.39661,13.27223 -4.6037,21.62047 -11.41214,30.84103c-10.34,12.57306 -29.90723,17.53416 -44.71561,10.78313c-10.28528,-3.75465 -14.07077,-19.70746 -25.7968,-18.60466c-44.20906,-0.65964 -88.41812,-1.31926 -132.62719,-1.97884c-10.24168,13.44736 -24.40165,28.14365 -42.91705,26.05086c-4.02312,-0.33679 -7.97831,-1.33774 -11.7224,-2.83646z", @@ -19,7 +19,7 @@ "dagger": "m1.57422,47.21264c-2.775,14.24454 5.08469,27.79975 11.2199,40.10517c13.07098,21.70464 28.2358,42.59465 47.26681,59.46329c12.98537,10.6889 24.68548,22.99878 39.38902,31.4678c19.22253,12.95224 39.86254,23.55869 61.26455,32.3793c15.9138,6.93546 32.60274,11.85577 49.65401,15.08282c4.95967,1.28564 18.82625,4.91663 10.19991,-3.60251c-7.15544,-3.02133 -14.76756,-5.22583 -21.96236,-8.37695c-34.92769,-14.34082 -72.04247,-26.94104 -100.21951,-53.10463c-4.66899,-6.20064 8.95855,3.3492 11.3067,5.96803c23.50703,16.73581 50.36192,27.95749 76.84653,39.04178c13.47301,4.46384 28.20039,13.97903 42.51408,7.22675c12.36502,-4.72467 -2.95702,-5.44891 -8.42033,-7.24844c-24.28337,-6.90491 -48.85286,-13.54227 -71.13893,-25.76019c-12.72568,-4.65573 -23.42126,-13.22678 -34.85331,-20.29132c-12.35065,-8.53128 -23.65424,-18.49934 -35.67798,-27.49634c-7.86864,-5.96642 -15.68669,-11.98865 -22.20108,-19.46664c-11.01625,-11.02383 -21.70009,-22.36108 -31.68482,-34.33246c-6.52307,-7.36439 -13.86146,-14.10685 -18.44664,-22.93894l-5.05655,-8.11652zm256.45175,139.13108c-1.50562,-0.04745 -3.06,0.28214 -4.36211,1.15021c-9.72246,4.86124 -7.63908,13.88922 -13.19478,20.83386c-4.16678,5.55569 -9.028,8.33356 -15.97261,10.41693c1.38892,2.77783 4.16675,6.94461 4.16675,10.41693c0,7.63907 -9.02798,14.58368 -15.97261,13.88922c-2.77786,-0.69446 -9.028,-4.16678 -11.11139,0c-0.69446,1.38895 -0.69446,2.77786 0,3.47232c0,2.77786 3.47231,4.16678 6.25015,5.55569c7.63908,2.08337 15.97263,-0.69446 22.22279,-4.86124c4.86122,-2.77783 8.33353,-7.63907 9.72246,-13.19479l1.38892,-9.02798c0.69446,-2.77783 3.47232,-3.47232 6.94463,-8.33353c4.16676,-5.55569 8.33354,-15.2782 13.88924,-19.44495c2.08337,-1.38892 4.16675,-2.0834 6.94461,-2.77786c-1.38892,-2.08337 -2.77786,-3.47229 -4.16678,-5.55566c-1.38892,-0.69449 -2.77783,-2.0834 -4.16675,-2.0834c-0.78128,-0.26041 -1.6792,-0.42728 -2.58252,-0.45575zm29.4061,26.21594c-2.61084,-0.02899 -5.33868,0.54254 -8.07312,1.32382l5.55569,3.47232c-1.38895,2.77783 -4.86121,8.33353 -4.16678,11.80585c0.69449,6.94461 10.41693,6.94461 14.58371,2.77783c4.86124,-5.55569 4.86124,-13.88922 -2.08337,-18.056c-1.82297,-0.91147 -3.78549,-1.30127 -5.81613,-1.32382zm-13.39011,3.40723c-0.54364,0.00192 -1.07498,0.00705 -1.60593,0.0217c-3.8486,0.21091 -7.69568,0.50116 -11.54541,0.67276c-2.41867,0.03116 -4.88754,-0.00473 -7.22676,0.69446c-3.17285,2.02515 -5.29396,5.38272 -6.53229,8.87607c-0.16666,0.50345 -0.30807,1.02072 -0.41234,1.54083c3.86218,1.74924 8.17189,1.5618 12.30499,1.41064c2.50439,-0.06696 5.00949,0.24561 7.50888,0.36893c1.7876,0.07916 3.57104,0.32327 5.36038,0.26044c2.19412,-0.07278 4.22598,-1.3168 5.38205,-3.16849c0.99927,-1.58255 1.9447,-3.21933 2.56085,-4.99146c0.49768,-1.59048 0.5896,-3.80087 -1.06339,-4.75272c-1.43857,-0.79446 -3.10013,-0.93906 -4.73105,-0.93317zm2.53915,15.9726c-0.69449,0.69446 -1.38892,0.69446 -2.0834,1.38892c-0.69446,3.47232 8.33356,11.80588 9.72247,4.16678c-3.47232,-1.38892 -5.55573,-2.77786 -7.63907,-5.55569z", "menorah": "m86.17095,270.72717c9.02267,-23.09398 33.59461,-36.70894 57.45916,-38.45409c0,-4.91623 0,-9.83244 0,-14.74866c-38.305,-2.75075 -76.20534,-18.86525 -101.66333,-48.29793c-23.2569,-24.97108 -35.58256,-58.55817 -37.27682,-92.42073c-13.45491,-9.58464 12.56556,-16.55834 15.7355,-5.95607c-7.24909,8.79617 -0.22592,22.59306 0.80432,33.36646c11.47956,50.91395 56.38975,91.60496 107.78628,98.82449c13.14264,5.82442 16.6395,-2.00252 14.39308,-13.99509c2.81267,-9.48175 -7.44086,-6.60333 -13.57417,-8.37358c-40.52152,-7.1041 -75.7263,-38.65041 -86.11595,-78.75394c-2.97659,-11.47399 -3.94458,-24.11363 -7.5694,-33.51495c7.70256,-6.02401 26.19639,-1.60448 15.97076,9.15671c1.09565,45.56244 38.91488,85.76277 83.65269,91.48959c9.24995,4.52249 8.18915,-3.21457 7.85701,-9.40932c4.90146,-15.06035 -9.71606,-12.79654 -19.53952,-16.50067c-27.62657,-9.39215 -47.87568,-36.35101 -49.79039,-65.51331c-13.2153,-11.51691 15.74928,-17.53994 15.95383,-5.55531c-7.59098,8.84892 0.96818,23.21689 5.54156,32.6564c10.3335,16.84724 28.24842,28.22102 47.83452,30.47823c0,-7.52246 0,-15.04491 0,-22.56738c-18.20905,-2.81535 -32.7534,-18.72141 -34.8131,-36.97318c-12.40635,-10.10166 14.58986,-14.97282 16.53119,-5.29626c-6.736,5.28018 -1.66743,13.75206 2.28733,19.47478c2.82583,3.38407 16.81124,15.16281 15.99458,6.28913c0,-10.03232 0,-20.06463 0,-30.09695c-8.52963,-5.41637 3.21713,-9.02356 -1.91258,-15.41792c2.95047,-6.63559 4.28693,-23.79965 6.49635,-24.00391c7.40089,10.5439 4.63795,25.17949 11.62167,34.34932c-3.85376,4.14688 -4.52328,8.74758 -3.86568,14.89357c0,8.05796 0,16.11592 0,24.17388c11.03737,-3.24367 21.02812,-12.42406 21.72646,-24.48188c-12.61211,-14.80839 30.69243,-11.52931 12.71999,1.59949c-1.87195,17.85434 -17.0993,32.57059 -34.44644,35.57887c0,7.49281 0,14.98562 0,22.47842c29.68999,-2.98224 55.87296,-29.1582 56.39926,-59.47436c-12.36238,-13.6567 27.91393,-12.75137 14.12813,-0.52898c-3.16423,14.80594 -6.23018,30.54218 -16.29872,42.63571c-12.70108,17.1765 -33.04718,27.37456 -53.98901,29.78134c0.16994,9.14496 -4.65584,28.46082 11.13493,20.75519c39.31322,-6.69104 72.74197,-39.63307 78.74797,-79.43351c5.73982,-8.84732 -8.70837,-25.00382 8.28397,-22.77648c10.50046,-2.44997 11.98193,6.34405 5.8692,11.72792c-2.04736,35.89314 -21.91298,70.45303 -53.09749,88.60141c-15.52945,9.13074 -33.16388,14.88533 -51.17824,15.85547c0.17836,7.53169 -0.4761,15.16116 0.61618,22.6142c35.31798,-2.81911 70.08339,-18.10321 93.11932,-45.67516c20.51892,-23.04272 31.08511,-53.43816 32.84753,-84.00375c-10.43478,-10.04525 11.39471,-11.61442 16.59445,-7.04305c-5.883,11.66189 -5.21661,27.04671 -9.11984,40.52295c-12.68921,53.08224 -58.41412,95.84925 -111.85593,105.51876c-7.32545,1.56883 -14.77785,2.36348 -22.20172,3.29227c-0.71042,9.09981 -0.50818,18.35449 11.59822,16.61531c20.59241,4.32626 40.36211,18.55411 46.94081,39.19469c-43.09088,0 -86.18179,0 -129.2727,0c0.31159,-0.88608 0.62314,-1.77219 0.93477,-2.65823zm-82.88959,-208.5947c-0.54892,-8.1144 4.33617,-25.42208 5.66115,-27.43132c2.27143,7.42761 12.58555,23.78434 4.72879,28.60384c-3.29131,-0.38358 -8.04816,1.57556 -10.38994,-1.17252zm34.52483,0.55147c-1.7146,-10.01769 5.4567,-19.41309 4.51432,-29.75311c3.2196,8.43034 16.36395,29.47998 1.96646,30.42084c-2.16732,-0.0773 -4.38702,0.03559 -6.48078,-0.66772zm35.62526,-0.17229c-1.52428,-9.82734 5.20364,-19.12723 4.61758,-29.264c3.98769,8.50923 17.39558,32.7104 -0.82941,30.07944l-1.91212,-0.12625l-1.87605,-0.68919l0,0zm34.60818,0.26421c-1.9521,-10.01891 5.40411,-19.48301 4.43661,-29.84504c3.27068,8.4848 16.29427,29.36411 1.98981,30.63179c-2.15335,-0.08198 -4.37302,0.0215 -6.42642,-0.78675zm69.2087,-0.38279c-1.5544,-10.07727 5.31645,-19.6095 4.34973,-30.05398c2.70531,5.08463 6.32187,13.73424 7.91895,20.50951c4.77353,11.03205 -3.95122,12.51878 -12.26868,9.54446zm35.71176,0.44493c-2.89404,-9.75608 5.30412,-19.55815 4.07715,-29.90718c3.42241,8.32418 12.40758,23.15913 6.53528,30.337c-3.53609,0.01955 -7.13571,0.41735 -10.61243,-0.42982zm34.8703,-0.20629c-2.23303,-8.13288 4.34842,-24.82986 5.07388,-28.23849c3.49849,8.39077 16.5291,33.58521 -2.7937,28.93562l-2.28018,-0.69713l0,0zm35.10023,-0.15336c-1.90784,-8.93159 5.20419,-21.786 4.83258,-28.71239c3.47043,8.02287 16.97986,32.30244 -0.94669,29.60343l-1.89111,-0.14957l-1.99478,-0.74147l0,0z", "chair": "m118.11539,289.55515c-7.47328,-14.4328 15.76004,-21.83389 9.75156,-35.26642c-9.58212,-8.59285 -23.93785,-6.58557 -35.88018,-5.92961c-12.89955,-1.58955 -16.67669,11.62587 -24.11323,17.11729c-14.66394,-4.57965 -9.41961,-23.5907 3.95336,-25.69879c17.48831,-7.56879 36.79559,-3.21786 54.96046,-6.57193c13.14571,-7.65541 -3.09947,-24.09541 -13.42245,-25.84244c-17.08451,-6.9008 -38.18468,-7.0844 -51.24073,-21.62146c-5.1916,-11.32457 -3.84497,-32.04767 10.15321,-36.01445c6.34414,-10.73523 5.01785,-24.55999 3.35027,-36.47948c1.42348,-12.67513 -26.70474,-5.25126 -14.90233,-18.24577c10.64336,-8.15804 24.36629,-13.15867 37.81105,-12.959c10.96933,0.36309 11.71716,12.99065 -0.37628,9.89848c-12.30081,6.18077 -7.72121,23.86169 -7.25122,35.16668c5.93514,11.39347 22.04794,5.36764 32.49831,7.07384c14.8665,0.39955 21.73593,0.44463 35.83476,5.23605c14.25958,-1.05464 8.64325,-20.61657 0.17079,-21.97119c-13.03212,-2.87206 -25.91483,-10.25501 -33.20317,-21.62909c-4.07215,-13.26593 1.69855,-27.24597 4.77583,-40.18096c9.18196,-28.0861 34.13237,-54.57027 65.33606,-54.63913c19.15414,0.28833 38.85675,14.48402 42.13089,33.82922c2.48616,20.34066 -5.57245,41.0622 -0.32005,61.11538c12.75343,7.04288 -8.70227,17.78406 -9.16336,27.50478c-5.43883,14.13736 6.97403,30.55498 -3.65417,43.29654c-6.64983,9.38159 -22.16026,14.5639 -22.43275,27.04953c-3.81845,11.24202 -21.47061,10.39703 -30.28923,17.71931c-9.74564,2.86838 -15.08257,19.17726 -0.15649,15.9317c14.55153,-0.35892 29.03516,-5.81784 43.55118,-3.3181c10.39314,7.10063 -0.45073,21.22018 -10.9113,14.54475c-5.46445,0.08383 -25.63857,2.80356 -18.76688,8.69054c17.18895,4.015 35.8273,9.2104 46.95854,24.0352c10.43184,13.90863 -12.73763,17.22995 -17.34935,5.0022c-19.29245,-15.75378 -48.30531,-24.24933 -70.97163,-10.48508c-13.71143,5.73386 -10.53542,20.53958 -11.98199,31.56015c-5.57972,6.09451 -13.26627,-2.5275 -14.84946,-7.91876zm100.26077,-153.99353c-4.62421,-8.64436 -27.69229,-17.16811 -30.82967,-4.71919c1.76141,12.68575 19.62196,15.68971 29.15408,10.51048c1.73547,-1.32053 2.45361,-3.74493 1.67558,-5.79129z", - + "bone": "m273.3559,119.27242c-11.58661,5.90293 -23.89537,9.95385 -36.67676,12.27164c-53.42084,0.2984 -105.13121,0.41397 -158.74251,2.97562c-14.28426,-2.65407 -30.58815,0.18161 -42.82426,-9.13783c-9.06827,-7.25944 -28.17529,-2.4415 -25.05096,11.36483c6.17649,14.08824 -14.61965,21.70474 -7.59176,36.00003c6.11589,14.67987 24.54805,9.02721 35.59484,4.1729c20.29636,-4.79665 40.55842,-9.8537 60.92737,-14.38416c42.52868,-4.82219 82.54949,-1.83121 124.59118,1.02063c11.68694,2.54654 23.55803,4.03351 35.45654,5.38187c10.1839,0.16006 18.34979,7.46698 27.92017,8.65919c12.6539,-1.22533 16.41983,-19.19981 7.59747,-27.17406c-13.18918,-8.72406 6.75436,-24.14882 -8.14166,-31.38885c-4.25287,-2.31086 -8.733,-0.75754 -13.05966,0.23817z", "raph_gear2": "m162.95016,254.38129c-2.80937,0.26439 -5.68164,0.44717 -8.63573,0.44717l0,0c-2.64238,0 -5.20918,-0.14467 -7.71307,-0.35916l0,0l-21.68047,27.86606l-5.33187,-1.51157c-6.25791,-1.75732 -12.33638,-3.96201 -18.18163,-6.60748l0,0l-5.06733,-2.29276l1.30382,-35.00255c-4.60764,-3.22517 -8.90648,-6.81548 -12.88757,-10.75204l0,0l-34.27816,7.36342l-3.13052,-4.59854c-3.67223,-5.39792 -6.80273,-11.05444 -9.57725,-16.77345l0,0l-2.40936,-4.99521l23.2742,-25.7621c-1.45512,-5.4549 -2.41877,-11.08614 -2.91638,-16.82405l0,0l-30.84222,-16.30753l0.56056,-5.52432c0.66148,-6.60759 1.94003,-12.93144 3.46751,-19.00977l0,0l1.36378,-5.39204l34.401,-4.76184c2.45332,-5.17765 5.34148,-10.08439 8.59473,-14.69526l0,0l-13.12671,-32.31919l3.96201,-3.8801c4.65784,-4.53519 9.64348,-8.64822 14.84618,-12.40874l0,0l4.50686,-3.24997l29.69582,18.65062c5.00454,-2.30524 10.23878,-4.20122 15.66204,-5.65638l0,0l10.76474,-33.40262l5.54927,-0.4219c2.98885,-0.22039 6.20128,-0.47875 9.69389,-0.47875l0,0c3.48323,0 6.68608,0.25836 9.67506,0.47875l0,0l5.54912,0.4219l10.88121,33.74931c5.21544,1.45478 10.27031,3.31305 15.11414,5.56818l0,0l30.11157,-18.91571l4.52254,3.25032c5.20284,3.75422 10.19766,7.8798 14.84639,12.39616l0,0l3.97758,3.8801l-13.52985,33.27679c2.94791,4.28308 5.60591,8.81837 7.87672,13.58657l0,0l35.47502,4.91299l1.37939,5.39169c1.54953,6.07229 2.82196,12.39613 3.46741,19.01633l0,0l0.56073,5.52397l-31.91942,16.87434c-0.47862,5.23462 -1.32898,10.3871 -2.59824,15.40709l0,0l24.04893,26.56871l-2.41867,5.01361c-2.76517,5.73837 -5.88004,11.41356 -9.56799,16.79272l0,0l-3.13049,4.58539l-35.12848,-7.52676c-3.72264,3.72243 -7.75381,7.14909 -12.06235,10.24184l0,0l1.33846,35.68912l-5.07996,2.29913c-5.85167,2.6329 -11.92058,4.84381 -18.17828,6.6012l0,0l-5.351,1.51169l-21.72769,-27.93539l0,0zm27.87856,8.93823c1.87401,-0.62378 3.71637,-1.29791 5.53973,-2.01599l0,0l-1.25342,-33.70486l3.95258,-2.53862c5.92082,-3.84203 11.31258,-8.453 16.09976,-13.68709l0,0l3.18718,-3.48941l33.239,7.11739c0.99838,-1.66928 1.96515,-3.37619 2.89732,-5.12077l0,0l-22.73553,-25.13866l1.41093,-4.49123c2.00607,-6.46886 3.14622,-13.40402 3.48315,-20.64091l0,0l0.20787,-4.71185l30.19965,-15.961c-0.31488,-1.93385 -0.67691,-3.85492 -1.0896,-5.78259l0,0l-33.60109,-4.64815l-1.80759,-4.34639c-2.7023,-6.50063 -6.27693,-12.58513 -10.54437,-18.19731l0,0l-2.82191,-3.74155l12.78032,-31.43731c-1.48026,-1.29786 -2.99829,-2.5574 -4.55721,-3.77935l0,0l-28.5273,17.90761l-4.2014,-2.2175c-6.22311,-3.27536 -12.95352,-5.76342 -20.05234,-7.37577l0,0l-4.59178,-1.0518l-10.30167,-31.94773c-1.00163,-0.05022 -1.97475,-0.07566 -2.92271,-0.07566l0,0c-0.96696,0 -1.94005,0.02544 -2.94794,0.07566l0,0l-10.22914,31.73996l-4.65805,0.99522c-7.22169,1.54925 -14.10935,4.07524 -20.52469,7.39468l0,0l-4.19198,2.17928l-28.06441,-17.62396c-1.54948,1.22195 -3.07073,2.48149 -4.53823,3.77935l0,0l12.44003,30.61225l-2.9225,3.74755c-4.55724,5.8516 -8.34605,12.26398 -11.18684,19.14856l0,0l-1.79825,4.3651l-32.5209,4.49724c-0.41253,1.92767 -0.77778,3.84874 -1.08328,5.78259l0,0l29.15414,15.41315l0.17944,4.74907c0.30542,7.66602 1.58731,15.02303 3.79182,21.90135l0,0l1.44259,4.52234l-22.01771,24.35774c0.92602,1.75093 1.88968,3.45782 2.89761,5.127l0,0l32.33173,-6.96017l3.21879,3.48952c4.96029,5.42989 10.62607,10.14755 16.86828,14.06561l0,0l4.02816,2.51289l-1.23148,33.18852c1.82667,0.71808 3.67535,1.39221 5.54923,2.01599l0,0l20.46497,-26.31657l4.67366,0.57292c3.52736,0.4473 6.96019,0.73706 10.37738,0.73706l0,0c3.67532,0 7.3821,-0.32111 11.17093,-0.85657l0,0l4.71475,-0.66118l20.62231,26.52434l0,0zm9.32855,-68.34235l4.50986,6.92841l-28.59032,18.60074l-10.14731,-15.61513l0,0c-3.69124,0.90065 -7.5713,1.43016 -11.60878,1.43016l0,0c-27.93851,0 -50.57646,-22.64441 -50.57646,-50.55453l0,0c0,-27.93514 22.63795,-50.5733 50.57646,-50.5733l0,0c27.90698,0 50.55104,22.63816 50.55104,50.5733l0,0c0,11.46997 -3.85472,22.09612 -10.31726,30.58083l0,0l5.60277,8.62953m-19.23358,2.66414l0.89128,-0.56667l-8.15065,-12.54086l4.72406,-4.72429c6.17615,-6.1917 9.96483,-14.63838 9.96483,-24.04268l0,0c-0.03468,-18.80183 -15.2589,-34.02641 -34.03877,-34.064l0,0c-18.8241,0.0376 -34.03256,15.24316 -34.06407,34.064l0,0c0.03151,18.78311 15.25571,34.00732 34.06407,34.04527l0,0c4.20117,0 8.24515,-0.86304 12.15982,-2.36212l0,0l6.24211,-2.39357l8.20732,12.58492l0,0z", "raph_gear": "m245.88898,160.48737l33.405,-17.66776c-0.65668,-6.5461 -1.92581,-12.89622 -3.51349,-19.1387l-37.10818,-5.13857c-3.21184,-7.73717 -7.45319,-14.91318 -12.43881,-21.50042l14.14514,-34.78872c-4.65118,-4.53608 -9.67427,-8.67167 -14.96115,-12.47703l-31.50966,19.78136c-7.38905,-3.88574 -15.35004,-6.83701 -23.70718,-8.73246l-11.3871,-35.2773c-3.22949,-0.24387 -6.45805,-0.50152 -9.75151,-0.50152s-6.51289,0.2517 -9.75209,0.50152l-11.27429,34.96482c-8.58116,1.83471 -16.71793,4.82026 -24.29691,8.75396l-31.01895,-19.49038c-5.28019,3.80536 -10.30307,7.94096 -14.95388,12.47703l13.75587,33.82779c-5.36137,6.87132 -9.85005,14.45284 -13.22145,22.62391l-35.93671,4.97007c-1.58098,6.23371 -2.85675,12.5771 -3.50667,19.13792l32.25408,17.06512c0.36542,8.98315 1.85477,17.68929 4.49208,25.88777l-24.33074,26.9024c2.83031,5.87039 5.9814,11.56342 9.6267,16.90457l35.82153,-7.69016c5.87321,6.39034 12.56474,11.98932 19.94749,16.61948l-1.35777,36.65076c5.88309,2.65335 11.99571,4.87399 18.29496,6.64899l22.66223,-29.13004c4.02098,0.51334 8.09276,0.85909 12.24583,0.85909c4.49908,0 8.89894,-0.40645 13.22795,-1.00122l22.78024,29.29164c6.30914,-1.77295 12.41245,-3.99347 18.29494,-6.64697l-1.38397,-37.30896c7.03673,-4.55559 13.41745,-10.00571 19.04277,-16.15907l36.75313,7.88618c3.64532,-5.34033 6.79684,-11.0273 9.62613,-16.9026l-25.11879,-27.78322c2.41295,-7.76558 3.76083,-15.96324 4.15324,-24.41928zm-55.52159,42.4395l-15.83789,10.31044l-9.74136,-14.9669c-5.0676,1.94922 -10.52345,3.13446 -16.2748,3.13446c-25.11868,0 -45.47503,-20.36435 -45.47503,-45.47913c0,-25.1158 20.35635,-45.47227 45.47503,-45.47227c25.11212,0 45.47591,20.35647 45.47591,45.47227c0,12.5506 -5.08424,23.89621 -13.30255,32.12807l9.68069,14.87306z", @@ -27,4 +27,4 @@ "raph_hammer": "m63.36809,285.67313c6.96776,3.59244 16.47661,11.9801 23.84013,8.91132c4.83001,-1.9863 7.65633,-13.23322 10.6572,-19.15341c22.58896,-44.50285 47.13901,-95.11987 65.00839,-138.42389c0,-1.93199 1.02618,-3.42567 -0.49857,-6.05217c9.99582,-16.27104 16.78117,-34.14814 27.70221,-52.25417c3.45876,-5.75348 6.97752,-13.7377 11.82889,-16.03837l8.95993,-3.73985c11.39044,-2.92912 19.71024,-2.82827 27.65184,4.81071c4.0269,3.89508 5.87952,10.31972 9.77467,14.18769c2.63412,2.64196 12.67062,9.14025 16.40283,8.13548c2.89996,-0.78365 5.28986,-3.70498 7.32275,-7.40622l7.07837,-13.07806c1.98428,-3.72042 3.11331,-7.30138 2.18805,-10.16062c-1.19101,-3.68168 -12.12384,-8.54287 -15.78421,-9.30328c-5.37122,-1.15219 -11.73761,0.82254 -17.20779,-0.41896c-10.75037,-2.47131 -15.38852,-9.37697 -19.15163,-20.54245c-26.52289,-15.59208 -62.23056,-25.72946 -103.80629,-12.65136c-11.27793,3.54983 -22.08852,6.24227 -29.50239,13.45449c-1.48589,4.18987 1.45297,5.02407 4.53523,4.97355c-2.41113,2.19592 -6.30618,3.46841 -4.05797,8.62437c25.3744,-11.6543 74.64912,-15.68129 77.99525,8.17434c0.73132,5.31115 -4.01729,12.62416 -6.93675,18.66467c-9.2043,19.05656 -20.45122,34.51673 -28.60803,51.77705c-3.03192,0.17072 -3.72249,1.82726 -5.34029,2.91743c-26.48211,38.64464 -55.43742,86.86412 -80.34243,130.11772c-3.31706,5.75339 -11.16743,14.25751 -10.19173,19.38232c1.46458,7.8407 13.51648,11.49146 20.48232,15.09167z", "raph_lock": "m222.74843,140.97418l0,-31.60164l-0.00876,0c-0.01239,-39.003 -31.62297,-70.60465 -70.62114,-70.60465s-70.62597,31.6186 -70.62597,70.62157l0,0l0,31.58472l-25.54068,0l0,135.66266l192.32891,0l0,-135.66266l-25.53236,0zm-118.94279,-31.58472c0,0 0,0 0,0c0,-26.65088 21.67455,-48.3259 48.3129,-48.3259c26.65535,0 48.32988,21.67502 48.32988,48.30898c0,0 0,0 0,0l0,31.60164l-96.64278,0l0,-31.58472z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael.txt b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael.txt index b688327..0cd8be2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael.txt +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael.txt @@ -9,4 +9,4 @@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -The software is provided 鈥渁s is鈥�, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. \ No newline at end of file +The software is provided 鈥渁s is鈥�, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael_1.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael_1.json index a153e64..89e4ab6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael_1.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/raphael_1.json @@ -4,4 +4,4 @@ "raph_quote": "M14.505,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.128,0,2.07,0.411,2.826,1.229c0.756,0.82,1.134,1.832,1.134,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.259,0.443-4.327,1.332-6.203c0.888-1.875,2.243-3.57,4.067-5.085c1.824-1.514,2.988-2.272,3.492-2.272c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L14.505,5.873zM27.465,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.104,0,2.04,0.411,2.808,1.229c0.769,0.82,1.152,1.832,1.152,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.284,0.449-4.369,1.35-6.256c0.9-1.887,2.256-3.577,4.068-5.067c1.812-1.49,2.97-2.236,3.474-2.236c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L27.465,5.873z", } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/social.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/social.json index d8d8026..b87a204 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/social.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/social.json @@ -14,4 +14,4 @@ "logo_apple": "M21.367,4.494c-3.318,0.611-4.42,3.39-4.463,4.979c1.824,0.132,2.967-0.899,3.432-1.502 C21.097,7.115,21.281,5.91,21.367,4.494z M21.775,9.983c-2.399,0-3.739,0.98-4.398,0.991c-0.759-0.059-2.967-0.947-4.255-0.961 c-4.51,0.134-5.8,5.035-5.744,7.142c0.367,8.065,5.289,10.148,6.093,10.343c0.646,0.127,2.821-0.995,4.42-0.943 c1.747,0.182,2.969,0.905,3.669,0.855c0.889-0.062,3.783-2.4,4.656-6.007c-1.758-1.487-2.844-2.836-2.941-4.114 c-0.046-0.579,0.825-3.85,2.212-4.769c0.2-1.13-1.86-2.564-3.476-2.532C21.931,9.985,21.853,9.983,21.775,9.983z", "raph_feed": "M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/symbol.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/symbol.json index 8456002..a8bd0a2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/symbol.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/symbol.json @@ -32,4 +32,4 @@ "skull": "m74.9404,81.44109c-2.88919,16.35929 -10.26919,31.99403 -10.76614,48.86361c0.66122,9.76746 -5.89156,15.01402 -14.86213,14.8293c-9.64813,10.00099 1.19087,25.80647 12.10749,29.84357c11.14103,7.47832 24.96226,-0.87791 35.99846,5.83044c14.65424,11.4554 20.77205,31.76607 15.71635,49.57211c-5.02672,14.69893 20.70476,9.35306 11.02628,-2.39693c-7.47506,-11.48471 14.09103,-7.68764 8.56998,3.21603c-1.04326,8.75262 6.45616,11.58562 3.11867,20.06531c8.69472,4.98558 -0.72885,7.77708 -6.02475,8.71843c-12.40178,6.18225 2.24324,-11.07452 -7.58144,-16.17874c-8.99694,1.95532 -2.90059,17.02136 -5.98875,15.28125c-6.3575,-4.97824 -6.35281,-23.59047 -17.02285,-11.44621c-3.54128,-14.96387 2.92009,-30.54814 -2.05737,-45.42514c2.03897,-11.11034 -15.50281,-14.9426 -13.28409,-2.05647c0.88449,19.66696 -5.0876,39.29475 -1.66005,58.86481c4.72071,12.07065 17.92378,17.50833 26.2104,26.82291c6.80557,7.18207 15.6284,14.86087 26.22089,12.5997c12.0141,-0.52078 24.05035,-1.63034 36.01024,0.2771c15.04311,0.47446 26.52666,-11.41623 39.36443,-17.5242c15.0918,-11.98355 12.71564,-33.38867 11.21118,-50.43889c-1.84476,-10.52664 2.20334,-21.05807 1.44894,-31.48618c-10.88037,-13.31276 -19.80722,10.08708 -16.70779,20.14043c-0.00076,12.64635 2.42783,28.93701 -9.63577,37.17496c-9.95572,-0.25104 -19.43069,3.36517 -29.4632,1.4744c-8.14081,4.83435 -21.32692,4.71021 -24.01404,-6.79811c-1.07281,-10.22015 3.55807,-20.93494 -2.73401,-30.47318c5.52835,4.7614 15.17361,-4.11226 9.79822,6.56248c-6.55643,8.68922 5.55173,22.07874 10.10989,9.25331c1.51227,-8.60512 -6.54141,-20.02596 6.69714,-18.18237c2.6998,3.03528 -9.21959,24.26701 7.07346,18.90152c11.61606,-2.54445 -2.06659,-20.76607 13.66382,-20.82939c7.61295,-8.9626 5.56317,-25.76184 17.20825,-32.56114c12.98419,-8.78706 33.2569,-2.44315 42.52423,-17.32399c7.89911,-7.61507 4.18182,-28.72154 -9.44128,-21.72794c-17.02448,1.65962 -3.51318,-23.0582 -3.98819,-32.32024c4.01126,-8.06691 -4.87137,-25.04774 -1.81268,-26.84933c5.77948,8.84253 7.84946,19.18484 6.60651,29.51878c-0.10681,8.76352 -3.8233,32.51385 8.36014,17.87288c4.12442,-10.20347 2.92487,-21.76073 5.86331,-32.37626c5.66748,-22.91865 -4.48026,-45.85004 -15.79309,-65.262c-9.63495,-10.45038 -21.86679,-18.78104 -33.35342,-26.98327c-19.32092,-7.26658 -40.65421,-8.56836 -61.06006,-6.74718c-18.04979,3.12863 -37.13738,6.42709 -51.51633,18.73374c-14.01352,8.25707 -27.43441,19.22373 -32.97453,35.08961c-4.82798,12.78156 -13.28239,25.798 -9.43994,39.99647c3.67479,11.83601 1.72576,24.12813 2.32075,36.22574c6.26442,13.82637 12.1788,-7.07504 11.59255,-13.98853c0.3468,-13.11021 7.26362,-24.71465 12.36033,-36.35318zm115.06042,28.12622c12.88235,0.92311 29.19336,8.09689 29.54492,23.0528c1.95883,15.00865 -10.16846,29.55684 -25.7099,28.08501c-14.11661,-1.15955 -23.14499,-13.35332 -22.20761,-27.06258c-4.7262,-9.82969 2.6286,-20.35741 12.49942,-22.61709c1.91415,-0.64365 3.88168,-1.12543 5.87317,-1.45815zm-86.93419,1.27835c14.94448,-2.65778 31.94749,6.61306 31.99739,23.15527c1.40359,15.99194 -15.57494,19.12508 -27.15695,23.1313c-8.01422,5.17467 -16.3391,0.35667 -22.99829,-4.85698c-8.63997,-9.0434 -6.10048,-27.26721 3.02245,-35.52229c4.42388,-3.27404 9.90028,-4.56108 15.1354,-5.9073zm51.1378,42.18812c7.2348,9.94383 15.92023,25.10751 6.56407,36.39339c-8.30571,6.66107 -9.35284,-9.47466 -18.07048,-1.8754c-8.17816,-7.1624 -0.63536,-21.73717 5.10291,-29.01329c1.8913,-2.09525 4.05559,-3.93987 6.4035,-5.5047z", "raph_flag": "m240.17992,78.9644c1.22598,-4.74799 1.33473,-12.52493 0.24789,-17.29984l-3.59653,-15.765c-1.08669,-4.77488 -5.91939,-9.3663 -10.74547,-10.20189l-33.14604,-5.72574c-4.82259,-0.83558 -12.72205,-0.80831 -17.53783,0.06101l-35.90382,6.46623c-4.82602,0.8693 -12.72192,0.95758 -17.56489,0.20381l-35.12959,-5.47475c0.04414,0.16981 0.12224,0.31943 0.15971,0.48924l24.04452,114.23236l11.00362,1.90157c4.82584,0.83569 12.71503,0.80153 17.54104,-0.06088l35.89362,-6.47302c4.81578,-0.86253 12.72198,-0.95078 17.56494,-0.19707l38.54257,6.01137c4.84297,0.75369 8.06601,-2.56096 7.18282,-7.38327l-4.31631,-23.36539c-0.88985,-4.81586 -0.61493,-12.63371 0.60435,-17.38171l5.1554,-20.03702zm-172.47275,-52.27992c-4.81902,1.01868 -7.89938,5.72567 -6.88394,10.53465l51.30882,243.74065l18.18635,0l-52.06276,-247.38807c-1.03241,-4.82942 -5.7429,-7.90624 -10.54846,-6.88723z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/ui.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/ui.json index f5b34bd..ed5dd10 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/ui.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/ui.json @@ -52,4 +52,4 @@ "raph_plugin": "M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z", "raph_folder": "M29.124,12.75c-0.004-2.208-1.792-3.997-3.999-4V8.749H12.868c-0.505-1.622-2.011-2.808-3.805-2.811H6.188c-2.208,0.002-3.997,1.792-4.001,4v14.188c0.004,2.206,1.793,3.995,4.001,3.999h18.938c2.205-0.004,3.995-1.793,3.999-3.999V12.75zM6.188,7.937h2.875c1.046-0.004,1.917,0.834,1.983,1.876l0.058,0.937h14.022c1.093,0.002,1.997,0.906,1.999,2v0.495c-0.591-0.345-1.268-0.557-2-0.558H6.187c-0.732,0.001-1.41,0.214-2,0.559V9.937C4.19,8.843,5.094,7.939,6.188,7.937zM25.125,26.125H6.188c-1.093-0.002-1.997-0.908-2.001-2v-7.438h0.001c0.002-1.095,0.906-1.999,2-2.001h18.938c1.093,0.002,1.991,0.901,2,1.991v7.447C27.122,25.219,26.218,26.123,25.125,26.125z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/weather.json b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/weather.json index 7c6f8c3..1cd04ae 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/weather.json +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/extensions/shapelib/weather.json @@ -2,7 +2,7 @@ "size": 32, "fill": true, "data": { - "raph_sun": "M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z", + "raph_sun": "M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z", "raph_thunder": "M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z", "raph_snow": "M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z", "raph_hail": "M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z", @@ -19,4 +19,4 @@ "sun": "M29.166,15.999l-5.279,1.878v-3.754L29.166,15.999z M25.333,6.748l-2.405,5.062l-2.654-2.656L25.333,6.748z M16.083,2.917l1.877,5.28h-3.755L16.083,2.917z M6.832,6.748l5.061,2.406l-2.655,2.656L6.832,6.748z M3,15.999l5.28-1.876v3.754 L3,15.999z M6.832,25.25l2.406-5.06l2.655,2.655L6.832,25.25L6.832,25.25z M16.083,29.084l-1.878-5.281h3.755L16.083,29.084z M25.333,25.25l-5.06-2.404l2.654-2.655L25.333,25.25z M9.542,15.999L9.542,15.999c0-3.612,2.929-6.541,6.542-6.541 c3.612,0,6.542,2.929,6.542,6.541c0,3.613-2.93,6.542-6.542,6.542C12.47,22.541,9.542,19.612,9.542,15.999L9.542,15.999z", "umbrella": "M15.009,3.37v2.508C8.637,6.23,3.618,9.962,3.618,14.514c0-0.82,1.387-1.486,3.095-1.486 c1.709,0,3.096,0.666,3.096,1.486c0-0.82,1.386-1.486,3.095-1.486c0.813,0,1.552,0.156,2.105,0.402v12.228 c0,0.547-0.444,0.99-0.99,0.99c-0.547,0-0.991-0.443-0.991-0.99v-0.496h-1.981v0.496c0,1.641,1.332,2.973,2.972,2.973 s2.971-1.332,2.971-2.973V13.43c0.553-0.247,1.293-0.402,2.106-0.402c1.707,0,3.096,0.666,3.096,1.486 c0-0.82,1.387-1.486,3.094-1.486c1.711,0,3.098,0.666,3.098,1.486c0-4.551-5.02-8.283-11.393-8.636V3.37H15.009z" } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/icons/jquery.svgicons.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/icons/jquery.svgicons.js index f6a33a8..e4794e2 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/icons/jquery.svgicons.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/icons/jquery.svgicons.js @@ -12,10 +12,10 @@ 1. Create the SVG master file that includes all icons: -The master SVG icon-containing file is an SVG file that contains +The master SVG icon-containing file is an SVG file that contains <g> elements. Each <g> element should contain the markup of an SVG -icon. The <g> element has an ID that should -correspond with the ID of the HTML element used on the page that should contain +icon. The <g> element has an ID that should +correspond with the ID of the HTML element used on the page that should contain or optionally be replaced by the icon. Additionally, one empty element should be added at the end with id "svg_eof". @@ -37,10 +37,10 @@ - 'fallback (object literal)': List of raster images with each key being the SVG icon ID to replace, and the value the image file name. - + - 'fallback_path (string)': The path to use for all images listed under "fallback" - + - 'replace (boolean)': If set to true, HTML elements will be replaced by, rather than include the SVG icon. @@ -49,14 +49,14 @@ - 'resize (object literal)': List with selectors for keys and numbers as values. This allows an easy way to resize specific icons. - -- 'callback (function)': A function to call when all icons have been loaded. - Includes an object literal as its argument with as keys all icon IDs and the + +- 'callback (function)': A function to call when all icons have been loaded. + Includes an object literal as its argument with as keys all icon IDs and the icon as a jQuery object as its value. - 'id_match (boolean)': Automatically attempt to match SVG icon ids with corresponding HTML id (default: true) - + - 'no_img (boolean)': Prevent attempting to convert the icon into an <img> element (may be faster, help for browser consistency) @@ -68,7 +68,7 @@ $.getSvgIcon(id (string)); This will return the icon (as jQuery object) with a given ID. - + 6. To resize icons at a later point without using the callback, use this: $.resizeSvgIcons(resizeOptions) (use the same way as the "resize" parameter) @@ -77,8 +77,8 @@ $(function() { $.svgIcons('my_icon_set.svg'); // The SVG file that contains all icons - // No options have been set, so all icons will automatically be inserted - // into HTML elements that match the same IDs. + // No options have been set, so all icons will automatically be inserted + // into HTML elements that match the same IDs. }); Example usage #2: @@ -114,13 +114,13 @@ resize: function() { '#save_icon .svg_icon': 64 // The "save" icon will be resized to 64 x 64px }, - - callback: function(icons) { // Sets background color for "close" icon + + callback: function(icons) { // Sets background color for "close" icon icons['close'].css('background','red'); }, - + svgz: true // Indicates that an SVGZ file is being used - + }) }); @@ -139,7 +139,7 @@ icons_made = false, data_loaded = false, load_attempts = 0, ua = navigator.userAgent, isOpera = !!window.opera, isSafari = (ua.indexOf('Safari/') > -1 && ua.indexOf('Chrome/')==-1), data_pre = 'data:image/svg+xml;charset=utf-8;base64,'; - + if(opts.svgz) { var data_el = $('<object data="' + file + '" type=image/svg+xml>').appendTo('body').hide(); try { @@ -174,11 +174,11 @@ if(err.responseText) { svgdoc = parser.parseFromString(err.responseText, "text/xml"); if(!svgdoc.childNodes.length) { - $(useFallback); + $(useFallback); } $(function() { getIcons('ajax'); - }); + }); } else { $(useFallback); } @@ -186,12 +186,12 @@ } }); } - + function getIcons(evt, no_wait) { if(evt !== 'ajax') { if(data_loaded) return; // Webkit sometimes says svgdoc is undefined, other times - // it fails to load all nodes. Thus we must make sure the "eof" + // it fails to load all nodes. Thus we must make sure the "eof" // element is loaded. svgdoc = data_el[0].contentDocument; // Needed again for Webkit var isReady = (svgdoc && svgdoc.getElementById('svg_eof')); @@ -207,12 +207,12 @@ } data_loaded = true; } - + elems = $(svgdoc.firstChild).children(); //.getElementsByTagName('foreignContent'); - + if(!opts.no_img) { var testSrc = data_pre + 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNzUiIGhlaWdodD0iMjc1Ij48L3N2Zz4%3D'; - + testImg = $(new Image()).attr({ src: testSrc, width: 0, @@ -230,7 +230,7 @@ },500); } } - + var setIcon = function(target, icon, id, setID) { if(isOpera) icon.css('visibility','hidden'); if(opts.replace) { @@ -239,7 +239,7 @@ if(cl) icon.attr('class','svg_icon '+cl); target.replaceWith(icon); } else { - + target.append(icon); } if(isOpera) { @@ -248,23 +248,23 @@ },1); } } - + var addIcon = function(icon, id) { if(opts.id_match === undefined || opts.id_match !== false) { setIcon(holder, icon, id, true); } svg_icons[id] = icon; } - + function makeIcons(toImage, fallback) { if(icons_made) return; if(opts.no_img) toImage = false; var holder; - + if(toImage) { var temp_holder = $(document.createElement('div')); temp_holder.hide().appendTo('body'); - } + } if(fallback) { var path = opts.fallback_path?opts.fallback_path:''; $.each(fallback, function(id, imgsrc) { @@ -277,7 +277,7 @@ 'height': icon_h, 'alt': 'icon' }); - + addIcon(icon, id); }); } else { @@ -295,12 +295,12 @@ var h = svg.getAttribute('height'); svg.removeAttribute('width'); svg.removeAttribute('height'); - + var vb = svg.getAttribute('viewBox'); if(!vb) { svg.setAttribute('viewBox', [0,0,w,h].join(' ')); } - + // Not using jQuery to be a bit faster svgroot.setAttribute('xmlns', svgns); svgroot.setAttribute('width', icon_w); @@ -311,9 +311,9 @@ // Without cloning, Firefox will make another GET request. // With cloning, causes issue in Opera/Win/Non-EN if(!isOpera) svg = svg.cloneNode(true); - + svgroot.appendChild(svg); - + if(toImage) { // Without cloning, Safari will crash // With cloning, causes issue in Opera/Win/Non-EN @@ -329,7 +329,7 @@ } } - + if(opts.placement) { $.each(opts.placement, function(sel, id) { if(!svg_icons[id]) return; @@ -350,11 +350,11 @@ if(opts.callback) opts.callback(svg_icons); } - + fixIDs = function(svg_el, svg_num, force) { var defs = svg_el.find('defs'); if(!defs.length) return svg_el; - + if(isOpera) { var id_elems = defs.find('*').filter(function() { return !!this.id; @@ -362,9 +362,9 @@ } else { var id_elems = defs.find('[id]'); } - + var all_elems = svg_el[0].getElementsByTagName('*'), len = all_elems.length; - + id_elems.each(function(i) { var id = this.id; var no_dupes = ($(svgdoc).find('#' + id).length <= 1); @@ -372,7 +372,7 @@ // if(!force && no_dupes) return; var new_id = 'x' + id + svg_num + i; this.id = new_id; - + var old_val = 'url(#' + id + ')'; var new_val = 'url(#' + new_id + ')'; @@ -391,7 +391,7 @@ }); return svg_el; } - + function useFallback() { if(file.indexOf('.svgz') != -1) { var reg_file = file.replace('.svgz','.svg'); @@ -403,7 +403,7 @@ makeIcons(false, opts.fallback); } } - + function encode64(input) { // base64 strings are 4/3 larger than the original string if(window.btoa) return window.btoa(input); @@ -412,41 +412,41 @@ var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0, p = 0; - + do { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); - + enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; - + if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } - + output[p++] = _keyStr.charAt(enc1); output[p++] = _keyStr.charAt(enc2); output[p++] = _keyStr.charAt(enc3); output[p++] = _keyStr.charAt(enc4); } while (i < input.length); - + return output.join(''); } } - - $.getSvgIcon = function(id, uniqueClone) { + + $.getSvgIcon = function(id, uniqueClone) { var icon = svg_icons[id]; if(uniqueClone && icon) { icon = fixIDs(icon, 0, true).clone(true); } - return icon; + return icon; } - + $.resizeSvgIcons = function(obj) { // FF2 and older don't detect .svg_icon, so we change it detect svg elems instead var change_sel = !$('.svg_icon:first').length; @@ -467,5 +467,5 @@ }); }); } - -})(jQuery); \ No newline at end of file + +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-bottom.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-bottom.svg index 0b4362d..d9e409c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-bottom.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-bottom.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-center.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-center.svg index d604d73..794b59b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-center.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-center.svg @@ -1 +1,11 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <g id="Layer%201"> <path d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </g> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <g id="Layer%201"> + <path d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> + </g> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-left.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-left.svg index 1079f24..900e054 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-left.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-left.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-middle.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-middle.svg index a7eee20..5c29a26 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-middle.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-middle.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 ZM 27 0 L 0 0 L 0 27 L 27 27 L 27 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-right.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-right.svg index ed22609..f9733fd 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-right.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-right.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 ZM 0 0 L 27 0 L 27 27 L 0 27 L 0 0 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 ZM 0 0 L 27 0 L 27 27 L 0 27 L 0 0 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-top.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-top.svg index 8fa76ea..3557230 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-top.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/align-top.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 ZM 0 27 L 0 0 L 27 0 L 27 27 L 0 27 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="Untitled-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 ZM 0 27 L 0 0 L 27 0 L 27 27 L 0 27 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/conn.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/conn.svg index 1af5e9a..37b3e0f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/conn.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/conn.svg @@ -26,4 +26,4 @@ </svg> </g> <g id="svg_eof"/> -</svg> \ No newline at end of file +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/eye.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/eye.svg index 7221582..0f69e1b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/eye.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/eye.svg @@ -1 +1,9 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <path d="M 26.575 14.5 C 25.0764 18.8131 19.7906 22 13.5 22 C 7.2094 22 1.9236 18.8131 0.425 14.5 C 1.9236 10.1869 7.2094 7 13.5 7 C 19.7906 7 25.0764 10.1869 26.575 14.5 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 ZM 20.5226 14.5 C 20.5226 10.9101 16.5538 8.0625 14.0226 8 C 13.8544 7.9958 14.6876 9.0074 14.5226 9.02 C 16.6163 9 18.5226 11.0783 18.5226 14.5 C 18.5226 17.9217 16.7413 19.625 14.5226 19.98 C 14.6876 19.9926 13.8543 21 14.0226 21 C 16.5851 21 20.5226 18.0899 20.5226 14.5 ZM 6 14.5 C 6 18.0899 9.9375 21 12.5 21 C 12.6682 21 11.835 19.9926 12 19.98 C 9.7813 19.625 8 17.9217 8 14.5 C 8 11.0783 9.9063 9 12 9.02 C 11.835 9.0074 12.6682 7.9958 12.5 8 C 9.9688 8.0625 6 10.9101 6 14.5 Z" fill="#000000"/> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <path d="M 26.575 14.5 C 25.0764 18.8131 19.7906 22 13.5 22 C 7.2094 22 1.9236 18.8131 0.425 14.5 C 1.9236 10.1869 7.2094 7 13.5 7 C 19.7906 7 25.0764 10.1869 26.575 14.5 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 ZM 20.5226 14.5 C 20.5226 10.9101 16.5538 8.0625 14.0226 8 C 13.8544 7.9958 14.6876 9.0074 14.5226 9.02 C 16.6163 9 18.5226 11.0783 18.5226 14.5 C 18.5226 17.9217 16.7413 19.625 14.5226 19.98 C 14.6876 19.9926 13.8543 21 14.0226 21 C 16.5851 21 20.5226 18.0899 20.5226 14.5 ZM 6 14.5 C 6 18.0899 9.9375 21 12.5 21 C 12.6682 21 11.835 19.9926 12 19.98 C 9.7813 19.625 8 17.9217 8 14.5 C 8 11.0783 9.9063 9 12 9.02 C 11.835 9.0074 12.6682 7.9958 12.5 8 C 9.9688 8.0625 6 10.9101 6 14.5 Z" fill="#000000"/> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/italic.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/italic.svg index 483381d..b436794 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/italic.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/italic.svg @@ -1 +1,11 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <g id="Layer%201"> <path d="M 16.6855 8.9536 L 12.8818 22.146 C 12.6714 22.9009 12.5664 23.396 12.5664 23.6304 C 12.5664 23.7671 12.6221 23.8931 12.7334 24.0112 C 12.8447 24.1284 12.9619 24.187 13.0859 24.187 C 13.2959 24.187 13.5063 24.0942 13.7168 23.9087 C 14.2734 23.4517 14.9414 22.6226 15.7207 21.4224 L 16.3516 21.7935 C 14.4834 25.0474 12.498 26.6733 10.3955 26.6733 C 9.5913 26.6733 8.9512 26.4478 8.4751 25.9956 C 7.9985 25.5444 7.7607 24.9731 7.7607 24.2798 C 7.7607 23.8228 7.8657 23.2407 8.0762 22.5356 L 10.6553 13.6665 C 10.9023 12.813 11.0264 12.1704 11.0264 11.7368 C 11.0264 11.4653 10.9087 11.2241 10.6738 11.0132 C 10.4385 10.8032 10.1172 10.6978 9.709 10.6978 C 9.5234 10.6978 9.3008 10.7046 9.041 10.7163 L 9.2822 9.9741 L 15.5723 8.9536 L 16.6855 8.9536 ZM 15.5352 0.4185 C 16.3018 0.4185 16.9482 0.6851 17.4741 1.2163 C 17.9995 1.7485 18.2627 2.3921 18.2627 3.146 C 18.2627 3.9009 17.9966 4.5444 17.4648 5.0757 C 16.9326 5.6079 16.2896 5.8735 15.5352 5.8735 C 14.793 5.8735 14.1558 5.6079 13.624 5.0757 C 13.0918 4.5444 12.8262 3.9009 12.8262 3.146 C 12.8262 2.3921 13.0889 1.7485 13.6147 1.2163 C 14.1401 0.6851 14.7803 0.4185 15.5352 0.4185 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </g> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <g id="Layer%201"> + <path d="M 16.6855 8.9536 L 12.8818 22.146 C 12.6714 22.9009 12.5664 23.396 12.5664 23.6304 C 12.5664 23.7671 12.6221 23.8931 12.7334 24.0112 C 12.8447 24.1284 12.9619 24.187 13.0859 24.187 C 13.2959 24.187 13.5063 24.0942 13.7168 23.9087 C 14.2734 23.4517 14.9414 22.6226 15.7207 21.4224 L 16.3516 21.7935 C 14.4834 25.0474 12.498 26.6733 10.3955 26.6733 C 9.5913 26.6733 8.9512 26.4478 8.4751 25.9956 C 7.9985 25.5444 7.7607 24.9731 7.7607 24.2798 C 7.7607 23.8228 7.8657 23.2407 8.0762 22.5356 L 10.6553 13.6665 C 10.9023 12.813 11.0264 12.1704 11.0264 11.7368 C 11.0264 11.4653 10.9087 11.2241 10.6738 11.0132 C 10.4385 10.8032 10.1172 10.6978 9.709 10.6978 C 9.5234 10.6978 9.3008 10.7046 9.041 10.7163 L 9.2822 9.9741 L 15.5723 8.9536 L 16.6855 8.9536 ZM 15.5352 0.4185 C 16.3018 0.4185 16.9482 0.6851 17.4741 1.2163 C 17.9995 1.7485 18.2627 2.3921 18.2627 3.146 C 18.2627 3.9009 17.9966 4.5444 17.4648 5.0757 C 16.9326 5.6079 16.2896 5.8735 15.5352 5.8735 C 14.793 5.8735 14.1558 5.6079 13.624 5.0757 C 13.0918 4.5444 12.8262 3.9009 12.8262 3.146 C 12.8262 2.3921 13.0889 1.7485 13.6147 1.2163 C 14.1401 0.6851 14.7803 0.4185 15.5352 0.4185 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> + </g> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/polygon.svg b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/polygon.svg index 3e4bc07..663f241 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/polygon.svg +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/polygon.svg @@ -1 +1,11 @@ -<?xml version="1.0" standalone="no"?> <!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0px" y="0px" width="27px" height="27px" > <g id="Layer%201"> <path d="M 13.6027 0.5027 L 26.844 10.2723 L 21.6443 25.8845 L 5.1894 25.7637 L 0.2195 10.0769 L 13.6027 0.5027 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> </g> </svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?> +<!-- Generator: Adobe Fireworks CS5, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg id="eye-Page%201" viewBox="0 0 27 27" style="background-color:#ffffff00" version="1.1" + xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" + x="0px" y="0px" width="27px" height="27px" +> + <g id="Layer%201"> + <path d="M 13.6027 0.5027 L 26.844 10.2723 L 21.6443 25.8845 L 5.1894 25.7637 L 0.2195 10.0769 L 13.6027 0.5027 ZM 0 0 L 0 27 L 27 27 L 27 0 L 0 0 Z" fill="#000000"/> + </g> +</svg> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/svg_edit_icons.svgz b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/svg_edit_icons.svgz index cb8c80c..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/images/svg_edit_icons.svgz +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/images/svg_edit_icons.svgz Binary files differ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/index.html b/web/public/SVGOrigin/Method-Draw-master/method-draw/index.html index a54b5a9..d2e799c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/index.html +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/index.html @@ -92,10 +92,10 @@ <div id="tool_about" class="menu_item">Keyboard Shortcuts...</div> </div> </a> - + <div class="menu"> <div class="menu_title">File</div> - <div class="menu_list" id="file_menu"> + <div class="menu_list" id="file_menu"> <div id="tool_clear" class="menu_item">New Document</div> <div id="tool_open" class="menu_item" style="display: none;"><div id="fileinputs"></div>Open SVG...</div> <div id="tool_import" class="menu_item" style="display: none;"><div id="fileinputs_import"></div>Import Image...</div> @@ -117,7 +117,7 @@ <div class="menu_item action_selected disabled" id="tool_delete">Delete <span>鈱�</span></div> </div> </div> - + <div class="menu"> <div class="menu_title">Object</div> <div class="menu_list" id="object_menu"> @@ -144,17 +144,17 @@ <div class="menu_item" id="tool_source">Source... <span class="shortcut">鈱楿</span></div> </div> </div> - - + + </div> <div id="tools_top" class="tools_panel"> <div id="canvas_panel" class="context_panel"> - + <h4 class="clearfix">Canvas</h4> - + <label data-title="Change canvas width"> <input size="3" id="canvas_width" type="text" pattern="[0-9]*" /> <span class="icon_label">Width</span> @@ -163,8 +163,8 @@ <input id="canvas_height" size="3" type="text" pattern="[0-9]*" /> <span class="icon_label">Height</span> </label> - - + + <label data-title="Change canvas color" class="draginput"> <span>Color</span> <div id="color_canvas_tools"> @@ -193,16 +193,16 @@ </div> </div> - + <div id="rect_panel" class="context_panel"> <h4 class="clearfix">Rectangle</h4> <label> <input id="rect_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*" /> - <span>X</span> + <span>X</span> </label> <label> <input id="rect_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> - <span>Y</span> + <span>Y</span> </label> <label id="rect_width_tool attr_changer" data-title="Change rectangle width"> <input id="rect_width" class="attr_changer" size="3" data-attr="width" type="text" pattern="[0-9]*" /> @@ -213,7 +213,7 @@ <span class="icon_label">Height</span> </label> </div> - + <div id="path_panel" class="context_panel clearfix"> <h4 class="clearfix">Path</h4> <label> @@ -230,11 +230,11 @@ <h4>Image</h4> <label> <input id="image_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*"/> - <span>X</span> + <span>X</span> </label> <label> <input id="image_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*"/> - <span>Y</span> + <span>Y</span> </label> <label> <input id="image_width" class="attr_changer" data-title="Change image width" size="3" data-attr="width" pattern="[0-9]*" /> @@ -245,7 +245,7 @@ <span class="icon_label">Height</span> </label> </div> - + <div id="circle_panel" class="context_panel"> <h4>Circle</h4> <label id="tool_circle_cx"> @@ -312,7 +312,7 @@ <input id="text_y" class="attr_changer" data-title="Change text y coordinate" size="3" data-attr="y" pattern="[0-9]*" /> <span>Y</span> </label> - + <div class="toolset draginput select twocol" id="tool_font_family"> <!-- Font family --> <span>Font</span> @@ -349,11 +349,11 @@ <!-- formerly gsvg_panel --> <div id="container_panel" class="context_panel clearfix"> </div> - + <div id="use_panel" class="context_panel clearfix"> <div class="tool_button clearfix" id="tool_unlink_use" data-title="Break link to reference element (make unique)">Break link reference</div> </div> - + <div id="g_panel" class="context_panel clearfix"> <h4>Group</h4> <label> @@ -365,7 +365,7 @@ <span>Y</span> </label> </div> - + <div id="path_node_panel" class="context_panel clearfix"> <h4>Edit Path</h4> @@ -377,7 +377,7 @@ <input id="path_node_y" class="attr_changer" data-title="Change node's y coordinate" size="3" data-attr="y" /> <span>Y</span> </label> - + <div id="segment_type" class="draginput label"> <span>Segment Type</span> <select id="seg_type" data-title="Change Segment type"> @@ -387,21 +387,21 @@ <div class="caret"></div> <label id="seg_type_label">Straight</label> </div> - + <!-- <label class="draginput checkbox" data-title="Link Control Points"> <span>Linked Control Points</span> <div class="push_bottom"><input type="checkbox" id="tool_node_link" checked="checked" /></div> </label> --> - + <div class="clearfix"></div> <div class="tool_button" id="tool_node_clone" title="Adds a node">Add Node</div> <div class="tool_button" id="tool_node_delete" title="Delete Node">Delete Node</div> <div class="tool_button" id="tool_openclose_path" title="Open/close sub-path">Open Path</div> <!--<div class="tool_button" id="tool_add_subpath" title="Add sub-path"></div>--> </div> - + <!-- Buttons when a single element is selected --> <div id="selected_panel" class="context_panel"> @@ -412,24 +412,24 @@ <div id="tool_angle_indicator_cursor"></div> </div> </label> - + <label class="toolset" id="tool_opacity" data-title="Change selected item opacity"> <input id="group_opacity" class="attr_changer" data-attr="opacity" data-multiplier="0.01" size="3" value="100" step="5" min="0" max="100" /> <span id="group_opacityLabel" class="icon_label">Opacity</span> </label> - + <div class="toolset" id="tool_blur" data-title="Change gaussian blur value"> <label> <input id="blur" size="2" value="0" step=".1" min="0" max="10" /> <span class="icon_label">Blur</span> </label> </div> - + <label id="cornerRadiusLabel" data-title="Change Rectangle Corner Radius"> <input id="rect_rx" size="3" value="0" data-attr="rx" class="attr_changer" type="text" pattern="[0-9]*" /> <span class="icon_label">Roundness</span> </label> - + <div class="clearfix"></div> <div id="align_tools"> <h4>Align</h4> @@ -444,16 +444,16 @@ <div class="draginput_cell" id="tool_posbottom" title="Align Bottom"></div> </div> </label> - </div> + </div> </div> </div> - + <!-- Buttons when multiple elements are selected --> <div id="multiselected_panel" class="context_panel clearfix"> <h4 class="hidable">Multiple Elements</h4> - + <div class="toolset align_buttons" style="position: relative"> - <label id="tool_align_relative" style="margin-top: 10px;"> + <label id="tool_align_relative" style="margin-top: 10px;"> <select id="align_relative_to" title="Align relative to ..."> <option id="selected_objects" value="selected">Align to objects</option> <option id="page" value="page">Align to page</option> @@ -472,7 +472,7 @@ <div class="clearfix"></div> </div> - + <div id="stroke_panel" class="context_panel clearfix"> <div class="clearfix"></div> <h4>Stroke</h4> @@ -482,7 +482,7 @@ <span class="icon_label">Stroke Width</span> </label> </div> - <div class="stroke_tool draginput"> + <div class="stroke_tool draginput"> <span>Stroke Dash</span> <select id="stroke_style" data-title="Change stroke dash style"> <option selected="selected" value="none">鈥�</option> @@ -494,11 +494,11 @@ <div class="caret"></div> <label id="stroke_style_label">鈥�</label> </div> - + <label style="display: none;"> <span class="icon_label">Stroke Join</span> </label> - + <label style="display: none;"> <span class="icon_label">Stroke Cap</span> </label> @@ -506,7 +506,7 @@ </div> <!-- tools_top --> <div id="cur_context_panel"> - + </div> @@ -519,7 +519,7 @@ <div class="tool_button" id="tool_path" title="Path Tool [P]"></div> <div class="tool_button" id="tool_text" title="Text Tool [T]"></div> <div class="tool_button" id="tool_zoom" title="Zoom Tool [Z]"></div> - + <div id="color_tools"> <div id="tool_switch" title="Switch stroke and fill colors [X]"></div> <div class="color_tool active" id="tool_fill"> diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/canvg/canvg.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/canvg/canvg.js index 662beb3..2592669 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/canvg/canvg.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/canvg/canvg.js @@ -1,6 +1,6 @@ /* * canvg.js - Javascript SVG parser and renderer on Canvas - * MIT Licensed + * MIT Licensed * Gabe Lerner (gabelerner@gmail.com) * http://code.google.com/p/canvg/ * @@ -55,13 +55,13 @@ canvg(c, div.innerHTML); } return; - } + } opts = opts || {}; - + if (typeof target == 'string') { target = document.getElementById(target); } - + // reuse class per canvas var svg; if (target.svg == null) { @@ -73,7 +73,7 @@ svg.stop(); } svg.opts = opts; - + var ctx = target.getContext('2d'); if (typeof(s.documentElement) != 'undefined') { // load from xml doc @@ -91,10 +91,10 @@ function build() { var svg = { }; - + svg.FRAMERATE = 30; svg.MAX_VIRTUAL_PIXELS = 30000; - + // globals svg.init = function(ctx) { svg.Definitions = {}; @@ -114,14 +114,14 @@ if (d != null && typeof(d) == 'number') return d; if (d == 'x') return this.width(); if (d == 'y') return this.height(); - return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2); + return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2); } }); } svg.init(); - + // images loaded - svg.ImagesLoaded = function() { + svg.ImagesLoaded = function() { for (var i=0; i<svg.Images.length; i++) { if (!svg.Images[i].loaded) return false; } @@ -130,10 +130,10 @@ // trim svg.trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); } - + // compress spaces svg.compressSpaces = function(s) { return s.replace(/[\s\r\t\n]+/gm,' '); } - + // ajax svg.ajax = function(url) { var AJAX; @@ -145,8 +145,8 @@ return AJAX.responseText; } return null; - } - + } + // parse xml svg.parseXml = function(xml) { if (window.DOMParser) @@ -154,48 +154,48 @@ var parser = new DOMParser(); return parser.parseFromString(xml, 'text/xml'); } - else + else { xml = xml.replace(/<!DOCTYPE svg[^>]*>/, ''); var xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); xmlDoc.async = 'false'; - xmlDoc.loadXML(xml); + xmlDoc.loadXML(xml); return xmlDoc; - } + } } - + svg.Property = function(name, value) { this.name = name; this.value = value; - + this.hasValue = function() { return (this.value != null && this.value !== ''); } - + // return the numerical value of the property this.numValue = function() { if (!this.hasValue()) return 0; - + var n = parseFloat(this.value); if ((this.value + '').match(/%$/)) { n = n / 100.0; } return n; } - + this.valueOrDefault = function(def) { if (this.hasValue()) return this.value; return def; } - + this.numValueOrDefault = function(def) { if (this.hasValue()) return this.numValue(); return def; } - + /* EXTENSIONS */ var that = this; - + // color extensions this.Color = { // augment the current color value with the opacity @@ -210,7 +210,7 @@ return new svg.Property(that.name, newValue); } } - + // definition extensions this.Definition = { // get the definition from the definitions table @@ -218,43 +218,43 @@ var name = that.value.replace(/^(url\()?#([^\)]+)\)?$/, '$2'); return svg.Definitions[name]; }, - + isUrl: function() { return that.value.indexOf('url(') == 0 }, - + getFillStyle: function(e) { var def = this.getDefinition(); - + // gradient if (def != null && def.createGradient) { return def.createGradient(svg.ctx, e); } - + // pattern if (def != null && def.createPattern) { return def.createPattern(svg.ctx, e); } - + return null; } } - + // length extensions this.Length = { DPI: function(viewPort) { return 96.0; // TODO: compute? }, - + EM: function(viewPort) { var em = 12; - + var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize); if (fontSize.hasValue()) em = fontSize.Length.toPixels(viewPort); - + return em; }, - + // get the length as pixels toPixels: function(viewPort) { if (!that.hasValue()) return 0; @@ -271,7 +271,7 @@ return that.numValue(); } } - + // time extensions this.Time = { // get the time as milliseconds @@ -283,7 +283,7 @@ return that.numValue(); } } - + // angle extensions this.Angle = { // get the angle as radians @@ -297,25 +297,25 @@ } } } - + // fonts svg.Font = new (function() { this.Styles = ['normal','italic','oblique','inherit']; this.Variants = ['normal','small-caps','inherit']; this.Weights = ['normal','bold','bolder','lighter','100','200','300','400','500','600','700','800','900','inherit']; - - this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) { + + this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) { var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font); - return { - fontFamily: fontFamily || f.fontFamily, - fontSize: fontSize || f.fontSize, - fontStyle: fontStyle || f.fontStyle, - fontWeight: fontWeight || f.fontWeight, + return { + fontFamily: fontFamily || f.fontFamily, + fontSize: fontSize || f.fontSize, + fontStyle: fontStyle || f.fontStyle, + fontWeight: fontWeight || f.fontWeight, fontVariant: fontVariant || f.fontVariant, - toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') } - } + toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') } + } } - + var that = this; this.Parse = function(s) { var f = {}; @@ -332,7 +332,7 @@ return f; } }); - + // points and paths svg.ToNumberArray = function(s) { var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' '); @@ -340,15 +340,15 @@ a[i] = parseFloat(a[i]); } return a; - } + } svg.Point = function(x, y) { this.x = x; this.y = y; - + this.angleTo = function(p) { return Math.atan2(p.y - this.y, p.x - this.x); } - + this.applyTransform = function(v) { var xp = this.x * v[0] + this.y * v[2] + v[4]; var yp = this.x * v[1] + this.y * v[3] + v[5]; @@ -368,20 +368,20 @@ } return path; } - + // bounding box svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want this.x1 = Number.NaN; this.y1 = Number.NaN; this.x2 = Number.NaN; this.y2 = Number.NaN; - + this.x = function() { return this.x1; } this.y = function() { return this.y1; } this.width = function() { return this.x2 - this.x1; } this.height = function() { return this.y2 - this.y1; } - - this.addPoint = function(x, y) { + + this.addPoint = function(x, y) { if (x != null) { if (isNaN(this.x1) || isNaN(this.x2)) { this.x1 = x; @@ -390,7 +390,7 @@ if (x < this.x1) this.x1 = x; if (x > this.x2) this.x2 = x; } - + if (y != null) { if (isNaN(this.y1) || isNaN(this.y2)) { this.y1 = y; @@ -399,15 +399,15 @@ if (y < this.y1) this.y1 = y; if (y > this.y2) this.y2 = y; } - } + } this.addX = function(x) { this.addPoint(x, null); } this.addY = function(y) { this.addPoint(null, y); } - + this.addBoundingBox = function(bb) { this.addPoint(bb.x1, bb.y1); this.addPoint(bb.x2, bb.y2); } - + this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) { var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0) var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0) @@ -415,25 +415,25 @@ var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0) this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y); } - + this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) { // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y]; this.addPoint(p0[0], p0[1]); this.addPoint(p3[0], p3[1]); - + for (i=0; i<=1; i++) { - var f = function(t) { + var f = function(t) { return Math.pow(1-t, 3) * p0[i] + 3 * Math.pow(1-t, 2) * t * p1[i] + 3 * (1-t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; } - + var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; var c = 3 * p1[i] - 3 * p0[i]; - + if (a == 0) { if (b == 0) continue; var t = -c / b; @@ -443,7 +443,7 @@ } continue; } - + var b2ac = Math.pow(b, 2) - 4 * c * a; if (b2ac < 0) continue; var t1 = (-b + Math.sqrt(b2ac)) / (2 * a); @@ -458,23 +458,23 @@ } } } - + this.isPointInBox = function(x, y) { return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2); } - + this.addPoint(x1, y1); this.addPoint(x2, y2); } - + // transforms - svg.Transform = function(v) { + svg.Transform = function(v) { var that = this; this.Type = {} - + // translate this.Type.translate = function(s) { - this.p = svg.CreatePoint(s); + this.p = svg.CreatePoint(s); this.apply = function(ctx) { ctx.translate(this.p.x || 0.0, this.p.y || 0.0); } @@ -482,7 +482,7 @@ p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]); } } - + // rotate this.Type.rotate = function(s) { var a = svg.ToNumberArray(s); @@ -499,9 +499,9 @@ p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]); p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]); p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]); - } + } } - + this.Type.scale = function(s) { this.p = svg.CreatePoint(s); this.apply = function(ctx) { @@ -509,9 +509,9 @@ } this.applyToPoint = function(p) { p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]); - } + } } - + this.Type.matrix = function(s) { this.m = svg.ToNumberArray(s); this.apply = function(ctx) { @@ -519,44 +519,44 @@ } this.applyToPoint = function(p) { p.applyTransform(this.m); - } + } } - + this.Type.SkewBase = function(s) { this.base = that.Type.matrix; this.base(s); this.angle = new svg.Property('angle', s); } this.Type.SkewBase.prototype = new this.Type.matrix; - + this.Type.skewX = function(s) { this.base = that.Type.SkewBase; this.base(s); this.m = [1, 0, Math.tan(this.angle.Angle.toRadians()), 1, 0, 0]; } this.Type.skewX.prototype = new this.Type.SkewBase; - + this.Type.skewY = function(s) { this.base = that.Type.SkewBase; this.base(s); this.m = [1, Math.tan(this.angle.Angle.toRadians()), 0, 1, 0, 0]; } this.Type.skewY.prototype = new this.Type.SkewBase; - + this.transforms = []; - + this.apply = function(ctx) { for (var i=0; i<this.transforms.length; i++) { this.transforms[i].apply(ctx); } } - + this.applyToPoint = function(p) { for (var i=0; i<this.transforms.length; i++) { this.transforms[i].applyToPoint(p); } } - + var data = svg.trim(svg.compressSpaces(v)).split(/\s(?=[a-z])/); for (var i=0; i<data.length; i++) { var type = data[i].split('(')[0]; @@ -565,73 +565,73 @@ this.transforms.push(transform); } } - + // aspect ratio svg.AspectRatio = function(ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) { // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute aspectRatio = svg.compressSpaces(aspectRatio); aspectRatio = aspectRatio.replace(/^defer\s/,''); // ignore defer var align = aspectRatio.split(' ')[0] || 'xMidYMid'; - var meetOrSlice = aspectRatio.split(' ')[1] || 'meet'; - + var meetOrSlice = aspectRatio.split(' ')[1] || 'meet'; + // calculate scale var scaleX = width / desiredWidth; var scaleY = height / desiredHeight; var scaleMin = Math.min(scaleX, scaleY); var scaleMax = Math.max(scaleX, scaleY); if (meetOrSlice == 'meet') { desiredWidth *= scaleMin; desiredHeight *= scaleMin; } - if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; } - + if (meetOrSlice == 'slice') { desiredWidth *= scaleMax; desiredHeight *= scaleMax; } + refX = new svg.Property('refX', refX); refY = new svg.Property('refY', refY); - if (refX.hasValue() && refY.hasValue()) { + if (refX.hasValue() && refY.hasValue()) { ctx.translate(-scaleMin * refX.Length.toPixels('x'), -scaleMin * refY.Length.toPixels('y')); - } - else { - // align - if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0); - if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0); - if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0); - if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight); } - + else { + // align + if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0); + if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0); + if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0); + if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight); + } + // scale if (align == 'none') ctx.scale(scaleX, scaleY); - else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin); - else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax); - + else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin); + else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax); + // translate - ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY); + ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY); } - + // elements svg.Element = {} - - svg.Element.ElementBase = function(node) { + + svg.Element.ElementBase = function(node) { this.attributes = {}; this.styles = {}; this.children = []; - + // get or create attribute this.attribute = function(name, createIfNotExists) { var a = this.attributes[name]; if (a != null) return a; - + a = new svg.Property(name, ''); if (createIfNotExists == true) this.attributes[name] = a; return a; } - + // get or create style, crawls up node tree this.style = function(name, createIfNotExists) { var s = this.styles[name]; if (s != null) return s; - + var a = this.attribute(name); if (a != null && a.hasValue()) { return a; } - + var p = this.parent; if (p != null) { var ps = p.style(name); @@ -639,20 +639,20 @@ return ps; } } - + s = new svg.Property(name, ''); if (createIfNotExists == true) this.styles[name] = s; return s; } - + // base render this.render = function(ctx) { // don't render display=none if (this.style('display').value == 'none') return; - + // don't render visibility=hidden if (this.attribute('visibility').value == 'hidden') return; - + ctx.save(); this.setContext(ctx); // mask @@ -664,56 +664,56 @@ var filter = this.style('filter').Definition.getDefinition(); if (filter != null) filter.apply(ctx, this); } - else this.renderChildren(ctx); + else this.renderChildren(ctx); this.clearContext(ctx); ctx.restore(); } - + // base set context this.setContext = function(ctx) { // OVERRIDE ME! } - + // base clear context this.clearContext = function(ctx) { // OVERRIDE ME! - } - + } + // base render children this.renderChildren = function(ctx) { for (var i=0; i<this.children.length; i++) { this.children[i].render(ctx); } } - + this.addChild = function(childNode, create) { var child = childNode; if (create) child = svg.CreateElement(childNode); child.parent = this; - this.children.push(child); + this.children.push(child); } - + if (node != null && node.nodeType == 1) { //ELEMENT_NODE // add children for (var i=0; i<node.childNodes.length; i++) { var childNode = node.childNodes[i]; if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE } - + // add attributes for (var i=0; i<node.attributes.length; i++) { var attribute = node.attributes[i]; this.attributes[attribute.nodeName] = new svg.Property(attribute.nodeName, attribute.nodeValue); } - + // add tag styles var styles = svg.Styles[node.nodeName]; if (styles != null) { for (var name in styles) { this.styles[name] = styles[name]; } - } - + } + // add class styles if (this.attribute('class').hasValue()) { var classes = svg.compressSpaces(this.attribute('class').value).split(' '); @@ -732,7 +732,7 @@ } } } - + // add inline styles if (this.attribute('style').hasValue()) { var styles = this.attribute('style').value.split(';'); @@ -744,7 +744,7 @@ this.styles[name] = new svg.Property(name, value); } } - } + } // add id if (this.attribute('id').hasValue()) { @@ -754,11 +754,11 @@ } } } - + svg.Element.RenderedElementBase = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.setContext = function(ctx) { // fill if (this.style('fill').Definition.isUrl()) { @@ -770,7 +770,7 @@ if (this.style('fill-opacity').hasValue()) fillStyle = fillStyle.Color.addOpacity(this.style('fill-opacity').value); ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value); } - + // stroke if (this.style('stroke').Definition.isUrl()) { var fs = this.style('stroke').Definition.getFillStyle(this); @@ -788,49 +788,49 @@ // font if (typeof(ctx.font) != 'undefined') { - ctx.font = svg.Font.CreateFont( - this.style('font-style').value, - this.style('font-variant').value, - this.style('font-weight').value, - this.style('font-size').hasValue() ? this.style('font-size').Length.toPixels() + 'px' : '', + ctx.font = svg.Font.CreateFont( + this.style('font-style').value, + this.style('font-variant').value, + this.style('font-weight').value, + this.style('font-size').hasValue() ? this.style('font-size').Length.toPixels() + 'px' : '', this.style('font-family').value).toString(); } - + // transform - if (this.attribute('transform').hasValue()) { + if (this.attribute('transform').hasValue()) { var transform = new svg.Transform(this.attribute('transform').value); transform.apply(ctx); } - + // clip if (this.attribute('clip-path').hasValue()) { var clip = this.attribute('clip-path').Definition.getDefinition(); if (clip != null) clip.apply(ctx); } - + // opacity if (this.style('opacity').hasValue()) { ctx.globalAlpha = this.style('opacity').numValue(); } - } + } } svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase; - + svg.Element.PathElementBase = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.path = function(ctx) { if (ctx != null) ctx.beginPath(); return new svg.BoundingBox(); } - + this.renderChildren = function(ctx) { this.path(ctx); svg.Mouse.checkPath(this, ctx); if (ctx.fillStyle != '') ctx.fill(); if (ctx.strokeStyle != '') ctx.stroke(); - + var markers = this.getMarkers(); if (markers != null) { if (this.style('marker-start').Definition.isUrl()) { @@ -847,58 +847,58 @@ var marker = this.style('marker-end').Definition.getDefinition(); marker.render(ctx, markers[markers.length-1][0], markers[markers.length-1][1]); } - } + } } - + this.getBoundingBox = function() { return this.path(); } - + this.getMarkers = function() { return null; } } svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase; - + // svg element svg.Element.svg = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.baseClearContext = this.clearContext; this.clearContext = function(ctx) { this.baseClearContext(ctx); svg.ViewPort.RemoveCurrent(); } - + this.baseSetContext = this.setContext; this.setContext = function(ctx) { // initial values ctx.strokeStyle = 'rgba(0,0,0,0)'; ctx.lineCap = 'butt'; ctx.lineJoin = 'miter'; - ctx.miterLimit = 4; - + ctx.miterLimit = 4; + this.baseSetContext(ctx); - + // create new view port if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) { ctx.translate(this.attribute('x').Length.toPixels('x'), this.attribute('y').Length.toPixels('y')); } - + var width = svg.ViewPort.width(); var height = svg.ViewPort.height(); if (typeof(this.root) == 'undefined' && this.attribute('width').hasValue() && this.attribute('height').hasValue()) { width = this.attribute('width').Length.toPixels('x'); height = this.attribute('height').Length.toPixels('y'); - + var x = 0; var y = 0; if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) { x = -this.attribute('refX').Length.toPixels('x'); y = -this.attribute('refY').Length.toPixels('y'); } - + ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(width, y); @@ -907,19 +907,19 @@ ctx.closePath(); ctx.clip(); } - svg.ViewPort.SetCurrent(width, height); - + svg.ViewPort.SetCurrent(width, height); + // viewbox - if (this.attribute('viewBox').hasValue()) { + if (this.attribute('viewBox').hasValue()) { var viewBox = svg.ToNumberArray(this.attribute('viewBox').value); var minX = viewBox[0]; var minY = viewBox[1]; width = viewBox[2]; height = viewBox[3]; - + svg.AspectRatio(ctx, - this.attribute('preserveAspectRatio').value, - svg.ViewPort.width(), + this.attribute('preserveAspectRatio').value, + svg.ViewPort.width(), width, svg.ViewPort.height(), height, @@ -927,10 +927,10 @@ minY, this.attribute('refX').value, this.attribute('refY').value); - - svg.ViewPort.RemoveCurrent(); - svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); - } + + svg.ViewPort.RemoveCurrent(); + svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); + } } } svg.Element.svg.prototype = new svg.Element.RenderedElementBase; @@ -939,7 +939,7 @@ svg.Element.rect = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.path = function(ctx) { var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); @@ -949,7 +949,7 @@ var ry = this.attribute('ry').Length.toPixels('y'); if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx; if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry; - + if (ctx != null) { ctx.beginPath(); ctx.moveTo(x + rx, y); @@ -963,45 +963,45 @@ ctx.quadraticCurveTo(x, y, x + rx, y) ctx.closePath(); } - + return new svg.BoundingBox(x, y, x + width, y + height); } } svg.Element.rect.prototype = new svg.Element.PathElementBase; - + // circle element svg.Element.circle = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.path = function(ctx) { var cx = this.attribute('cx').Length.toPixels('x'); var cy = this.attribute('cy').Length.toPixels('y'); var r = this.attribute('r').Length.toPixels(); - + if (ctx != null) { ctx.beginPath(); - ctx.arc(cx, cy, r, 0, Math.PI * 2, true); + ctx.arc(cx, cy, r, 0, Math.PI * 2, true); ctx.closePath(); } - + return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r); } } - svg.Element.circle.prototype = new svg.Element.PathElementBase; + svg.Element.circle.prototype = new svg.Element.PathElementBase; // ellipse element svg.Element.ellipse = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.path = function(ctx) { var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3); var rx = this.attribute('rx').Length.toPixels('x'); var ry = this.attribute('ry').Length.toPixels('y'); var cx = this.attribute('cx').Length.toPixels('x'); var cy = this.attribute('cy').Length.toPixels('y'); - + if (ctx != null) { ctx.beginPath(); ctx.moveTo(cx, cy - ry); @@ -1011,48 +1011,48 @@ ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry); ctx.closePath(); } - + return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry); } } - svg.Element.ellipse.prototype = new svg.Element.PathElementBase; - + svg.Element.ellipse.prototype = new svg.Element.PathElementBase; + // line element svg.Element.line = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.getPoints = function() { return [ new svg.Point(this.attribute('x1').Length.toPixels('x'), this.attribute('y1').Length.toPixels('y')), new svg.Point(this.attribute('x2').Length.toPixels('x'), this.attribute('y2').Length.toPixels('y'))]; } - + this.path = function(ctx) { var points = this.getPoints(); - + if (ctx != null) { ctx.beginPath(); ctx.moveTo(points[0].x, points[0].y); ctx.lineTo(points[1].x, points[1].y); } - + return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y); } - + this.getMarkers = function() { - var points = this.getPoints(); + var points = this.getPoints(); var a = points[0].angleTo(points[1]); return [[points[0], a], [points[1], a]]; } } - svg.Element.line.prototype = new svg.Element.PathElementBase; - + svg.Element.line.prototype = new svg.Element.PathElementBase; + // polyline element svg.Element.polyline = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + this.points = svg.CreatePath(this.attribute('points').value); this.path = function(ctx) { var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y); @@ -1066,7 +1066,7 @@ } return bb; } - + this.getMarkers = function() { var markers = []; for (var i=0; i<this.points.length - 1; i++) { @@ -1074,15 +1074,15 @@ } markers.push([this.points[this.points.length-1], markers[markers.length-1][1]]); return markers; - } + } } - svg.Element.polyline.prototype = new svg.Element.PathElementBase; - + svg.Element.polyline.prototype = new svg.Element.PathElementBase; + // polygon element svg.Element.polygon = function(node) { this.base = svg.Element.polyline; this.base(node); - + this.basePath = this.path; this.path = function(ctx) { var bb = this.basePath(ctx); @@ -1099,7 +1099,7 @@ svg.Element.path = function(node) { this.base = svg.Element.PathElementBase; this.base(node); - + var d = this.attribute('d').value; // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF d = d.replace(/,/gm,' '); // get rid of all commas @@ -1114,7 +1114,7 @@ d = svg.trim(d); this.PathParser = new (function(d) { this.tokens = d.split(' '); - + this.reset = function() { this.i = -1; this.command = ''; @@ -1125,61 +1125,61 @@ this.points = []; this.angles = []; } - + this.isEnd = function() { return this.i >= this.tokens.length - 1; } - + this.isCommandOrEnd = function() { if (this.isEnd()) return true; return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null; } - + this.isRelativeCommand = function() { return this.command == this.command.toLowerCase(); } - + this.getToken = function() { this.i = this.i + 1; return this.tokens[this.i]; } - + this.getScalar = function() { return parseFloat(this.getToken()); } - + this.nextCommand = function() { this.previousCommand = this.command; this.command = this.getToken(); - } - + } + this.getPoint = function() { var p = new svg.Point(this.getScalar(), this.getScalar()); return this.makeAbsolute(p); } - + this.getAsControlPoint = function() { var p = this.getPoint(); this.control = p; return p; } - + this.getAsCurrentPoint = function() { var p = this.getPoint(); this.current = p; - return p; + return p; } - + this.getReflectedControlPoint = function() { if (this.previousCommand.toLowerCase() != 'c' && this.previousCommand.toLowerCase() != 's') { return this.current; } - + // reflect point - var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y); + var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y); return p; } - + this.makeAbsolute = function(p) { if (this.isRelativeCommand()) { p.x = this.current.x + p.x; @@ -1187,7 +1187,7 @@ } return p; } - + this.addMarker = function(p, from, priorTo) { // if the last angle isn't filled in because we didn't have this point yet ... if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) { @@ -1195,12 +1195,12 @@ } this.addMarkerAngle(p, from == null ? null : from.angleTo(p)); } - + this.addMarkerAngle = function(p, a) { this.points.push(p); this.angles.push(a); - } - + } + this.getMarkerPoints = function() { return this.points; } this.getMarkerAngles = function() { for (var i=0; i<this.angles.length; i++) { @@ -1398,7 +1398,7 @@ this.getMarkers = function() { var points = this.PathParser.getMarkerPoints(); var angles = this.PathParser.getMarkerAngles(); - + var markers = []; for (var i=0; i<points.length; i++) { markers.push([points[i], angles[i]]); @@ -1407,12 +1407,12 @@ } } svg.Element.path.prototype = new svg.Element.PathElementBase; - + // pattern element svg.Element.pattern = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.createPattern = function(ctx, element) { // render me using a temporary svg element var tempSvg = new svg.Element.svg(); @@ -1422,28 +1422,28 @@ tempSvg.attributes['width'] = new svg.Property('width', this.attribute('width').value); tempSvg.attributes['height'] = new svg.Property('height', this.attribute('height').value); tempSvg.children = this.children; - + var c = document.createElement('canvas'); c.width = this.attribute('width').Length.toPixels('x'); c.height = this.attribute('height').Length.toPixels('y'); - tempSvg.render(c.getContext('2d')); + tempSvg.render(c.getContext('2d')); return ctx.createPattern(c, 'repeat'); } } svg.Element.pattern.prototype = new svg.Element.ElementBase; - + // marker element svg.Element.marker = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.baseRender = this.render; this.render = function(ctx, point, angle) { ctx.translate(point.x, point.y); if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle); if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth); ctx.save(); - + // render me using a temporary svg element var tempSvg = new svg.Element.svg(); tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value); @@ -1455,7 +1455,7 @@ tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none')); tempSvg.children = this.children; tempSvg.render(ctx); - + ctx.restore(); if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1/ctx.lineWidth, 1/ctx.lineWidth); if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle); @@ -1463,99 +1463,99 @@ } } svg.Element.marker.prototype = new svg.Element.ElementBase; - + // definitions element svg.Element.defs = function(node) { this.base = svg.Element.ElementBase; - this.base(node); - + this.base(node); + this.render = function(ctx) { // NOOP } } svg.Element.defs.prototype = new svg.Element.ElementBase; - + // base for gradients svg.Element.GradientBase = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.gradientUnits = this.attribute('gradientUnits').valueOrDefault('objectBoundingBox'); - - this.stops = []; + + this.stops = []; for (var i=0; i<this.children.length; i++) { var child = this.children[i]; this.stops.push(child); - } - + } + this.getGradient = function() { // OVERRIDE ME! - } + } this.createGradient = function(ctx, element) { var stopsContainer = this; if (this.attribute('xlink:href').hasValue()) { stopsContainer = this.attribute('xlink:href').Definition.getDefinition(); } - + var g = this.getGradient(ctx, element); for (var i=0; i<stopsContainer.stops.length; i++) { g.addColorStop(stopsContainer.stops[i].offset, stopsContainer.stops[i].color); } - + if (this.attribute('gradientTransform').hasValue()) { // render as transformed pattern on temporary canvas var rootView = svg.ViewPort.viewPorts[0]; - + var rect = new svg.Element.rect(); rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0); rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0); rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS); rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS); - + var group = new svg.Element.g(); group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value); group.children = [ rect ]; - + var tempSvg = new svg.Element.svg(); tempSvg.attributes['x'] = new svg.Property('x', 0); tempSvg.attributes['y'] = new svg.Property('y', 0); tempSvg.attributes['width'] = new svg.Property('width', rootView.width); tempSvg.attributes['height'] = new svg.Property('height', rootView.height); tempSvg.children = [ group ]; - + var c = document.createElement('canvas'); c.width = rootView.width; c.height = rootView.height; var tempCtx = c.getContext('2d'); tempCtx.fillStyle = g; - tempSvg.render(tempCtx); + tempSvg.render(tempCtx); return tempCtx.createPattern(c, 'no-repeat'); } - - return g; + + return g; } } svg.Element.GradientBase.prototype = new svg.Element.ElementBase; - + // linear gradient element svg.Element.linearGradient = function(node) { this.base = svg.Element.GradientBase; this.base(node); - + this.getGradient = function(ctx, element) { var bb = element.getBoundingBox(); - - var x1 = (this.gradientUnits == 'objectBoundingBox' - ? bb.x() + bb.width() * this.attribute('x1').numValue() + + var x1 = (this.gradientUnits == 'objectBoundingBox' + ? bb.x() + bb.width() * this.attribute('x1').numValue() : this.attribute('x1').Length.toPixels('x')); - var y1 = (this.gradientUnits == 'objectBoundingBox' + var y1 = (this.gradientUnits == 'objectBoundingBox' ? bb.y() + bb.height() * this.attribute('y1').numValue() : this.attribute('y1').Length.toPixels('y')); - var x2 = (this.gradientUnits == 'objectBoundingBox' + var x2 = (this.gradientUnits == 'objectBoundingBox' ? bb.x() + bb.width() * this.attribute('x2').numValue() : this.attribute('x2').Length.toPixels('x')); - var y2 = (this.gradientUnits == 'objectBoundingBox' + var y2 = (this.gradientUnits == 'objectBoundingBox' ? bb.y() + bb.height() * this.attribute('y2').numValue() : this.attribute('y2').Length.toPixels('y')); @@ -1563,92 +1563,92 @@ } } svg.Element.linearGradient.prototype = new svg.Element.GradientBase; - + // radial gradient element svg.Element.radialGradient = function(node) { this.base = svg.Element.GradientBase; this.base(node); - + this.getGradient = function(ctx, element) { var bb = element.getBoundingBox(); - - var cx = (this.gradientUnits == 'objectBoundingBox' - ? bb.x() + bb.width() * this.attribute('cx').numValue() + + var cx = (this.gradientUnits == 'objectBoundingBox' + ? bb.x() + bb.width() * this.attribute('cx').numValue() : this.attribute('cx').Length.toPixels('x')); - var cy = (this.gradientUnits == 'objectBoundingBox' - ? bb.y() + bb.height() * this.attribute('cy').numValue() + var cy = (this.gradientUnits == 'objectBoundingBox' + ? bb.y() + bb.height() * this.attribute('cy').numValue() : this.attribute('cy').Length.toPixels('y')); - + var fx = cx; var fy = cy; if (this.attribute('fx').hasValue()) { - fx = (this.gradientUnits == 'objectBoundingBox' - ? bb.x() + bb.width() * this.attribute('fx').numValue() + fx = (this.gradientUnits == 'objectBoundingBox' + ? bb.x() + bb.width() * this.attribute('fx').numValue() : this.attribute('fx').Length.toPixels('x')); } if (this.attribute('fy').hasValue()) { - fy = (this.gradientUnits == 'objectBoundingBox' - ? bb.y() + bb.height() * this.attribute('fy').numValue() + fy = (this.gradientUnits == 'objectBoundingBox' + ? bb.y() + bb.height() * this.attribute('fy').numValue() : this.attribute('fy').Length.toPixels('y')); } - - var r = (this.gradientUnits == 'objectBoundingBox' + + var r = (this.gradientUnits == 'objectBoundingBox' ? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue() : this.attribute('r').Length.toPixels()); - + return ctx.createRadialGradient(fx, fy, 0, cx, cy, r); } } svg.Element.radialGradient.prototype = new svg.Element.GradientBase; - + // gradient stop element svg.Element.stop = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.offset = this.attribute('offset').numValue(); - + var stopColor = this.style('stop-color'); if (this.style('stop-opacity').hasValue()) stopColor = stopColor.Color.addOpacity(this.style('stop-opacity').value); this.color = stopColor.value; } svg.Element.stop.prototype = new svg.Element.ElementBase; - + // animation base element svg.Element.AnimateBase = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + svg.Animations.push(this); - + this.duration = 0.0; this.begin = this.attribute('begin').Time.toMilliseconds(); this.maxDuration = this.begin + this.attribute('dur').Time.toMilliseconds(); - + this.getProperty = function() { var attributeType = this.attribute('attributeType').value; var attributeName = this.attribute('attributeName').value; - + if (attributeType == 'CSS') { return this.parent.style(attributeName, true); } - return this.parent.attribute(attributeName, true); + return this.parent.attribute(attributeName, true); }; - + this.initialValue = null; - this.removed = false; + this.removed = false; this.calcValue = function() { // OVERRIDE ME! return ''; } - - this.update = function(delta) { + + this.update = function(delta) { // set initial value if (this.initialValue == null) { this.initialValue = this.getProperty().value; } - + // if we're past the end time if (this.duration > this.maxDuration) { // loop for indefinitely repeating animations @@ -1663,49 +1663,49 @@ else { return false; // no updates made } - } + } this.duration = this.duration + delta; - + // if we're past the begin time var updated = false; if (this.begin < this.duration) { var newValue = this.calcValue(); // tween - + if (this.attribute('type').hasValue()) { // for transform, etc. var type = this.attribute('type').value; newValue = type + '(' + newValue + ')'; } - + this.getProperty().value = newValue; updated = true; } - + return updated; } - + // fraction of duration we've covered this.progress = function() { return ((this.duration - this.begin) / (this.maxDuration - this.begin)); - } + } } svg.Element.AnimateBase.prototype = new svg.Element.ElementBase; - + // animate element svg.Element.animate = function(node) { this.base = svg.Element.AnimateBase; this.base(node); - + this.calcValue = function() { var from = this.attribute('from').numValue(); var to = this.attribute('to').numValue(); - + // tween value linearly - return from + (to - from) * this.progress(); + return from + (to - from) * this.progress(); }; } svg.Element.animate.prototype = new svg.Element.AnimateBase; - + // animate color element svg.Element.animateColor = function(node) { this.base = svg.Element.AnimateBase; @@ -1714,7 +1714,7 @@ this.calcValue = function() { var from = new RGBColor(this.attribute('from').value); var to = new RGBColor(this.attribute('to').value); - + if (from.ok && to.ok) { // tween color linearly var r = from.r + (to.r - from.r) * this.progress(); @@ -1726,26 +1726,26 @@ }; } svg.Element.animateColor.prototype = new svg.Element.AnimateBase; - + // animate transform element svg.Element.animateTransform = function(node) { this.base = svg.Element.animate; this.base(node); } svg.Element.animateTransform.prototype = new svg.Element.animate; - + // font element svg.Element.font = function(node) { this.base = svg.Element.ElementBase; this.base(node); - this.horizAdvX = this.attribute('horiz-adv-x').numValue(); - + this.horizAdvX = this.attribute('horiz-adv-x').numValue(); + this.isRTL = false; this.isArabic = false; this.fontFace = null; this.missingGlyph = null; - this.glyphs = []; + this.glyphs = []; for (var i=0; i<this.children.length; i++) { var child = this.children[i]; if (child.type == 'font-face') { @@ -1766,46 +1766,46 @@ this.glyphs[child.unicode] = child; } } - } + } } svg.Element.font.prototype = new svg.Element.ElementBase; - + // font-face element svg.Element.fontface = function(node) { this.base = svg.Element.ElementBase; - this.base(node); - + this.base(node); + this.ascent = this.attribute('ascent').value; this.descent = this.attribute('descent').value; - this.unitsPerEm = this.attribute('units-per-em').numValue(); + this.unitsPerEm = this.attribute('units-per-em').numValue(); } svg.Element.fontface.prototype = new svg.Element.ElementBase; - + // missing-glyph element svg.Element.missingglyph = function(node) { this.base = svg.Element.path; - this.base(node); - + this.base(node); + this.horizAdvX = 0; } svg.Element.missingglyph.prototype = new svg.Element.path; - + // glyph element svg.Element.glyph = function(node) { this.base = svg.Element.path; - this.base(node); - + this.base(node); + this.horizAdvX = this.attribute('horiz-adv-x').numValue(); this.unicode = this.attribute('unicode').value; this.arabicForm = this.attribute('arabic-form').value; } svg.Element.glyph.prototype = new svg.Element.path; - + // text element svg.Element.text = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + if (node != null) { // add children this.children = []; @@ -1819,21 +1819,21 @@ } } } - + this.baseSetContext = this.setContext; this.setContext = function(ctx) { this.baseSetContext(ctx); if (this.style('dominant-baseline').hasValue()) ctx.textBaseline = this.style('dominant-baseline').value; if (this.style('alignment-baseline').hasValue()) ctx.textBaseline = this.style('alignment-baseline').value; } - + this.renderChildren = function(ctx) { var textAnchor = this.style('text-anchor').valueOrDefault('start'); var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); for (var i=0; i<this.children.length; i++) { var child = this.children[i]; - + if (child.attribute('x').hasValue()) { child.x = child.attribute('x').Length.toPixels('x'); } @@ -1841,7 +1841,7 @@ if (child.attribute('dx').hasValue()) x += child.attribute('dx').Length.toPixels('x'); child.x = x; } - + var childLength = child.measureText(ctx); if (textAnchor != 'start' && (i==0 || child.attribute('x').hasValue())) { // new group? // loop through rest of children @@ -1854,33 +1854,33 @@ child.x -= (textAnchor == 'end' ? groupLength : groupLength / 2.0); } x = child.x + childLength; - + if (child.attribute('y').hasValue()) { child.y = child.attribute('y').Length.toPixels('y'); } else { if (child.attribute('dy').hasValue()) y += child.attribute('dy').Length.toPixels('y'); child.y = y; - } + } y = child.y; - + child.render(ctx); } } } svg.Element.text.prototype = new svg.Element.RenderedElementBase; - + // text base svg.Element.TextElementBase = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.getGlyph = function(font, text, i) { var c = text[i]; var glyph = null; if (font.isArabic) { var arabicForm = 'isolated'; - if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal'; + if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal'; if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial'; if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial'; if (typeof(font.glyphs[c]) != 'undefined') { @@ -1894,7 +1894,7 @@ if (glyph == null) glyph = font.missingGlyph; return glyph; } - + this.renderChildren = function(ctx) { var customFont = this.parent.style('font-family').Definition.getDefinition(); if (customFont != null) { @@ -1902,7 +1902,7 @@ var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle); var text = this.getText(); if (customFont.isRTL) text = text.split("").reverse().join(""); - + var dx = svg.ToNumberArray(this.parent.attribute('dx').value); for (var i=0; i<text.length; i++) { var glyph = this.getGlyph(customFont, text, i); @@ -1916,8 +1916,8 @@ if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0); ctx.lineWidth = lw; ctx.scale(1/scale, -1/scale); - ctx.translate(-this.x, -this.y); - + ctx.translate(-this.x, -this.y); + this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm; if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) { this.x += dx[i]; @@ -1925,15 +1925,15 @@ } return; } - + if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y); if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y); } - + this.getText = function() { // OVERRIDE ME } - + this.measureText = function(ctx) { var customFont = this.parent.style('font-family').Definition.getDefinition(); if (customFont != null) { @@ -1951,10 +1951,10 @@ } return measure; } - + var textToMeasure = svg.compressSpaces(this.getText()); if (!ctx.measureText) return textToMeasure.length * 10; - + ctx.save(); this.setContext(ctx); var width = ctx.measureText(textToMeasure).width; @@ -1963,12 +1963,12 @@ } } svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase; - - // tspan + + // tspan svg.Element.tspan = function(node) { this.base = svg.Element.TextElementBase; this.base(node); - + this.text = node.nodeType == 3 ? node.nodeValue : // text node.childNodes.length > 0 ? node.childNodes[0].nodeValue : // element node.text; @@ -1977,34 +1977,34 @@ } } svg.Element.tspan.prototype = new svg.Element.TextElementBase; - + // tref svg.Element.tref = function(node) { this.base = svg.Element.TextElementBase; this.base(node); - + this.getText = function() { var element = this.attribute('xlink:href').Definition.getDefinition(); if (element != null) return element.children[0].getText(); } } - svg.Element.tref.prototype = new svg.Element.TextElementBase; - + svg.Element.tref.prototype = new svg.Element.TextElementBase; + // a element svg.Element.a = function(node) { this.base = svg.Element.TextElementBase; this.base(node); - + this.hasText = true; for (var i=0; i<node.childNodes.length; i++) { if (node.childNodes[i].nodeType != 3) this.hasText = false; } - + // this might contain text this.text = this.hasText ? node.childNodes[0].nodeValue : ''; this.getText = function() { return this.text; - } + } this.baseRenderChildren = this.renderChildren; this.renderChildren = function(ctx) { @@ -2012,7 +2012,7 @@ // render as text element this.baseRenderChildren(ctx); var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize); - svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.Length.toPixels('y'), this.x + this.measureText(ctx), this.y)); + svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.Length.toPixels('y'), this.x + this.measureText(ctx), this.y)); } else { // render as temporary group @@ -2022,37 +2022,37 @@ g.render(ctx); } } - + this.onclick = function() { window.open(this.attribute('xlink:href').value); } - + this.onmousemove = function() { svg.ctx.canvas.style.cursor = 'pointer'; } } - svg.Element.a.prototype = new svg.Element.TextElementBase; - + svg.Element.a.prototype = new svg.Element.TextElementBase; + // image element svg.Element.image = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + svg.Images.push(this); this.img = document.createElement('img'); this.loaded = false; var that = this; this.img.onload = function() { that.loaded = true; } this.img.src = this.attribute('xlink:href').value; - + this.renderChildren = function(ctx) { var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); - + var width = this.attribute('width').Length.toPixels('x'); - var height = this.attribute('height').Length.toPixels('y'); + var height = this.attribute('height').Length.toPixels('y'); if (width == 0 || height == 0) return; - + ctx.save(); ctx.translate(x, y); svg.AspectRatio(ctx, @@ -2062,18 +2062,18 @@ height, this.img.height, 0, - 0); - ctx.drawImage(this.img, 0, 0); + 0); + ctx.drawImage(this.img, 0, 0); ctx.restore(); } } svg.Element.image.prototype = new svg.Element.RenderedElementBase; - + // group element svg.Element.g = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.getBoundingBox = function() { var bb = new svg.BoundingBox(); for (var i=0; i<this.children.length; i++) { @@ -2088,21 +2088,21 @@ svg.Element.symbol = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.baseSetContext = this.setContext; - this.setContext = function(ctx) { + this.setContext = function(ctx) { this.baseSetContext(ctx); - + // viewbox - if (this.attribute('viewBox').hasValue()) { + if (this.attribute('viewBox').hasValue()) { var viewBox = svg.ToNumberArray(this.attribute('viewBox').value); var minX = viewBox[0]; var minY = viewBox[1]; width = viewBox[2]; height = viewBox[3]; - + svg.AspectRatio(ctx, - this.attribute('preserveAspectRatio').value, + this.attribute('preserveAspectRatio').value, this.attribute('width').Length.toPixels('x'), width, this.attribute('height').Length.toPixels('y'), @@ -2110,17 +2110,17 @@ minX, minY); - svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); + svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]); } - } + } } - svg.Element.symbol.prototype = new svg.Element.RenderedElementBase; - + svg.Element.symbol.prototype = new svg.Element.RenderedElementBase; + // style element - svg.Element.style = function(node) { + svg.Element.style = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + // text, or spaces then CDATA var css = node.childNodes[0].nodeValue + (node.childNodes.length > 1 ? node.childNodes[1].nodeValue : ''); css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments @@ -2167,60 +2167,60 @@ } } svg.Element.style.prototype = new svg.Element.ElementBase; - - // use element + + // use element svg.Element.use = function(node) { this.base = svg.Element.RenderedElementBase; this.base(node); - + this.baseSetContext = this.setContext; this.setContext = function(ctx) { this.baseSetContext(ctx); if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').Length.toPixels('x'), 0); if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').Length.toPixels('y')); } - + this.getDefinition = function() { var element = this.attribute('xlink:href').Definition.getDefinition(); if (this.attribute('width').hasValue()) element.attribute('width', true).value = this.attribute('width').value; if (this.attribute('height').hasValue()) element.attribute('height', true).value = this.attribute('height').value; return element; } - + this.path = function(ctx) { var element = this.getDefinition(); if (element != null) element.path(ctx); } - + this.renderChildren = function(ctx) { var element = this.getDefinition(); if (element != null) element.render(ctx); } } svg.Element.use.prototype = new svg.Element.RenderedElementBase; - + // mask element svg.Element.mask = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.apply = function(ctx, element) { - // render as temp svg + // render as temp svg var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); var width = this.attribute('width').Length.toPixels('x'); var height = this.attribute('height').Length.toPixels('y'); - + // temporarily remove mask to avoid recursion var mask = element.attribute('mask').value; element.attribute('mask').value = ''; - + var cMask = document.createElement('canvas'); cMask.width = x + width; cMask.height = y + height; var maskCtx = cMask.getContext('2d'); this.renderChildren(maskCtx); - + var c = document.createElement('canvas'); c.width = x + width; c.height = y + height; @@ -2229,25 +2229,25 @@ tempCtx.globalCompositeOperation = 'destination-in'; tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat'); tempCtx.fillRect(0, 0, x + width, y + height); - + ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat'); ctx.fillRect(0, 0, x + width, y + height); - + // reassign mask - element.attribute('mask').value = mask; + element.attribute('mask').value = mask; } - + this.render = function(ctx) { // NO RENDER } } svg.Element.mask.prototype = new svg.Element.ElementBase; - + // clip element svg.Element.clipPath = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.apply = function(ctx) { for (var i=0; i<this.children.length; i++) { if (this.children[i].path) { @@ -2256,7 +2256,7 @@ } } } - + this.render = function(ctx) { // NO RENDER } @@ -2267,9 +2267,9 @@ svg.Element.filter = function(node) { this.base = svg.Element.ElementBase; this.base(node); - + this.apply = function(ctx, element) { - // render as temp svg + // render as temp svg var bb = element.getBoundingBox(); var x = this.attribute('x').Length.toPixels('x'); var y = this.attribute('y').Length.toPixels('y'); @@ -2283,55 +2283,55 @@ width = bb.width(); height = bb.height(); } - + // temporarily remove filter to avoid recursion var filter = element.style('filter').value; element.style('filter').value = ''; - + // max filter distance var extraPercent = .20; var px = extraPercent * width; var py = extraPercent * height; - + var c = document.createElement('canvas'); c.width = width + 2*px; c.height = height + 2*py; var tempCtx = c.getContext('2d'); tempCtx.translate(-x + px, -y + py); element.render(tempCtx); - + // apply filters for (var i=0; i<this.children.length; i++) { this.children[i].apply(tempCtx, 0, 0, width + 2*px, height + 2*py); } - + // render on me ctx.drawImage(c, 0, 0, width + 2*px, height + 2*py, x - px, y - py, width + 2*px, height + 2*py); - + // reassign filter - element.style('filter', true).value = filter; + element.style('filter', true).value = filter; } - + this.render = function(ctx) { // NO RENDER - } + } } svg.Element.filter.prototype = new svg.Element.ElementBase; - + svg.Element.feGaussianBlur = function(node) { this.base = svg.Element.ElementBase; - this.base(node); - + this.base(node); + function make_fgauss(sigma) { - sigma = Math.max(sigma, 0.01); - var len = Math.ceil(sigma * 4.0) + 1; - mask = []; - for (var i = 0; i < len; i++) { - mask[i] = Math.exp(-0.5 * (i / sigma) * (i / sigma)); - } - return mask; + sigma = Math.max(sigma, 0.01); + var len = Math.ceil(sigma * 4.0) + 1; + mask = []; + for (var i = 0; i < len; i++) { + mask[i] = Math.exp(-0.5 * (i / sigma) * (i / sigma)); + } + return mask; } - + function normalize(mask) { var sum = 0; for (var i = 1; i < mask.length; i++) { @@ -2343,34 +2343,34 @@ } return mask; } - + function convolve_even(src, dst, mask, width, height) { for (var y = 0; y < height; y++) { for (var x = 0; x < width; x++) { var a = imGet(src, x, y, width, height, 3)/255; - for (var rgba = 0; rgba < 4; rgba++) { + for (var rgba = 0; rgba < 4; rgba++) { var sum = mask[0] * (a==0?255:imGet(src, x, y, width, height, rgba)) * (a==0||rgba==3?1:a); for (var i = 1; i < mask.length; i++) { var a1 = imGet(src, Math.max(x-i,0), y, width, height, 3)/255; var a2 = imGet(src, Math.min(x+i, width-1), y, width, height, 3)/255; - sum += mask[i] * - ((a1==0?255:imGet(src, Math.max(x-i,0), y, width, height, rgba)) * (a1==0||rgba==3?1:a1) + + sum += mask[i] * + ((a1==0?255:imGet(src, Math.max(x-i,0), y, width, height, rgba)) * (a1==0||rgba==3?1:a1) + (a2==0?255:imGet(src, Math.min(x+i, width-1), y, width, height, rgba)) * (a2==0||rgba==3?1:a2)); } imSet(dst, y, x, height, width, rgba, sum); - } + } } } - } + } function imGet(img, x, y, width, height, rgba) { return img[y*width*4 + x*4 + rgba]; } - + function imSet(img, x, y, width, height, rgba, val) { img[y*width*4 + x*4 + rgba] = val; } - + function blur(ctx, width, height, sigma) { var srcData = ctx.getImageData(0, 0, width, height); @@ -2381,15 +2381,15 @@ convolve_even(tmp, srcData.data, mask, height, width); ctx.clearRect(0, 0, width, height); ctx.putImageData(srcData, 0, 0); - } - + } + this.apply = function(ctx, x, y, width, height) { // assuming x==0 && y==0 for now blur(ctx, width, height, this.attribute('stdDeviation').numValue()); } } svg.Element.filter.prototype = new svg.Element.feGaussianBlur; - + // title element, do nothing svg.Element.title = function(node) { } @@ -2398,15 +2398,15 @@ // desc element, do nothing svg.Element.desc = function(node) { } - svg.Element.desc.prototype = new svg.Element.ElementBase; - + svg.Element.desc.prototype = new svg.Element.ElementBase; + svg.Element.MISSING = function(node) { console.log('ERROR: Element \'' + node.nodeName + '\' not yet implemented.'); } svg.Element.MISSING.prototype = new svg.Element.ElementBase; - + // element factory - svg.CreateElement = function(node) { + svg.CreateElement = function(node) { var className = node.nodeName.replace(/^[^:]+:/,''); // remove namespace className = className.replace(/\-/g,''); // remove dashes var e = null; @@ -2420,20 +2420,20 @@ e.type = node.nodeName; return e; } - + // load from url svg.load = function(ctx, url) { svg.loadXml(ctx, svg.ajax(url)); } - + // load from xml svg.loadXml = function(ctx, xml) { svg.loadXmlDoc(ctx, svg.parseXml(xml)); } - + svg.loadXmlDoc = function(ctx, dom) { svg.init(ctx); - + var mapXY = function(p) { var e = ctx.canvas; while (e) { @@ -2445,7 +2445,7 @@ if (window.scrollY) p.y += window.scrollY; return p; } - + // bind mouse if (svg.opts['ignoreMouse'] != true) { ctx.canvas.onclick = function(e) { @@ -2457,16 +2457,16 @@ svg.Mouse.onmousemove(p.x, p.y); }; } - + var e = svg.CreateElement(dom.documentElement); e.root = true; - + // render loop var isFirstRender = true; var draw = function() { svg.ViewPort.Clear(); if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight); - + if (svg.opts['ignoreDimensions'] != true) { // set canvas size if (e.style('width').hasValue()) { @@ -2480,21 +2480,21 @@ } var cWidth = ctx.canvas.clientWidth || ctx.canvas.width; var cHeight = ctx.canvas.clientHeight || ctx.canvas.height; - svg.ViewPort.SetCurrent(cWidth, cHeight); - + svg.ViewPort.SetCurrent(cWidth, cHeight); + if (svg.opts != null && svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts['offsetX']; if (svg.opts != null && svg.opts['offsetY'] != null) e.attribute('y', true).value = svg.opts['offsetY']; if (svg.opts != null && svg.opts['scaleWidth'] != null && svg.opts['scaleHeight'] != null) { var xRatio = 1, yRatio = 1; if (e.attribute('width').hasValue()) xRatio = e.attribute('width').Length.toPixels('x') / svg.opts['scaleWidth']; if (e.attribute('height').hasValue()) yRatio = e.attribute('height').Length.toPixels('y') / svg.opts['scaleHeight']; - + e.attribute('width', true).value = svg.opts['scaleWidth']; - e.attribute('height', true).value = svg.opts['scaleHeight']; + e.attribute('height', true).value = svg.opts['scaleHeight']; e.attribute('viewBox', true).value = '0 0 ' + (cWidth * xRatio) + ' ' + (cHeight * yRatio); e.attribute('preserveAspectRatio', true).value = 'none'; } - + // clear and render if (svg.opts['ignoreClear'] != true) { ctx.clearRect(0, 0, cWidth, cHeight); @@ -2503,88 +2503,88 @@ if (isFirstRender) { isFirstRender = false; if (svg.opts != null && typeof(svg.opts['renderCallback']) == 'function') svg.opts['renderCallback'](); - } + } } - + var waitingForImages = true; if (svg.ImagesLoaded()) { waitingForImages = false; draw(); } - svg.intervalID = setInterval(function() { + svg.intervalID = setInterval(function() { var needUpdate = false; - + if (waitingForImages && svg.ImagesLoaded()) { waitingForImages = false; needUpdate = true; } - + // need update from mouse events? if (svg.opts['ignoreMouse'] != true) { needUpdate = needUpdate | svg.Mouse.hasEvents(); } - + // need update from animations? if (svg.opts['ignoreAnimation'] != true) { for (var i=0; i<svg.Animations.length; i++) { needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE); } } - + // need update from redraw? if (svg.opts != null && typeof(svg.opts['forceRedraw']) == 'function') { if (svg.opts['forceRedraw']() == true) needUpdate = true; } - + // render if needed if (needUpdate) { - draw(); + draw(); svg.Mouse.runEvents(); // run and clear our events } }, 1000 / svg.FRAMERATE); } - + svg.stop = function() { if (svg.intervalID) { clearInterval(svg.intervalID); } } - + svg.Mouse = new (function() { this.events = []; this.hasEvents = function() { return this.events.length != 0; } - + this.onclick = function(x, y) { - this.events.push({ type: 'onclick', x: x, y: y, + this.events.push({ type: 'onclick', x: x, y: y, run: function(e) { if (e.onclick) e.onclick(); } }); } - + this.onmousemove = function(x, y) { this.events.push({ type: 'onmousemove', x: x, y: y, run: function(e) { if (e.onmousemove) e.onmousemove(); } }); - } - + } + this.eventElements = []; - + this.checkPath = function(element, ctx) { for (var i=0; i<this.events.length; i++) { var e = this.events[i]; if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) this.eventElements[i] = element; } } - + this.checkBoundingBox = function(element, bb) { for (var i=0; i<this.events.length; i++) { var e = this.events[i]; if (bb.isPointInBox(e.x, e.y)) this.eventElements[i] = element; - } + } } - + this.runEvents = function() { svg.ctx.canvas.style.cursor = ''; - + for (var i=0; i<this.events.length; i++) { var e = this.events[i]; var element = this.eventElements[i]; @@ -2592,29 +2592,29 @@ e.run(element); element = element.parent; } - } - + } + // done running, clear - this.events = []; + this.events = []; this.eventElements = []; } }); - + return svg; } })(); if (CanvasRenderingContext2D) { CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh) { - canvg(this.canvas, s, { - ignoreMouse: true, - ignoreAnimation: true, - ignoreDimensions: true, - ignoreClear: true, - offsetX: dx, - offsetY: dy, - scaleWidth: dw, + canvg(this.canvas, s, { + ignoreMouse: true, + ignoreAnimation: true, + ignoreDimensions: true, + ignoreClear: true, + offsetX: dx, + offsetY: dy, + scaleWidth: dw, scaleHeight: dh }); } -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu.js index 52ba1b3..065103e 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu.js @@ -1,8 +1,8 @@ /** * Package: svgedit.contextmenu - * + * * Licensed under the Apache License, Version 2 - * + * * Author: Adam Bender */ // Dependencies: @@ -45,7 +45,7 @@ $("#cmenu_canvas").append("<li class='separator'>"); } var shortcut = menuItem.shortcut || ""; - $("#cmenu_canvas").append("<li class='disabled'><a href='#" + menuItem.id + "'>" + $("#cmenu_canvas").append("<li class='disabled'><a href='#" + menuItem.id + "'>" + menuItem.label + "<span class='shortcut'>" + shortcut + "</span></a></li>"); } @@ -53,7 +53,7 @@ var menuItemIsValid = function(menuItem) { return menuItem && menuItem.id && menuItem.label && menuItem.action && typeof menuItem.action == 'function'; } - + // Defer injection to wait out initial menu processing. This probably goes away once all context // menu behavior is brought here. methodDraw.ready(function() { diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu/jquery.contextMenu.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu/jquery.contextMenu.js index 64bc958..e1309fd 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu/jquery.contextMenu.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/contextmenu/jquery.contextMenu.js @@ -18,7 +18,7 @@ var doc = $(document); $.extend($.fn, { - + contextMenu: function(o, callback) { // Defaults if( o.menu == undefined ) return false; @@ -31,7 +31,7 @@ $(this).each( function() { var el = $(this); var offset = $(el).offset(); - + var menu = $('#' + o.menu); // Add contextMenu class @@ -57,28 +57,28 @@ open_context_menu(e,e, srcElement); }) } - + var open_context_menu = function(e, evt, srcElement) { if (typeof evt == 'undefined') evt = e; e.stopPropagation(); - + // Get this context menu - + if( el.hasClass('disabled') || evt.altKey ) return false; - + // Detect mouse position var d = {}, x = e.pageX, y = e.pageY; if (svgedit.browser.isTouch()) var d = {}, x = e.originalEvent.touches[0].pageX, y = e.originalEvent.touches[0].pageY; - - var x_off = win.width() - menu.width(), + + var x_off = win.width() - menu.width(), y_off = win.height() - menu.height(); - + if(x > x_off - 15) x = x_off-15; if(y > y_off - 30) y = y_off-30; // 30 is needed to prevent scrollbars in FF - - if(svgedit.browser.isTouch()) + + if(svgedit.browser.isTouch()) y = y - (menu.height()/2) - + // Show the menu doc.unbind('click'); menu.css({ top: y, left: x }).fadeIn(o.inSpeed); @@ -89,7 +89,7 @@ }).mouseout( function() { menu.find('LI.hover').removeClass('hover'); }); - + // Keyboard doc.keypress( function(e) { switch( e.keyCode ) { @@ -117,7 +117,7 @@ break } }); - + // When items are selected menu.find('A').unbind('mouseup'); menu.find('LI:not(.disabled) A').mouseup( function() { @@ -127,7 +127,7 @@ if( callback ) callback( $(this).attr('href').substr(1), $(srcElement), {x: x - offset.left, y: y - offset.top, docX: x, docY: y} ); return false; }); - + // Hide bindings setTimeout( function() { // Delay for Mozilla doc.click( function() { @@ -137,15 +137,15 @@ }); }, 0); } - + // Disable browser context menu (requires both selectors to work in IE/Safari + FF/Chrome) $(el).add($('UL.contextMenu')).bind('contextmenu', function() { return false; }); - + }); return $(this); }, - + // Disable context menu items on the fly disableContextMenuItems: function(o) { if( o == undefined ) { @@ -158,13 +158,13 @@ var d = o.split(','); for( var i = 0; i < d.length; i++ ) { $(this).find('A[href="' + d[i] + '"]').parent().addClass('disabled'); - + } } }); return( $(this) ); }, - + // Enable context menu items on the fly enableContextMenuItems: function(o) { if( o == undefined ) { @@ -177,13 +177,13 @@ var d = o.split(','); for( var i = 0; i < d.length; i++ ) { $(this).find('A[href="' + d[i] + '"]').parent().removeClass('disabled'); - + } } }); return( $(this) ); }, - + // Disable context menu(s) disableContextMenu: function() { $(this).each( function() { @@ -191,7 +191,7 @@ }); return( $(this) ); }, - + // Enable context menu(s) enableContextMenu: function() { $(this).each( function() { @@ -199,7 +199,7 @@ }); return( $(this) ); }, - + // Destroy context menu(s) destroyContextMenu: function() { // Destroy specified context menus @@ -209,6 +209,6 @@ }); return( $(this) ); } - + }); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/filesaver.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/filesaver.js index afee7ec..64e0113 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/filesaver.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/filesaver.js @@ -267,4 +267,4 @@ define([], function() { return saveAs; }); -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/LICENSE b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/LICENSE index d645695..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/LICENSE +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/LICENSE @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/README b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/README index ef3e21f..e69de29 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/README +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/README @@ -1,3 +0,0 @@ -jGraduate - A jQuery plugin for picking gradients - -Licensed under the Apache License 2. See LICENSE for more information. diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jPicker.css b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jPicker.css index 5bb30fd..0843b1a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jPicker.css +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jPicker.css @@ -45,23 +45,23 @@ } #svg_editor .jPicker div.Map { - + border: solid #000 1px; - + cursor: crosshair; - + height: 260px; - + margin: 0; - + overflow: hidden; - + padding: 0; - + position: relative; - + width: 260px; - + } #svg_editor .jPicker div[class="Map"] { height: 256px; diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jgraduate.css b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jgraduate.css index 2283c00..91db2c4 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jgraduate.css +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/css/jgraduate.css @@ -1,6 +1,6 @@ -/* +/* * jGraduate Default CSS - * + * * Copyright (c) 2010 Jeff Schiller * http://blog.codedread.com/ * @@ -35,7 +35,7 @@ display: none; } -.jGraduate_gradPick { +.jGraduate_gradPick { display: none; overflow: visible; /* position: relative;*/ @@ -55,7 +55,7 @@ } div.jGraduate_GradContainer { border: solid #000 1px; - background-image: url(../images/map-opacity.png); + background-image: url(../images/map-opacity.png); background-position: 0px 0px; height: 256px; width: 256px; @@ -183,13 +183,13 @@ div.jGraduate_stopPicker { position: absolute; display: none; - background: + background: white; padding: 20px; border-radius: 3px; width: 530px; height: 300px; - box-shadow: 0 5px 25px + box-shadow: 0 5px 25px black; } diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jpicker.min.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jpicker.min.js index 147b197..7044b9d 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jpicker.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jpicker.min.js @@ -566,7 +566,7 @@ s, v, changeEvents = new Array(), - fireChangeEvents = + fireChangeEvents = function(context) { for (var i = 0; i < changeEvents.length; i++) changeEvents[i].call($this, $this, context); @@ -2084,4 +2084,4 @@ } } }; -})(jQuery, '1.1.6'); \ No newline at end of file +})(jQuery, '1.1.6'); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.js index 1aa6dfa..5e3d803 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.js @@ -17,10 +17,10 @@ window: { title: "Pick the start color and opacity for the gradient" }, images: { clientPath: "images/" }, paint: a Paint object, - newstop: String of value "same", "inverse", "black" or "white" + newstop: String of value "same", "inverse", "black" or "white" OR object with one or both values {color: #Hex color, opac: number 0-1} } - + - the Paint object is: Paint { type: String, // one of "none", "solidColor", "linearGradient", "radialGradient" @@ -48,9 +48,9 @@ * */ - + (function() { - + var ns = { svg: 'http://www.w3.org/2000/svg', xlink: 'http://www.w3.org/1999/xlink' }; if(!window.console) { window.console = new function() { @@ -59,7 +59,7 @@ }; } -$.jGraduate = { +$.jGraduate = { Paint: function(opt) { var options = opt || {}; @@ -157,13 +157,13 @@ var $this = $(this), $settings = $.extend(true, {}, jQuery.fn.jGraduateDefaults, options), id = $this.attr('id'), idref = '#'+$this.attr('id')+' '; - + if (!idref) { alert('Container element must have an id attribute to maintain unique id strings for sub-elements.'); return; } - + var okClicked = function() { switch ( $this.paint.type ) { case "radialGradient": @@ -199,7 +199,7 @@ if ($this.paint.type == "none") { $this.paint = $.jGraduate.Paint({solidColor: 'ffffff'}); } - + $this.addClass('jGraduate_Picker'); $this.html('<ul class="jGraduate_tabs">' + '<li class="jGraduate_tab_color jGraduate_tab_current" data-type="col">Solid Color</li>' + @@ -210,18 +210,18 @@ '<div class="jGraduate_gradPick"></div>' + '<div class="jGraduate_LightBox"></div>' + '<div id="' + id + '_jGraduate_stopPicker" class="jGraduate_stopPicker"></div>' - - + + ); var colPicker = $(idref + '> .jGraduate_colPick'); var gradPicker = $(idref + '> .jGraduate_gradPick'); - + gradPicker.html( '<div id="' + id + '_jGraduate_Swatch" class="jGraduate_Swatch">' + '<h2 class="jGraduate_Title">' + $settings.window.pickerTitle + '</h2>' + '<div id="' + id + '_jGraduate_GradContainer" class="jGraduate_GradContainer"></div>' + '<div id="' + id + '_jGraduate_StopSlider" class="jGraduate_StopSlider"></div>' + - '</div>' + + '</div>' + '<div class="jGraduate_Form jGraduate_Points jGraduate_lg_field">' + '<div class="jGraduate_StopSection">' + '<label class="jGraduate_Form_Heading">Begin Point</label>' + @@ -270,7 +270,7 @@ '<option value=pad selected>Pad</option>' + '<option value=reflect>Reflect</option>' + '<option value=repeat>Repeat</option>' + - '</select>' + + '</select>' + '</div>' + '</div>' + '<div class="jGraduate_Form">' + @@ -279,66 +279,66 @@ '<div id="' + id + '_jGraduate_Radius" class="jGraduate_SliderBar jGraduate_Radius" title="Click to set radius">' + '<img id="' + id + '_jGraduate_RadiusArrows" class="jGraduate_RadiusArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + - '<label><input type="text" id="' + id + '_jGraduate_RadiusInput" size="3" value="100"/>%</label>' + + '<label><input type="text" id="' + id + '_jGraduate_RadiusInput" size="3" value="100"/>%</label>' + '</div>' + '<div class="jGraduate_Slider jGraduate_EllipField jGraduate_rg_field">' + '<label class="prelabel">Ellip:</label>' + '<div id="' + id + '_jGraduate_Ellip" class="jGraduate_SliderBar jGraduate_Ellip" title="Click to set Ellip">' + '<img id="' + id + '_jGraduate_EllipArrows" class="jGraduate_EllipArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + - '<label><input type="text" id="' + id + '_jGraduate_EllipInput" size="3" value="0"/>%</label>' + + '<label><input type="text" id="' + id + '_jGraduate_EllipInput" size="3" value="0"/>%</label>' + '</div>' + '<div class="jGraduate_Slider jGraduate_AngleField jGraduate_rg_field">' + '<label class="prelabel">Angle:</label>' + '<div id="' + id + '_jGraduate_Angle" class="jGraduate_SliderBar jGraduate_Angle" title="Click to set Angle">' + '<img id="' + id + '_jGraduate_AngleArrows" class="jGraduate_AngleArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + - '<label><input type="text" id="' + id + '_jGraduate_AngleInput" size="3" value="0"/>潞 </label>' + + '<label><input type="text" id="' + id + '_jGraduate_AngleInput" size="3" value="0"/>潞 </label>' + '</div>' + '<div class="jGraduate_Slider jGraduate_OpacField">' + '<label class="prelabel">Opac:</label>' + '<div id="' + id + '_jGraduate_Opac" class="jGraduate_SliderBar jGraduate_Opac" title="Click to set Opac">' + '<img id="' + id + '_jGraduate_OpacArrows" class="jGraduate_OpacArrows" src="' + $settings.images.clientPath + 'rangearrows2.gif">' + '</div>' + - '<label><input type="text" id="' + id + '_jGraduate_OpacInput" size="3" value="100"/>%</label>' + + '<label><input type="text" id="' + id + '_jGraduate_OpacInput" size="3" value="100"/>%</label>' + '</div>' + '</div>' + '<div class="jGraduate_OkCancel">' + '<input type="button" id="' + id + '_jGraduate_Ok" class="jGraduate_Ok" value="OK"/>' + '<input type="button" id="' + id + '_jGraduate_Cancel" class="jGraduate_Cancel" value="Cancel"/>' + '</div>'); - + // -------------- // Set up all the SVG elements (the gradient, stops and rectangle) var MAX = 256, MARGINX = 0, MARGINY = 0, STOP_RADIUS = 15/2, SIZEX = MAX - 2*MARGINX, SIZEY = MAX - 2*MARGINY; - - var curType, curGradient, previewRect; - + + var curType, curGradient, previewRect; + var attr_input = {}; - + var SLIDERW = 145; $('.jGraduate_SliderBar').width(SLIDERW); - + var container = $('#' + id+'_jGraduate_GradContainer')[0]; - + var svg = mkElem('svg', { id: id + '_jgraduate_svg', width: MAX, height: MAX, xmlns: ns.svg }, container); - - // if we are sent a gradient, import it - + + // if we are sent a gradient, import it + curType = curType || $this.paint.type; - + var grad = curGradient = $this.paint[curType]; - + var gradalpha = $this.paint.alpha; - + var isSolid = curType === 'solidColor'; - + // Make any missing gradients switch ( curType ) { case "solidColor": @@ -365,18 +365,18 @@ y2: 0 }, svg); } - + if(isSolid) { grad = curGradient = $('#' + id + '_lg_jgraduate_grad')[0]; var color = $this.paint[curType]; mkStop(0, '#' + color, 1); - + var type = typeof $settings.newstop; - + if(type === 'string') { switch ( $settings.newstop ) { case 'same': - mkStop(1, '#' + color, 1); + mkStop(1, '#' + color, 1); break; case 'inverse': @@ -393,11 +393,11 @@ } mkStop(1, '#' + inverted, 1); break; - + case 'white': mkStop(1, '#ffffff', 1); break; - + case 'black': mkStop(1, '#000000', 1); break; @@ -408,18 +408,18 @@ } } - + var x1 = parseFloat(grad.getAttribute('x1')||0.0), y1 = parseFloat(grad.getAttribute('y1')||0.0), x2 = parseFloat(grad.getAttribute('x2')||1.0), y2 = parseFloat(grad.getAttribute('y2')||0.0); - + var cx = parseFloat(grad.getAttribute('cx')||0.5), cy = parseFloat(grad.getAttribute('cy')||0.5), fx = parseFloat(grad.getAttribute('fx')|| cx), fy = parseFloat(grad.getAttribute('fy')|| cy); - + var previewRect = mkElem('rect', { id: id + '_jgraduate_rect', x: MARGINX, @@ -429,7 +429,7 @@ fill: 'url(#'+id+'_jgraduate_grad)', 'fill-opacity': gradalpha/100 }, svg); - + // stop visuals created here var beginCoord = $('<div/>').attr({ 'class': 'grad_coord jGraduate_lg_field', @@ -438,12 +438,12 @@ top: y1 * MAX, left: x1 * MAX }).data('coord', 'start').appendTo(container); - + var endCoord = beginCoord.clone().text(2).css({ top: y2 * MAX, left: x2 * MAX }).attr('title', 'End stop').data('coord', 'end').appendTo(container); - + var centerCoord = $('<div/>').attr({ 'class': 'grad_coord jGraduate_rg_field', title: 'Center stop' @@ -451,22 +451,22 @@ top: cy * MAX, left: cx * MAX }).data('coord', 'center').appendTo(container); - + var focusCoord = centerCoord.clone().text('F').css({ top: fy * MAX, left: fx * MAX, display: 'none' }).attr('title', 'Focus point').data('coord', 'focus').appendTo(container); - + focusCoord[0].id = id + '_jGraduate_focusCoord'; - + var coords = $(idref + ' .grad_coord'); - + $.each(['x1', 'y1', 'x2', 'y2', 'cx', 'cy', 'fx', 'fy'], function(i, attr) { var attrval = curGradient.getAttribute(attr); - + var isRadial = isNaN(attr[1]); - + if(!attrval) { // Set defaults if(isRadial) { @@ -483,25 +483,25 @@ .change(function() { // TODO: Support values < 0 and > 1 (zoomable preview?) if (isNaN(parseFloat(this.value)) || this.value < 0) { - this.value = 0.0; + this.value = 0.0; } else if(this.value > 1) { this.value = 1.0; } - + if(!(attr[0] === 'f' && !showFocus)) { if(isRadial && curType === 'radialGradient' || !isRadial && curType === 'linearGradient') { curGradient.setAttribute(attr, this.value); } } - + if(isRadial) { var $elem = attr[0] === "c" ? centerCoord : focusCoord; } else { - var $elem = attr[1] === "1" ? beginCoord : endCoord; + var $elem = attr[1] === "1" ? beginCoord : endCoord; } - + var cssName = attr.indexOf('x') >= 0 ? 'left' : 'top'; - + $elem.css(cssName, this.value * MAX); }).change(); }); @@ -516,15 +516,15 @@ curGradient.appendChild(stop); } if(opac === null) opac = 1; - + var picker_d = 'M-6.2,0.9c3.6-4,6.7-4.3,6.7-12.4c-0.2,7.9,3.1,8.8,6.5,12.4c3.5,3.8,2.9,9.6,0,12.3c-3.1,2.8-10.4,2.7-13.2,0C-9.6,9.9-9.4,4.4-6.2,0.9z'; - + var pathbg = mkElem('path',{ d: picker_d, fill: 'url(#jGraduate_trans)', transform: 'translate(' + (10 + n * MAX) + ', 26)' }, stopGroup); - + var path = mkElem('path',{ d: picker_d, fill: color, @@ -542,7 +542,7 @@ e.preventDefault(); return false; }).data('stop', stop).data('bg', pathbg).dblclick(function() { - $('div.jGraduate_LightBox').show(); + $('div.jGraduate_LightBox').show(); var colorhandle = this; var stopOpacity = +stop.getAttribute('stop-opacity') || 1; var stopColor = stop.getAttribute('stop-color') || 1; @@ -567,7 +567,7 @@ $('#'+id+'_jGraduate_stopPicker').hide(); }); }); - + $(curGradient).find('stop').each(function() { var cur_s = $(this); if(+this.getAttribute('offset') > n) { @@ -586,7 +586,7 @@ if(sel) selectStop(path); return stop; } - + function remStop() { delStop.setAttribute('display', 'none'); var path = $(cur_stop); @@ -594,14 +594,14 @@ var bg = path.data('bg'); $([cur_stop, stop, bg]).remove(); } - - + + var stops, stopGroup; - + var stopMakerDiv = $('#' + id + '_jGraduate_StopSlider'); var cur_stop, stopGroup, stopMakerSVG, drag; - + var delStop = mkElem('path',{ d:'m9.75,-6l-19.5,19.5m0,-19.5l19.5,19.5', fill:'none', @@ -610,7 +610,7 @@ display:'none' }, stopMakerSVG); - + function selectStop(item) { if(cur_stop) cur_stop.setAttribute('stroke', '#000'); item.setAttribute('stroke', 'blue'); @@ -620,9 +620,9 @@ // opac_select.val(cur_stop.attr('fill-opacity') || 1); // root.append(delStop); } - + var stop_offset; - + function remDrags() { $win.unbind('mousemove', dragColor); if(delStop.getAttribute('display') !== 'none') { @@ -630,11 +630,11 @@ } drag = null; } - + var scale_x = 1, scale_y = 1, angle = 0; var c_x = cx; var c_y = cy; - + function xform() { var rot = angle?'rotate(' + angle + ',' + c_x + ',' + c_y + ') ':''; if(scale_x === 1 && scale_y === 1) { @@ -647,7 +647,7 @@ // $('#ang').removeClass('dis'); } } - + function dragColor(evt) { var x = evt.pageX - stop_offset.left; @@ -661,15 +661,15 @@ } else { delStop.setAttribute('display', 'none'); } - + drag.setAttribute('transform', xf_str); $.data(drag, 'bg').setAttribute('transform', xf_str); var stop = $.data(drag, 'stop'); var s_x = (x - 10) / MAX; - + stop.setAttribute('offset', s_x); var last = 0; - + $(curGradient).find('stop').each(function(i) { var cur = this.getAttribute('offset'); var t = $(this); @@ -679,30 +679,30 @@ } last = cur; }); - + } - + stopMakerSVG = mkElem('svg', { width: '100%', height: 45 }, stopMakerDiv[0]); - + var trans_pattern = mkElem('pattern', { width: 16, height: 16, patternUnits: 'userSpaceOnUse', id: 'jGraduate_trans' }, stopMakerSVG); - + var trans_img = mkElem('image', { width: 16, height: 16 }, trans_pattern); - + var bg_image = $settings.images.clientPath + 'map-opacity.png'; trans_img.setAttributeNS(ns.xlink, 'xlink:href', bg_image); - + $(stopMakerSVG).on("click touchstart", function(evt) { stop_offset = stopMakerDiv.offset(); var target = evt.target; @@ -712,13 +712,13 @@ mkStop(x / MAX, 0, 0, true); evt.stopPropagation(); }); - + $(stopMakerSVG).mouseover(function() { stopMakerSVG.appendChild(delStop); }); - + stopGroup = mkElem('g', {}, stopMakerSVG); - + mkElem('line', { x1: 10, y1: 15, @@ -727,16 +727,16 @@ 'stroke-width': 2, stroke: '#000' }, stopMakerSVG); - - + + var spreadMethodOpt = gradPicker.find('.jGraduate_spreadMethod').change(function() { curGradient.setAttribute('spreadMethod', $(this).val()); }); - - + + // handle dragging the stop around the swatch var draggingCoord = null; - + var onCoordDrag = function(evt) { var x = evt.pageX - offset.left; var y = evt.pageY - offset.top; @@ -744,16 +744,16 @@ // clamp stop to the swatch x = x < 0 ? 0 : x > MAX ? MAX : x; y = y < 0 ? 0 : y > MAX ? MAX : y; - + draggingCoord.css('left', x).css('top', y); - // calculate stop offset + // calculate stop offset var fracx = x / SIZEX; var fracy = y / SIZEY; - + var type = draggingCoord.data('coord'); var grad = curGradient; - + switch ( type ) { case 'start': attr_input.x1.val(fracx); @@ -783,22 +783,22 @@ grad.setAttribute('fy', fracy); xform(); } - + evt.preventDefault(); } - + var onCoordUp = function() { draggingCoord = null; $win.unbind('mousemove', onCoordDrag).unbind('mouseup', onCoordUp); } - + // Linear gradient // (function() { - + stops = curGradient.getElementsByTagNameNS(ns.svg, 'stop'); - // if there are not at least two stops, then + // if there are not at least two stops, then if (numstops < 2) { while (numstops < 2) { curGradient.appendChild( document.createElementNS(ns.svg, 'stop') ); @@ -806,22 +806,22 @@ } stops = curGradient.getElementsByTagNameNS(ns.svg, 'stop'); } - - var numstops = stops.length; + + var numstops = stops.length; for(var i = 0; i < numstops; i++) { mkStop(0, 0, 0, 0, stops[i]); } - + spreadMethodOpt.val(curGradient.getAttribute('spreadMethod') || 'pad'); var offset; - + // No match, so show focus point - var showFocus = false; - + var showFocus = false; + previewRect.setAttribute('fill-opacity', gradalpha/100); - + $('#' + id + ' div.grad_coord').mousedown(function(evt) { evt.preventDefault(); draggingCoord = $(this); @@ -829,7 +829,7 @@ offset = draggingCoord.parent().offset(); $win.mousemove(onCoordDrag).mouseup(onCoordUp); }); - + // bind GUI elements $('#'+id+'_jGraduate_Ok').bind('click touchstart', function() { $this.paint.type = curType; @@ -843,7 +843,7 @@ if(curType === 'radialGradient') { if(showFocus) { - focusCoord.show(); + focusCoord.show(); } else { focusCoord.hide(); attr_input.fx.val(""); @@ -852,9 +852,9 @@ } $("#" + id + "_jGraduate_match_ctr")[0].checked = !showFocus; - + var lastfx, lastfy; - + $("#" + id + "_jGraduate_match_ctr").change(function() { showFocus = !this.checked; focusCoord.toggle(showFocus); @@ -875,10 +875,10 @@ attr_input.fy.val(fy); } }); - + var stops = curGradient.getElementsByTagNameNS(ns.svg, 'stop'); var numstops = stops.length; - // if there are not at least two stops, then + // if there are not at least two stops, then if (numstops < 2) { while (numstops < 2) { curGradient.appendChild( document.createElementNS(ns.svg, 'stop') ); @@ -886,9 +886,9 @@ } stops = curGradient.getElementsByTagNameNS(ns.svg, 'stop'); } - + var slider; - + var setSlider = function(e) { var offset = slider.offset; var div = slider.parent; @@ -897,7 +897,7 @@ if (x <= 0) x = 0; var posx = x - 5; x /= SLIDERW; - + switch ( slider.type ) { case 'radius': x = Math.pow(x * 2, 2.5); @@ -918,7 +918,7 @@ x /= .5; // 2 x = 2 - x; scale_y = x <= 0 ? .01 : x; - } + } xform(); x -= 1; if(scale_y === x + 1) { @@ -936,9 +936,9 @@ x = Math.round(x*100); slider.input.val(x); }; - + var ellip_val = 0, angle_val = 0; - + if(curType === 'radialGradient') { var tlist = curGradient.gradientTransform.baseVal; if(tlist.numberOfItems === 2) { @@ -947,33 +947,33 @@ if(t.type === 2 && s.type === 3) { var m = s.matrix; if(m.a !== 1) { - ellip_val = Math.round(-(1 - m.a) * 100); + ellip_val = Math.round(-(1 - m.a) * 100); } else if(m.d !== 1) { ellip_val = Math.round((1 - m.d) * 100); - } + } } } else if(tlist.numberOfItems === 3) { // Assume [R][T][S] var r = tlist.getItem(0); var t = tlist.getItem(1); var s = tlist.getItem(2); - - if(r.type === 4 - && t.type === 2 + + if(r.type === 4 + && t.type === 2 && s.type === 3) { angle_val = Math.round(r.angle); var m = s.matrix; if(m.a !== 1) { - ellip_val = Math.round(-(1 - m.a) * 100); + ellip_val = Math.round(-(1 - m.a) * 100); } else if(m.d !== 1) { ellip_val = Math.round((1 - m.d) * 100); - } - + } + } } } - + var sliders = { radius: { handle: '#' + id + '_jGraduate_RadiusArrows', @@ -996,7 +996,7 @@ val: angle_val } } - + $.each(sliders, function(type, data) { var handle = $(data.handle); handle.mousedown(function(evt) { @@ -1011,7 +1011,7 @@ $win.mousemove(dragSlider).mouseup(stopSlider); evt.preventDefault(); }); - + $(data.input).val(data.val).change(function() { var val = +this.value; var xpos = 0; @@ -1021,13 +1021,13 @@ if(isRad) curGradient.setAttribute('r', val / 100); xpos = (Math.pow(val / 100, 1 / 2.5) / 2) * SLIDERW; break; - + case 'opacity': $this.paint.alpha = val; previewRect.setAttribute('fill-opacity', val / 100); xpos = val * (SLIDERW / 100); break; - + case 'ellip': scale_x = scale_y = 1; if(val === 0) { @@ -1044,7 +1044,7 @@ xpos = SLIDERW * ((val + 100) / 2) / 100; if(isRad) xform(); break; - + case 'angle': angle = val; xpos = angle / 180; @@ -1060,33 +1060,33 @@ handle.css({'margin-left': xpos - 5}); }).change(); }); - + var dragSlider = function(evt) { setSlider(evt); evt.preventDefault(); }; - + var stopSlider = function(evt) { $win.unbind('mousemove', dragSlider).unbind('mouseup', stopSlider); slider = null; }; - - + + // -------------- var thisAlpha = ($this.paint.alpha*255/100).toString(16); while (thisAlpha.length < 2) { thisAlpha = "0" + thisAlpha; } thisAlpha = thisAlpha.split(".")[0]; color = $this.paint.solidColor == "none" ? "" : $this.paint.solidColor + thisAlpha; - + if(!isSolid) { color = stops[0].getAttribute('stop-color'); } - + // This should be done somewhere else, probably $.extend($.fn.jPicker.defaults.window, { alphaSupport: true, effects: {type: 'show',speed: 0} }); - + colPicker.jPicker( { window: { title: $settings.window.pickerTitle }, @@ -1098,13 +1098,13 @@ $this.paint.alpha = color.val('ahex') ? Math.round((color.val('a') / 255) * 100) : 100; $this.paint.solidColor = color.val('hex') ? color.val('hex') : "none"; $this.paint.radialGradient = null; - okClicked(); + okClicked(); }, null, function(){ cancelClicked(); } ); - + var tabs = $(idref + ' .jGraduate_tabs li'); tabs.on("click touchstart", function() { tabs.removeClass('jGraduate_tab_current'); @@ -1116,19 +1116,19 @@ // Show/hide appropriate fields $('.jGraduate_' + type + '_field').show(); $('.jGraduate_' + (type === 'lg' ? 'rg' : 'lg') + '_field').hide(); - + $('#' + id + '_jgraduate_rect')[0].setAttribute('fill', 'url(#' + id + '_' + type + '_jgraduate_grad)'); - + // Copy stops - + curType = type === 'lg' ? 'linearGradient' : 'radialGradient'; - + $('#' + id + '_jGraduate_OpacInput').val($this.paint.alpha).change(); - + var newGrad = $('#' + id + '_' + type + '_jgraduate_grad')[0]; - + if(curGradient !== newGrad) { - var cur_stops = $(curGradient).find('stop'); + var cur_stops = $(curGradient).find('stop'); $(newGrad).empty().append(cur_stops); curGradient = newGrad; var sm = spreadMethodOpt.val(); @@ -1159,11 +1159,11 @@ break; } $this.show(); - + // jPicker will try to show after a 0ms timeout, so need to fire this after that setTimeout(function() { - tab.addClass('jGraduate_tab_current').click(); + tab.addClass('jGraduate_tab_current').click(); }, 10); }); }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.min.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.min.js index 355017b..dfdf8db 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jgraduate/jquery.jgraduate.min.js @@ -34,4 +34,4 @@ (e.paint.alpha*255/100).toString(16);n.length<2;)n="0"+n;n=n.split(".")[0];u=e.paint.solidColor=="none"?"":e.paint.solidColor+n;ba||(u=D[0].getAttribute("stop-color"));$.extend($.fn.jPicker.defaults.window,{alphaSupport:true,effects:{type:"show",speed:0}});Ca.jPicker({window:{title:o.window.pickerTitle},images:{clientPath:o.images.clientPath},color:{active:u,alphaSupport:true}},function(c){e.paint.type="solidColor";e.paint.alpha=c.val("ahex")?Math.round(c.val("a")/255*100):100;e.paint.solidColor= c.val("hex")?c.val("hex"):"none";e.paint.radialGradient=null;ma()},null,function(){na()});var ka=$(s+" .jGraduate_tabs li");ka.click(function(){ka.removeClass("jGraduate_tab_current");$(this).addClass("jGraduate_tab_current");$(s+" > div").hide();var c=$(this).attr("data-type");$(s+" .jGraduate_gradPick").show();if(c==="rg"||c==="lg"){$(".jGraduate_"+c+"_field").show();$(".jGraduate_"+(c==="lg"?"rg":"lg")+"_field").hide();$("#"+b+"_jgraduate_rect")[0].setAttribute("fill","url(#"+b+"_"+c+"_jgraduate_grad)"); p=c==="lg"?"linearGradient":"radialGradient";$("#"+b+"_jGraduate_OpacInput").val(e.paint.alpha).change();var a=$("#"+b+"_"+c+"_jgraduate_grad")[0];if(g!==a){var d=$(g).find("stop");$(a).empty().append(d);g=a;a=ua.val();g.setAttribute("spreadMethod",a)}E=c==="rg"&&g.getAttribute("fx")!=null&&!(ca==qa&&da==ra);$("#"+b+"_jGraduate_focusCoord").toggle(E);if(E)$("#"+b+"_jGraduate_match_ctr")[0].checked=false}else{$(s+" .jGraduate_gradPick").hide();$(s+" .jGraduate_colPick").show()}});$(s+" > div").hide(); -ka.removeClass("jGraduate_tab_current");var ea;switch(e.paint.type){case "linearGradient":ea=$(s+" .jGraduate_tab_lingrad");break;case "radialGradient":ea=$(s+" .jGraduate_tab_radgrad");break;default:ea=$(s+" .jGraduate_tab_color")}e.show();setTimeout(function(){ea.addClass("jGraduate_tab_current").click()},10)}else alert("Container element must have an id attribute to maintain unique id strings for sub-elements.")})}})(); \ No newline at end of file +ka.removeClass("jGraduate_tab_current");var ea;switch(e.paint.type){case "linearGradient":ea=$(s+" .jGraduate_tab_lingrad");break;case "radialGradient":ea=$(s+" .jGraduate_tab_radgrad");break;default:ea=$(s+" .jGraduate_tab_color")}e.show();setTimeout(function(){ea.addClass("jGraduate_tab_current").click()},10)}else alert("Container element must have an id attribute to maintain unique id strings for sub-elements.")})}})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-draginput.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-draginput.js index 92503aa..d58ee88 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-draginput.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-draginput.js @@ -39,12 +39,12 @@ var isTouch = svgedit.browser.isTouch(); var completed = true //for mousewheel var $cursor = (area && this.dragCfg.cursor) - ? $("<div class='draginput_cursor' />").appendTo($label) + ? $("<div class='draginput_cursor' />").appendTo($label) : false $input.attr("readonly", "readonly") if ($cursor && !isNaN(this.dragCfg.start)) $cursor.css("top", (this.dragCfg.start*-1)/scale+cursorHeight) - - //this is where all the magic happens + + //this is where all the magic happens this.adjustValue = function(i, completed){ var v; i = parseFloat(i); @@ -62,9 +62,9 @@ $label.attr("data-value", v) if ($.isFunction(this.dragCfg.callback)) this.dragCfg.callback(this, completed) }; - + $label.toggleClass("draginput", $label.is("label")) - + // when the mouse is down and moving this.move = function(e, oy, val) { if (isTouch) { @@ -80,7 +80,7 @@ var fixed = (step < 1) ? 1 : 0 this.adjustValue(val.toFixed(fixed)) //no undo true }; - + //when the mouse is released this.stop = function() { var selectedElems = canvas.getSelectedElems(); @@ -95,13 +95,13 @@ } this.adjustValue(0, completed) } - + this.updateCursor = function(){ var value = parseFloat(this.value); var pos = (value*-1)/scale+cursorHeight; $cursor.css("top", pos); } - + this.launch = function(e) { var selectedElems = canvas.getSelectedElems(); if (isTouch) e = e.originalEvent.touches[0]; @@ -114,39 +114,39 @@ $(window).bind("mousemove.draginput touchmove.draginput", function(e){el.move(e, oy, parseFloat(val))}) $(window).bind("mouseup.draginput touchend.draginput", function(e){el.stop()}) } - + $(this) .attr("readonly", "readonly") .attr("data-scale", scale) .attr("data-domain", cursorHeight) .attr("data-cursor", ($cursor != false)) - + .bind("mousedown touchstart", function(e){ this.blur(); this.launch(e); }) - + .bind("dblclick taphold", function(e) { this.removeAttribute("readonly", "readonly"); this.focus(); this.select(); }) - + .keydown(function(e){ // Respond to up/down arrow keys. switch(e.keyCode){ case 13: this.adjustValue(0); this.blur(); break; // Enter } }) - + .focus(function(e){ if (this.getAttribute("readonly") === "readonly") this.blur() }) - + .blur(function(e){ this.setAttribute("readonly", "readonly") }) - + .bind("mousewheel", function(e, delta, deltaX, deltaY){ var selectedElems = canvas.getSelectedElems(); if (completed) canvas.undoMgr.beginUndoableChange(attr, selectedElems) @@ -155,18 +155,18 @@ window.undoTimeout = setTimeout(function(){ wheel_input.stop() },200) - + var wheel_input = this; if (deltaY > 0) this.adjustValue(this.dragCfg.step); else if (deltaY < 0) this.adjustValue(-this.dragCfg.step); e.preventDefault(); - + }) }); - + }; // public function diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js index 1a8ef1a..058b258 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.17.custom.min.js @@ -51,4 +51,4 @@ * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js - */(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=!0,f=a(this).data("index.ui-slider-handle"),g,h,i,j;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:e=!1;if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),g=b._start(d,f);if(g===!1)return}}j=b.options.step,b.options.values&&b.options.values.length?h=i=b.values(f):h=i=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:i=b._valueMin();break;case a.ui.keyCode.END:i=b._valueMax();break;case a.ui.keyCode.PAGE_UP:i=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:i=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(h===b._valueMax())return;i=b._trimAlignValue(h+j);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(h===b._valueMin())return;i=b._trimAlignValue(h-j)}b._slide(d,f,i);return e}}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;if(c.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i);if(j===!1)return!1;this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0;return!0},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);this._slide(a,this._handleIndex,c);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1;return!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e;return this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());return this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()}},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(a){var b,c,d;if(arguments.length){b=this.options.values[a],b=this._trimAlignValue(b);return b}c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;Math.abs(c)*2>=b&&(d+=c>0?b:-b);return parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.17"})})(jQuery); \ No newline at end of file + */(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=!0,f=a(this).data("index.ui-slider-handle"),g,h,i,j;if(!b.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:e=!1;if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),g=b._start(d,f);if(g===!1)return}}j=b.options.step,b.options.values&&b.options.values.length?h=i=b.values(f):h=i=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:i=b._valueMin();break;case a.ui.keyCode.END:i=b._valueMax();break;case a.ui.keyCode.PAGE_UP:i=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:i=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(h===b._valueMax())return;i=b._trimAlignValue(h+j);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(h===b._valueMin())return;i=b._trimAlignValue(h-j)}b._slide(d,f,i);return e}}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;if(c.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i);if(j===!1)return!1;this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0;return!0},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);this._slide(a,this._handleIndex,c);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1;return!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e;return this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());return this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()}},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(a){var b,c,d;if(arguments.length){b=this.options.values[a],b=this._trimAlignValue(b);return b}c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;Math.abs(c)*2>=b&&(d+=c>0?b:-b);return parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.17"})})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.custom.min.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.custom.min.js index 6e66021..5d7a7f6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.custom.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquery-ui/jquery-ui-1.8.custom.min.js @@ -81,4 +81,4 @@ * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js - */(function(b){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(d.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(d.range){if(d.range===true){this.range=b("<div></div>");if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&&d.values.length!=2){d.values=[d.values[0],d.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(d.range=="min"||d.range=="max"){this.range.addClass("ui-slider-range-"+d.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length==0){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(d.values&&d.values.length){while(b(".ui-slider-handle",this.element).length<d.values.length){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){if(!d.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!d.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(e){b(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(j){var g=true;var f=b(this).data("index.ui-slider-handle");if(c.options.disabled){return}switch(j.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:g=false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");c._start(j,f)}break}var h,e,i=c._step();if(c.options.values&&c.options.values.length){h=e=c.values(f)}else{h=e=c.value()}switch(j.keyCode){case b.ui.keyCode.HOME:e=c._valueMin();break;case b.ui.keyCode.END:e=c._valueMax();break;case b.ui.keyCode.PAGE_UP:e=h+((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.PAGE_DOWN:e=h-((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(h==c._valueMax()){return}e=h+i;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(h==c._valueMin()){return}e=h-i;break}c._slide(j,f,e);return g}).keyup(function(f){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(f,e);c._change(f,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(e){var f=this.options;if(f.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var i={x:e.pageX,y:e.pageY};var k=this._normValueFromMouse(i);var d=this._valueMax()-this._valueMin()+1,g;var l=this,j;this.handles.each(function(m){var n=Math.abs(k-l.values(m));if(d>n){d=n;g=b(this);j=m}});if(f.range==true&&this.values(1)==f.min){g=b(this.handles[++j])}this._start(e,j);this._mouseSliding=true;l._handleIndex=j;g.addClass("ui-state-active").focus();var h=g.offset();var c=!b(e.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=c?{left:0,top:0}:{left:e.pageX-h.left-(g.width()/2),top:e.pageY-h.top-(g.height()/2)-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};k=this._normValueFromMouse(i);this._slide(e,j,k);this._animateOff=true;return true},_mouseStart:function(c){return true},_mouseDrag:function(e){var c={x:e.pageX,y:e.pageY};var d=this._normValueFromMouse(c);this._slide(e,this._handleIndex,d);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,i;if("horizontal"==this.orientation){d=this.elementSize.width;i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var g=(i/d);if(g>1){g=1}if(g<0){g=0}if("vertical"==this.orientation){g=1-g}var f=this._valueMax()-this._valueMin(),j=g*f,c=j%this.options.step,h=this._valueMin()+j-c;if(c>(this.options.step/2)){h+=this.options.step}return parseFloat(h.toFixed(5))},_start:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("start",e,c)},_slide:function(g,f,e){var h=this.handles[f];if(this.options.values&&this.options.values.length){var c=this.values(f?0:1);if((this.options.values.length==2&&this.options.range===true)&&((f==0&&e>c)||(f==1&&e<c))){e=c}if(e!=this.values(f)){var d=this.values();d[f]=e;var i=this._trigger("slide",g,{handle:this.handles[f],value:e,values:d});var c=this.values(f?0:1);if(i!==false){this.values(f,e,true)}}}else{if(e!=this.value()){var i=this._trigger("slide",g,{handle:this.handles[f],value:e});if(i!==false){this.value(e)}}}},_stop:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("stop",e,c)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("change",e,c)}},value:function(c){if(arguments.length){this.options.value=this._trimValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(e,h){if(arguments.length>1){this.options.values[e]=this._trimValue(h);this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){var g=this.options.values,d=arguments[0];for(var f=0,c=g.length;f<c;f++){g[f]=this._trimValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)}else{return this.value()}}}else{return this._values()}},_setOption:function(d,e){var c,f=0;if(jQuery.isArray(this.options.values)){f=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(d){case"disabled":if(e){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c++){this._change(null,c)}this._animateOff=false;break}},_step:function(){var c=this.options.step;return c},_value:function(){var c=this.options.value;c=this._trimValue(c);return c},_values:function(d){if(arguments.length){var g=this.options.values[d];g=this._trimValue(g);return g}else{var f=this.options.values.slice();for(var e=0,c=f.length;e<c;e++){f[e]=this._trimValue(f[e])}return f}},_trimValue:function(c){if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c},_valueMin:function(){var c=this.options.min;return c},_valueMax:function(){var c=this.options.max;return c},_refreshValue:function(){var g=this.options.range,e=this.options,m=this;var d=(!this._animateOff)?e.animate:false;if(this.options.values&&this.options.values.length){var j,i;this.handles.each(function(q,o){var p=(m.values(q)-m._valueMin())/(m._valueMax()-m._valueMin())*100;var n={};n[m.orientation=="horizontal"?"left":"bottom"]=p+"%";b(this).stop(1,1)[d?"animate":"css"](n,e.animate);if(m.options.range===true){if(m.orientation=="horizontal"){(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({left:p+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({width:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}else{(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({bottom:(p)+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({height:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}}lastValPercent=p})}else{var k=this.value(),h=this._valueMin(),l=this._valueMax(),f=l!=h?(k-h)/(l-h)*100:0;var c={};c[m.orientation=="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[d?"animate":"css"](c,e.animate);(g=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[d?"animate":"css"]({width:f+"%"},e.animate);(g=="max")&&(this.orientation=="horizontal")&&this.range[d?"animate":"css"]({width:(100-f)+"%"},{queue:false,duration:e.animate});(g=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[d?"animate":"css"]({height:f+"%"},e.animate);(g=="max")&&(this.orientation=="vertical")&&this.range[d?"animate":"css"]({height:(100-f)+"%"},{queue:false,duration:e.animate})}}});b.extend(b.ui.slider,{version:"1.8"})})(jQuery);; \ No newline at end of file + */(function(b){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(d.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(d.range){if(d.range===true){this.range=b("<div></div>");if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&&d.values.length!=2){d.values=[d.values[0],d.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(d.range=="min"||d.range=="max"){this.range.addClass("ui-slider-range-"+d.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length==0){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(d.values&&d.values.length){while(b(".ui-slider-handle",this.element).length<d.values.length){b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){if(!d.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!d.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(e){b(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(j){var g=true;var f=b(this).data("index.ui-slider-handle");if(c.options.disabled){return}switch(j.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:g=false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");c._start(j,f)}break}var h,e,i=c._step();if(c.options.values&&c.options.values.length){h=e=c.values(f)}else{h=e=c.value()}switch(j.keyCode){case b.ui.keyCode.HOME:e=c._valueMin();break;case b.ui.keyCode.END:e=c._valueMax();break;case b.ui.keyCode.PAGE_UP:e=h+((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.PAGE_DOWN:e=h-((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(h==c._valueMax()){return}e=h+i;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(h==c._valueMin()){return}e=h-i;break}c._slide(j,f,e);return g}).keyup(function(f){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(f,e);c._change(f,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(e){var f=this.options;if(f.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var i={x:e.pageX,y:e.pageY};var k=this._normValueFromMouse(i);var d=this._valueMax()-this._valueMin()+1,g;var l=this,j;this.handles.each(function(m){var n=Math.abs(k-l.values(m));if(d>n){d=n;g=b(this);j=m}});if(f.range==true&&this.values(1)==f.min){g=b(this.handles[++j])}this._start(e,j);this._mouseSliding=true;l._handleIndex=j;g.addClass("ui-state-active").focus();var h=g.offset();var c=!b(e.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=c?{left:0,top:0}:{left:e.pageX-h.left-(g.width()/2),top:e.pageY-h.top-(g.height()/2)-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};k=this._normValueFromMouse(i);this._slide(e,j,k);this._animateOff=true;return true},_mouseStart:function(c){return true},_mouseDrag:function(e){var c={x:e.pageX,y:e.pageY};var d=this._normValueFromMouse(c);this._slide(e,this._handleIndex,d);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,i;if("horizontal"==this.orientation){d=this.elementSize.width;i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var g=(i/d);if(g>1){g=1}if(g<0){g=0}if("vertical"==this.orientation){g=1-g}var f=this._valueMax()-this._valueMin(),j=g*f,c=j%this.options.step,h=this._valueMin()+j-c;if(c>(this.options.step/2)){h+=this.options.step}return parseFloat(h.toFixed(5))},_start:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("start",e,c)},_slide:function(g,f,e){var h=this.handles[f];if(this.options.values&&this.options.values.length){var c=this.values(f?0:1);if((this.options.values.length==2&&this.options.range===true)&&((f==0&&e>c)||(f==1&&e<c))){e=c}if(e!=this.values(f)){var d=this.values();d[f]=e;var i=this._trigger("slide",g,{handle:this.handles[f],value:e,values:d});var c=this.values(f?0:1);if(i!==false){this.values(f,e,true)}}}else{if(e!=this.value()){var i=this._trigger("slide",g,{handle:this.handles[f],value:e});if(i!==false){this.value(e)}}}},_stop:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("stop",e,c)},_change:function(e,d){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("change",e,c)}},value:function(c){if(arguments.length){this.options.value=this._trimValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(e,h){if(arguments.length>1){this.options.values[e]=this._trimValue(h);this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){var g=this.options.values,d=arguments[0];for(var f=0,c=g.length;f<c;f++){g[f]=this._trimValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)}else{return this.value()}}}else{return this._values()}},_setOption:function(d,e){var c,f=0;if(jQuery.isArray(this.options.values)){f=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(d){case"disabled":if(e){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c++){this._change(null,c)}this._animateOff=false;break}},_step:function(){var c=this.options.step;return c},_value:function(){var c=this.options.value;c=this._trimValue(c);return c},_values:function(d){if(arguments.length){var g=this.options.values[d];g=this._trimValue(g);return g}else{var f=this.options.values.slice();for(var e=0,c=f.length;e<c;e++){f[e]=this._trimValue(f[e])}return f}},_trimValue:function(c){if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c},_valueMin:function(){var c=this.options.min;return c},_valueMax:function(){var c=this.options.max;return c},_refreshValue:function(){var g=this.options.range,e=this.options,m=this;var d=(!this._animateOff)?e.animate:false;if(this.options.values&&this.options.values.length){var j,i;this.handles.each(function(q,o){var p=(m.values(q)-m._valueMin())/(m._valueMax()-m._valueMin())*100;var n={};n[m.orientation=="horizontal"?"left":"bottom"]=p+"%";b(this).stop(1,1)[d?"animate":"css"](n,e.animate);if(m.options.range===true){if(m.orientation=="horizontal"){(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({left:p+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({width:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}else{(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({bottom:(p)+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({height:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}}lastValPercent=p})}else{var k=this.value(),h=this._valueMin(),l=this._valueMax(),f=l!=h?(k-h)/(l-h)*100:0;var c={};c[m.orientation=="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[d?"animate":"css"](c,e.animate);(g=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[d?"animate":"css"]({width:f+"%"},e.animate);(g=="max")&&(this.orientation=="horizontal")&&this.range[d?"animate":"css"]({width:(100-f)+"%"},{queue:false,duration:e.animate});(g=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[d?"animate":"css"]({height:f+"%"},e.animate);(g=="max")&&(this.orientation=="vertical")&&this.range[d?"animate":"css"]({height:(100-f)+"%"},{queue:false,duration:e.animate})}}});b.extend(b.ui.slider,{version:"1.8"})})(jQuery);; diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquerybbq/jquery.bbq.min.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquerybbq/jquery.bbq.min.js index edb7819..886780f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquerybbq/jquery.bbq.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/jquerybbq/jquery.bbq.min.js @@ -1,7 +1,7 @@ 锘�/* * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 * http://benalman.com/projects/jquery-bbq-plugin/ - * + * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ @@ -10,9 +10,9 @@ /* * jQuery hashchange event - v1.2 - 2/11/2010 * http://benalman.com/projects/jquery-hashchange-plugin/ - * + * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ -(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); \ No newline at end of file +(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/README.md b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/README.md index 696e989..f824c56 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/README.md +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/README.md @@ -1,5 +1,5 @@ #About -**jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. +**jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. This plugin is based off of the plugin by Tzury Bar Yochay: [jQuery.hotkeys](http://github.com/tzuryby/hotkeys) @@ -7,9 +7,9 @@ $(expression).bind(types, keys, handler); $(expression).unbind(types, handler); - + $(document).bind('keydown', 'ctrl+a', fn); - + // e.g. replace '$' sign with 'EUR' $('input.foo').bind('keyup', '$', function(){ this.value = this.value.replace('$', 'EUR'); @@ -42,4 +42,4 @@ Others, (IE) either let you handle built-in short-cuts, but will add their functionality after your code has executed. Or (Opera/Safari) will *not* pass those events to the DOM at all. -*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.* \ No newline at end of file +*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.* diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/jquery.hotkeys.min.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/jquery.hotkeys.min.js index 15e6fe3..503234a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/jquery.hotkeys.min.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/js-hotkeys/jquery.hotkeys.min.js @@ -12,4 +12,4 @@ * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ */ -(function(b){b.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta",219:"[",221:"]"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}};function a(d){if(typeof d.data!=="string"){return}var c=d.handler,e=d.data.toLowerCase().split(" ");d.handler=function(n){if(this!==n.target&&(/textarea|select/i.test(n.target.nodeName)||n.target.type==="text")){return}var h=n.type!=="keypress"&&b.hotkeys.specialKeys[n.which],o=String.fromCharCode(n.which).toLowerCase(),k,m="",g={};if(n.altKey&&h!=="alt"){m+="alt+"}if(n.ctrlKey&&h!=="ctrl"){m+="ctrl+"}if(n.metaKey&&!n.ctrlKey&&h!=="meta"){m+="meta+"}if(n.shiftKey&&h!=="shift"){m+="shift+"}if(h){g[m+h]=true}else{g[m+o]=true;g[m+b.hotkeys.shiftNums[o]]=true;if(m==="shift+"){g[b.hotkeys.shiftNums[o]]=true}}for(var j=0,f=e.length;j<f;j++){if(g[e[j]]){return c.apply(this,arguments)}}}}b.each(["keydown","keyup","keypress"],function(){b.event.special[this]={add:a}})})(jQuery); \ No newline at end of file +(function(b){b.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta",219:"[",221:"]"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}};function a(d){if(typeof d.data!=="string"){return}var c=d.handler,e=d.data.toLowerCase().split(" ");d.handler=function(n){if(this!==n.target&&(/textarea|select/i.test(n.target.nodeName)||n.target.type==="text")){return}var h=n.type!=="keypress"&&b.hotkeys.specialKeys[n.which],o=String.fromCharCode(n.which).toLowerCase(),k,m="",g={};if(n.altKey&&h!=="alt"){m+="alt+"}if(n.ctrlKey&&h!=="ctrl"){m+="ctrl+"}if(n.metaKey&&!n.ctrlKey&&h!=="meta"){m+="meta+"}if(n.shiftKey&&h!=="shift"){m+="shift+"}if(h){g[m+h]=true}else{g[m+o]=true;g[m+b.hotkeys.shiftNums[o]]=true;if(m==="shift+"){g[b.hotkeys.shiftNums[o]]=true}}for(var j=0,f=e.length;j<f;j++){if(g[e[j]]){return c.apply(this,arguments)}}}}b.each(["keydown","keyup","keypress"],function(){b.event.special[this]={add:a}})})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/mousewheel.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/mousewheel.js index f1d5f72..65ebc1c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/mousewheel.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/mousewheel.js @@ -6,7 +6,7 @@ * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.0.6 - * + * * Requires: 1.2.2+ */ @@ -30,7 +30,7 @@ this.onmousewheel = handler; } }, - + teardown: function() { if ( this.removeEventListener ) { for ( var i=types.length; i; ) { @@ -46,7 +46,7 @@ mousewheel: function(fn) { return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); }, - + unmousewheel: function(fn) { return this.unbind("mousewheel", fn); } @@ -57,28 +57,28 @@ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; event = $.event.fix(orgEvent); event.type = "mousewheel"; - + // Old school scrollwheel delta if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } - + // New school multidimensional scroll (touchpads) deltas deltaY = delta; - + // Gecko if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { deltaY = 0; deltaX = -1*delta; } - + // Webkit if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } - + // Add event and delta to the front of the arguments args.unshift(event, delta, deltaX, deltaY); - + return ($.event.dispatch || $.event.handle).apply(this, args); } -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/pathseg.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/pathseg.js index 59eb2d7..9765403 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/pathseg.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/pathseg.js @@ -808,4 +808,4 @@ return builder.pathSegList; } } -}()); \ No newline at end of file +}()); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/requestanimationframe.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/requestanimationframe.js index 5716203..8ea360c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/requestanimationframe.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/requestanimationframe.js @@ -3,20 +3,20 @@ var vendors = ['ms', 'moz', 'webkit', 'o']; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; } - + if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; - + if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function(id) { clearTimeout(id); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/taphold.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/taphold.js index b788be7..3bae8f7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/taphold.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/taphold.js @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * @author Guido Marucci Blas - guido@zaubersoftware.com * @description Adds a handler for a custom event 'taphold' that handles a * tap and hold on touch interfaces. @@ -45,10 +45,10 @@ startTapAndHoldDetector.call(this, event) var element = $(this); element.bind(TOUCHMOVE, onTouchMove); - element.bind(TOUCHEND, onTouchEnd); + element.bind(TOUCHEND, onTouchEnd); } else { stopTapAndHoldDetector.call(this); - } + } }; function onTouchMove(event) { @@ -59,10 +59,10 @@ var e = event.originalEvent; var x = (e.changedTouches) ? e.changedTouches[0].pageX: e.pageX; var y = (e.changedTouches) ? e.changedTouches[0].pageY: e.pageY; - + var tapAndHoldPoint = $(this).data("taphold.point"); var euclideanDistance = calculateEuclideanDistance(tapAndHoldPoint.x, tapAndHoldPoint.y, x, y); - + if (euclideanDistance > MAX_DISTANCE_ALLOWED_IN_TAP_AND_HOLD_EVENT) { stopTapAndHoldDetector.call(this); } @@ -80,7 +80,7 @@ function clear() { tapAndHoldTimer = null; $(this).unbind(TOUCHMOVE, onTouchMove); - $(this).unbind(TOUCHEND, onTouchEnd); + $(this).unbind(TOUCHEND, onTouchEnd); }; function startTapAndHoldDetector(event) { @@ -102,12 +102,12 @@ function stopTapAndHoldDetector() { clearTimeout(tapAndHoldTimer); - clear.call(this); + clear.call(this); }; $.event.special["taphold"] = { setup: function() { - + }, add: function(handleObj) { @@ -129,8 +129,8 @@ }, teardown: function() { - + } }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js index 7db1544..8d3acb6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js @@ -1,25 +1,25 @@ function touchHandler(event) -{ - +{ + var touches = event.changedTouches, first = touches[0], type = ""; switch(event.type) { case "touchstart": type="mousedown"; break; - case "touchmove": type="mousemove"; break; + case "touchmove": type="mousemove"; break; case "touchend": type="mouseup"; break; default: return; } - //initMouseEvent(type, canBubble, cancelable, view, clickCount, - // screenX, screenY, clientX, clientY, ctrlKey, + //initMouseEvent(type, canBubble, cancelable, view, clickCount, + // screenX, screenY, clientX, clientY, ctrlKey, // altKey, shiftKey, metaKey, button, relatedTarget); - + var simulatedEvent = document.createEvent("MouseEvent"); - simulatedEvent.initMouseEvent(type, true, true, window, 1, - first.screenX, first.screenY, - first.clientX, first.clientY, false, + simulatedEvent.initMouseEvent(type, true, true, window, 1, + first.screenX, first.screenY, + first.clientX, first.clientY, false, false, false, false, 0/*left*/, null); if(touches.length < 2) { first.target.dispatchEvent(simulatedEvent); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/method-draw.compiled.css b/web/public/SVGOrigin/Method-Draw-master/method-draw/method-draw.compiled.css index 67de0b2..bf0eee8 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/method-draw.compiled.css +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/method-draw.compiled.css @@ -414,4 +414,4 @@ #stroke_style_label{font-size:30px;margin-top:33px;letter-spacing:-1px} .stroke_tool .caret{top:60%} #tool_align_relative{position:absolute;top:-5px;left:0;right:20px;display:block} -#tool_align_relative select{width:100%;display:block} \ No newline at end of file +#tool_align_relative select{width:100%;display:block} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/browser.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/browser.js index 888cc04..242f76c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/browser.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/browser.js @@ -121,7 +121,7 @@ var supportsNativeSVGTransformLists_ = (function() { var rect = document.createElementNS(svgns, 'rect'); var rxform = rect.transform.baseVal; - + var t1 = svg.createSVGTransform(); rxform.appendItem(t1); return rxform.getItem(0) == t1; diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dialog.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dialog.js index b92884f..beef8e9 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dialog.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dialog.js @@ -1,49 +1,49 @@ // This sets up alternative dialog boxes. They mostly work the same way as // their UI counterparts, expect instead of returning the result, a callback // needs to be included that returns the result as its first parameter. -// In the future we may want to add additional types of dialog boxes, since +// In the future we may want to add additional types of dialog boxes, since // they should be easy to handle this way. (function() { $('#dialog_container').draggable({cancel:'#dialog_content, #dialog_buttons *', containment: 'window'}); var box = $('#dialog_box'), btn_holder = $('#dialog_buttons'); - + var dbox = function(type, msg, callback, defText) { $('#dialog_content').html('<p>'+msg.replace(/\n/g,'</p><p>')+'</p>') .toggleClass('prompt',(type=='prompt')); btn_holder.empty(); - + var ok = $('<input type="button" value="' + uiStrings.common.ok + '">').appendTo(btn_holder); - + if(type != 'alert') { $('<input type="button" value="' + uiStrings.common.cancel + '">') .appendTo(btn_holder) .on("click touchstart", function() { box.hide();callback(false)}); } - + if(type == 'prompt') { var input = $('<input type="text">').prependTo(btn_holder); input.val(defText || ''); input.bind('keydown', 'return', function() {ok.trigger("click touchstart");}); } - + if(type == 'process') { ok.hide(); } box.show(); - - ok.on("click touchstart", function() { + + ok.on("click touchstart", function() { box.hide(); var resp = (type == 'prompt')?input.val():true; if(callback) callback(resp); }).focus(); - + if(type == 'prompt') input.focus(); } - + $.alert = function(msg, cb) { dbox('alert', msg, cb);}; $.confirm = function(msg, cb) { dbox('confirm', msg, cb);}; $.process_cancel = function(msg, cb) { dbox('process', msg, cb);}; $.prompt = function(msg, txt, cb) { dbox('prompt', msg, cb, txt);}; -}()); \ No newline at end of file +}()); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dragupload.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dragupload.js index 0ee0dff..0eba1e5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dragupload.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/dragupload.js @@ -8,4 +8,4 @@ reader.readAsDataURL(e.dataTransfer.files[0]); }, false); -} \ No newline at end of file +} diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/draw.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/draw.js index 3be01b8..318204f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/draw.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/draw.js @@ -54,7 +54,7 @@ // Called to ensure that drawings will or will not have randomized ids. // The current_drawing will have its nonce set if it doesn't already. -// +// // Params: // enableRandomization - flag indicating if documents should have randomized ids svgedit.draw.randomizeIds = function(enableRandomization, current_drawing) { @@ -89,19 +89,19 @@ * @type {SVGSVGElement} */ this.svgElem_ = svgElem; - + /** * The latest object number used in this drawing. * @type {number} */ this.obj_num = 0; - + /** * The prefix to prepend to each element id in the drawing. * @type {String} */ this.idPrefix = opt_idPrefix || "svg_"; - + /** * An array of released element ids to immediately reuse. * @type {Array.<number>} @@ -186,7 +186,7 @@ var oldObjNum = this.obj_num; var restoreOldObjNum = false; - // If there are any released numbers in the release stack, + // If there are any released numbers in the release stack, // use the last one instead of the next obj_num. // We need to temporarily use obj_num as that is what getId() depends on. if (this.releasedNums.length > 0) { @@ -238,7 +238,7 @@ if (typeof num != typeof 1 || num <= 0 || this.releasedNums.indexOf(num) != -1) { return false; } - + // push the released number into the released queue this.releasedNums.push(num); @@ -247,7 +247,7 @@ // Function: svgedit.draw.Drawing.getNumLayers // Returns the number of layers in the current drawing. -// +// // Returns: // The number of layers in the current drawing. svgedit.draw.Drawing.prototype.getNumLayers = function() { @@ -269,7 +269,7 @@ // // Parameters: // i - the zero-based index of the layer you are querying. -// +// // Returns: // The name of the ith layer svgedit.draw.Drawing.prototype.getLayerName = function(i) { @@ -287,7 +287,7 @@ }; // Function: getCurrentLayerName -// Returns the name of the currently selected layer. If an error occurs, an empty string +// Returns the name of the currently selected layer. If an error occurs, an empty string // is returned. // // Returns: @@ -326,7 +326,7 @@ // Function: svgedit.draw.Drawing.deleteCurrentLayer -// Deletes the current layer from the drawing and then clears the selection. This function +// Deletes the current layer from the drawing and then clears the selection. This function // then calls the 'changed' handler. This is an undoable action. // Returns: // The SVGGElement of the layer removed or null. @@ -359,7 +359,7 @@ if (child.tagName == "g") { childgroups = true; var name = $("title",child).text(); - + // Hack for Opera 10.60 if(!name && svgedit.browser.isOpera() && child.querySelectorAll) { name = $(child.querySelectorAll('title')).text(); @@ -385,7 +385,7 @@ } } } - + // create a new layer and add all the orphans to it var svgdoc = this.svgElem_.ownerDocument; if (orphans.length > 0 || !childgroups) { @@ -414,7 +414,7 @@ }; // Function: svgedit.draw.Drawing.createLayer -// Creates a new top-level layer in the drawing with the given name and +// Creates a new top-level layer in the drawing with the given name and // sets the current layer to it. // // Parameters: @@ -457,7 +457,7 @@ }; // Function: svgedit.draw.Drawing.setLayerVisibility -// Sets the visibility of the layer. If the layer name is not valid, this function return +// Sets the visibility of the layer. If the layer name is not valid, this function return // false, otherwise it returns true. This is an undo-able action. // // Parameters: @@ -479,7 +479,7 @@ } } if (!layer) return null; - + var oldDisplay = layer.getAttribute("display"); if (!oldDisplay) oldDisplay = "inline"; layer.setAttribute("display", bVisible ? "inline" : "none"); @@ -490,7 +490,7 @@ // Function: svgedit.draw.Drawing.getLayerOpacity // Returns the opacity of the given layer. If the input name is not a layer, null is returned. // -// Parameters: +// Parameters: // layername - name of the layer on which to get the opacity // // Returns: diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/embedapi.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/embedapi.js index 923ee78..a5ae78d 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/embedapi.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/embedapi.js @@ -3,9 +3,9 @@ //initialize communication this.frame = frame; this.stack = []; //callback stack - + var editapi = this; - + window.addEventListener("message", function(e){ if(e.data.substr(0,5) == "ERROR"){ editapi.stack.splice(0,1)[0](e.data,"error") @@ -48,9 +48,9 @@ } }) -Everything is done with the same API as the real svg-edit, +Everything is done with the same API as the real svg-edit, and all documentation is unchanged. The only difference is -when handling returns, the callback notation is used instead. +when handling returns, the callback notation is used instead. var blah = new embedded_svg_edit(window.frames['svgedit']); blah.clearSelection("woot","blah",1337,[1,2,3,4,5,"moo"],-42,{a: "tree",b:6, c: 9})(function(){console.log("GET DATA",arguments)}) @@ -64,13 +64,13 @@ this.encode = embedded_svg_edit.encode; //List of functions extracted with this: //Run in firebug on http://svg-edit.googlecode.com/svn/trunk/docs/files/svgcanvas-js.html - + //for(var i=0,q=[],f = document.querySelectorAll("div.CFunction h3.CTitle a");i<f.length;i++){q.push(f[i].name)};q //var functions = ["clearSelection", "addToSelection", "removeFromSelection", "open", "save", "getSvgString", "setSvgString", //"createLayer", "deleteCurrentLayer", "setCurrentLayer", "renameCurrentLayer", "setCurrentLayerPosition", "setLayerVisibility", //"moveSelectedToLayer", "clear"]; - - + + //Newer, well, it extracts things that aren't documented as well. All functions accessible through the normal thingy can now be accessed though the API //var l=[];for(var i in svgCanvas){if(typeof svgCanvas[i] == "function"){l.push(i)}}; //run in svgedit itself @@ -89,7 +89,7 @@ "getStrokedBBox", "getVisibleElements", "cycleElement", "getUndoStackSize", "getRedoStackSize", "getNextUndoCommandText", "getNextRedoCommandText", "undo", "redo", "cloneSelectedElements", "alignSelectedElements", "getZoom", "getVersion", "setIconSize", "setLang", "setCustomHandlers"]; - + //TODO: rewrite the following, it's pretty scary. for(var i = 0; i < functions.length; i++){ this[functions[i]] = (function(d){ @@ -99,7 +99,7 @@ args.push(arguments[g]); } var cbid = t.send(d,args, function(){}) //the callback (currently it's nothing, but will be set later - + return function(newcallback){ t.callbacks[cbid] = newcallback; //set callback } @@ -128,7 +128,7 @@ //simple partial JSON encoder implementation if(window.JSON && JSON.stringify) return JSON.stringify(obj); var enc = arguments.callee; //for purposes of recursion - + if(typeof obj == "boolean" || typeof obj == "number"){ return obj+'' //should work... }else if(typeof obj == "string"){ diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/history.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/history.js index c5b520e..08f1d09 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/history.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/history.js @@ -101,7 +101,7 @@ if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_UNAPPLY, this); } - + this.elem = this.oldParent.insertBefore(this.elem, this.oldNextSibling); if (handler) { @@ -139,12 +139,12 @@ // Function: svgedit.history.InsertElementCommand.apply // Re-Inserts the new element -svgedit.history.InsertElementCommand.prototype.apply = function(handler) { +svgedit.history.InsertElementCommand.prototype.apply = function(handler) { if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this); } - this.elem = this.parent.insertBefore(this.elem, this.nextSibling); + this.elem = this.parent.insertBefore(this.elem, this.nextSibling); if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.AFTER_APPLY, this); @@ -201,7 +201,7 @@ // Function: RemoveElementCommand.apply // Re-removes the new element -svgedit.history.RemoveElementCommand.prototype.apply = function(handler) { +svgedit.history.RemoveElementCommand.prototype.apply = function(handler) { if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_APPLY, this); } @@ -217,7 +217,7 @@ // Function: RemoveElementCommand.unapply // Re-adds the new element -svgedit.history.RemoveElementCommand.prototype.unapply = function(handler) { +svgedit.history.RemoveElementCommand.prototype.unapply = function(handler) { if (handler) { handler.handleHistoryEvent(svgedit.history.HistoryEventTypes.BEFORE_UNAPPLY, this); } @@ -243,7 +243,7 @@ // Class: svgedit.history.ChangeElementCommand // implements svgedit.history.HistoryCommand -// History command to make a change to an element. +// History command to make a change to an element. // Usually an attribute change, but can also be textcontent. // // Parameters: @@ -471,7 +471,7 @@ this.undoChangeStackPointer = -1; this.undoableChangeStack = []; }; - + // Function: svgedit.history.UndoManager.resetUndoStack // Resets the undo stack, effectively clearing the undo/redo history svgedit.history.UndoManager.prototype.resetUndoStack = function() { @@ -480,30 +480,30 @@ }; // Function: svgedit.history.UndoManager.getUndoStackSize -// Returns: +// Returns: // Integer with the current size of the undo history stack svgedit.history.UndoManager.prototype.getUndoStackSize = function() { return this.undoStackPointer; }; // Function: svgedit.history.UndoManager.getRedoStackSize -// Returns: +// Returns: // Integer with the current size of the redo history stack svgedit.history.UndoManager.prototype.getRedoStackSize = function() { return this.undoStack.length - this.undoStackPointer; }; // Function: svgedit.history.UndoManager.getNextUndoCommandText -// Returns: +// Returns: // String associated with the next undo command -svgedit.history.UndoManager.prototype.getNextUndoCommandText = function() { +svgedit.history.UndoManager.prototype.getNextUndoCommandText = function() { return this.undoStackPointer > 0 ? this.undoStack[this.undoStackPointer-1].getText() : ""; }; // Function: svgedit.history.UndoManager.getNextRedoCommandText -// Returns: +// Returns: // String associated with the next redo command -svgedit.history.UndoManager.prototype.getNextRedoCommandText = function() { +svgedit.history.UndoManager.prototype.getNextRedoCommandText = function() { return this.undoStackPointer < this.undoStack.length ? this.undoStack[this.undoStackPointer].getText() : ""; }; @@ -516,7 +516,7 @@ } }; -// Function: svgedit.history.UndoManager.redo +// Function: svgedit.history.UndoManager.redo // Performs a redo step svgedit.history.UndoManager.prototype.redo = function() { if (this.undoStackPointer < this.undoStack.length && this.undoStack.length > 0) { @@ -524,18 +524,18 @@ cmd.apply(this.handler_); } }; - + // Function: svgedit.history.UndoManager.addCommandToHistory // Adds a command object to the undo history stack // -// Parameters: +// Parameters: // cmd - The command object to add svgedit.history.UndoManager.prototype.addCommandToHistory = function(cmd) { // FIXME: we MUST compress consecutive text changes to the same element // (right now each keystroke is saved as a separate command that includes the // entire text contents of the text element) // TODO: consider limiting the history that we store here (need to do some slicing) - + // if our stack pointer is not at the end, then we have to remove // all commands after the pointer and insert the new command if (this.undoStackPointer < this.undoStack.length && this.undoStack.length > 0) { @@ -547,13 +547,13 @@ // Function: svgedit.history.UndoManager.beginUndoableChange -// This function tells the canvas to remember the old values of the -// attrName attribute for each element sent in. The elements and values -// are stored on a stack, so the next call to finishUndoableChange() will +// This function tells the canvas to remember the old values of the +// attrName attribute for each element sent in. The elements and values +// are stored on a stack, so the next call to finishUndoableChange() will // pop the elements and old values off the stack, gets the current values // from the DOM and uses all of these to construct the undo-able command. // -// Parameters: +// Parameters: // attrName - The name of the attribute being changed // elems - Array of DOM elements being changed svgedit.history.UndoManager.prototype.beginUndoableChange = function(attrName, elems) { @@ -576,7 +576,7 @@ // change since beginUndoableChange was called. The command can then // be added to the command history // -// Returns: +// Returns: // Batch command object with resulting changes svgedit.history.UndoManager.prototype.finishUndoableChange = function() { var p = this.undoChangeStackPointer--; @@ -598,4 +598,4 @@ }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/math.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/math.js index 8d783c1..252bf2f 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/math.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/math.js @@ -27,7 +27,7 @@ // Function: svgedit.math.transformPoint // A (hopefully) quicker function to transform a point by a matrix // (this function avoids any DOM calls and just does the math) -// +// // Parameters: // x - Float representing the x coordinate // y - Float representing the y coordinate @@ -39,10 +39,10 @@ // Function: svgedit.math.isIdentity -// Helper function to check if the matrix performs no actual transform +// Helper function to check if the matrix performs no actual transform // (i.e. exists for identity purposes) // -// Parameters: +// Parameters: // m - The matrix object to check // // Returns: @@ -55,15 +55,15 @@ // Function: svgedit.math.matrixMultiply // This function tries to return a SVGMatrix that is the multiplication m1*m2. // We also round to zero when it's near zero -// +// // Parameters: // >= 2 Matrix objects to multiply // -// Returns: +// Returns: // The matrix object resulting from the calculation svgedit.math.matrixMultiply = function() { var args = arguments, i = args.length, m = args[i-1]; - + while(i-- > 1) { var m1 = args[i-1]; m = m1.multiply(m); @@ -74,17 +74,17 @@ if (Math.abs(m.d) < NEAR_ZERO) m.d = 0; if (Math.abs(m.e) < NEAR_ZERO) m.e = 0; if (Math.abs(m.f) < NEAR_ZERO) m.f = 0; - + return m; }; // Function: svgedit.math.hasMatrixTransform // See if the given transformlist includes a non-indentity matrix transform // -// Parameters: +// Parameters: // tlist - The transformlist to check // -// Returns: +// Returns: // Boolean on whether or not a matrix transform was found svgedit.math.hasMatrixTransform = function(tlist) { if(!tlist) return false; @@ -105,7 +105,7 @@ // w - Float with the box width // h - Float with the box height // m - Matrix object to transform the box by -// +// // Returns: // An object with the following values: // * tl - The top left coordinate (x,y object) @@ -144,7 +144,7 @@ miny = Math.min(miny, botright.y); maxy = Math.max(maxy, botright.y); - return {tl:topleft, tr:topright, bl:botleft, br:botright, + return {tl:topleft, tr:topright, bl:botleft, br:botright, aabox: {x:minx, y:miny, width:(maxx-minx), height:(maxy-miny)} }; }; @@ -153,7 +153,7 @@ // (this is the equivalent of SVGTransformList.consolidate() but unlike // that method, this one does not modify the actual SVGTransformList) // This function is very liberal with its min,max arguments -// +// // Parameters: // tlist - The transformlist object // min - Optional integer indicating start transform position @@ -174,7 +174,7 @@ var m = svg.createSVGMatrix(); for (var i = min; i <= max; ++i) { // if our indices are out of range, just use a harmless identity matrix - var mtom = (i >= 0 && i < tlist.numberOfItems ? + var mtom = (i >= 0 && i < tlist.numberOfItems ? tlist.getItem(i).matrix : svg.createSVGMatrix()); m = svgedit.math.matrixMultiply(m, mtom); @@ -188,7 +188,7 @@ // // Parameters: // elem - The DOM element to check -// +// // Returns: // The matrix object associated with the element's transformlist svgedit.math.getMatrix = function(elem) { @@ -198,16 +198,16 @@ // Function: svgedit.math.snapToAngle -// Returns a 45 degree angle coordinate associated with the two given +// Returns a 45 degree angle coordinate associated with the two given // coordinates -// +// // Parameters: // x1 - First coordinate's x value // x2 - Second coordinate's x value // y1 - First coordinate's y value // y2 - Second coordinate's y value // -// Returns: +// Returns: // Object with the following values: // x - The angle-snapped x value // y - The angle-snapped y value @@ -219,7 +219,7 @@ var angle = Math.atan2(dy,dx); var dist = Math.sqrt(dx * dx + dy * dy); var snapangle= Math.round(angle/snap)*snap; - var x = x1 + dist*Math.cos(snapangle); + var x = x1 + dist*Math.cos(snapangle); var y = y1 + dist*Math.sin(snapangle); //console.log(x1,y1,x2,y2,x,y,angle) return {x:x, y:y, a:snapangle}; @@ -237,11 +237,11 @@ // Boolean that's true if rectangles intersect svgedit.math.rectsIntersect = function(r1, r2) { if (!r1 || !r2) return false; - return r2.x < (r1.x+r1.width) && + return r2.x < (r1.x+r1.width) && (r2.x+r2.width) > r1.x && r2.y < (r1.y+r1.height) && (r2.y+r2.height) > r1.y; }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/method-draw.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/method-draw.js index 2b82133..bd818d0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/method-draw.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/method-draw.js @@ -21,14 +21,14 @@ document.addEventListener("touchmove", touchHandler, true); document.addEventListener("touchend", touchHandler, true); document.addEventListener("touchcancel", touchHandler, true); - + if(!window.methodDraw) window.methodDraw = function($) { var svgCanvas; var Editor = {}; var is_ready = false; curConfig = { - canvas_expansion: 1, - dimensions: [580,400], + canvas_expansion: 1, + dimensions: [580,400], initFill: {color: 'fff', opacity: 1}, initStroke: {width: 1.5, color: '000', opacity: 1}, initOpacity: 1, @@ -56,7 +56,7 @@ "key_down":"Down", "key_backspace":"Backspace", "key_del":"Del" - + }, // This is needed if the locale is English, since the locale strings are not read in that instance. layers: { @@ -87,27 +87,27 @@ "retrieving": 'Retrieving "%s" ...' } }; - + var curPrefs = {}; //$.extend({}, defaultPrefs); var customHandlers = {}; Editor.curConfig = curConfig; Editor.tool_scale = 1; - + Editor.setConfig = function(opts) { $.extend(true, curConfig, opts); if(opts.extensions) { curConfig.extensions = opts.extensions; } } - + // Extension mechanisms must call setCustomHandlers with two functions: opts.open and opts.save // opts.open's responsibilities are: // - invoke a file chooser dialog in 'open' mode // - let user pick a SVG file // - calls setCanvas.setSvgString() with the string contents of that file // opts.save's responsibilities are: - // - accept the string contents of the current document + // - accept the string contents of the current document // - invoke a file chooser dialog in 'save' mode // - save the file to location chosen by the user Editor.setCustomHandlers = function(opts) { @@ -127,7 +127,7 @@ customHandlers = opts; }); } - + Editor.randomizeIds = function() { svgCanvas.randomizeIds(arguments) } @@ -151,7 +151,7 @@ $("body").toggleClass("touch", svgedit.browser.isTouch()); $("#canvas_width").val(curConfig.dimensions[0]); $("#canvas_height").val(curConfig.dimensions[1]); - + var extFunc = function() { $.each(curConfig.extensions, function() { var extname = this; @@ -165,7 +165,7 @@ }); }); } - + // Load extensions // Bit of a hack to run extensions in local Opera/IE9 if(document.location.protocol === 'file:') { @@ -192,7 +192,7 @@ 'zoom':'zoom.png', 'delete':'delete.png', 'spapelib':'shapelib.png', - 'node_delete':'node_delete.png', + 'node_delete':'node_delete.png', 'align_left':'align-left.png', 'align_center':'align-center.png', 'align_right':'align-right.png', @@ -243,7 +243,7 @@ if (tleft.length != 0) { var min_height = tleft.offset().top + tleft.outerHeight(); } - + // Look for any missing flyout icons from plugins $('.tools_flyout').each(function() { var shower = $('#' + this.id + '_show'); @@ -258,7 +258,7 @@ } }); methodDraw.runCallbacks(); - + setTimeout(function() { $('.flyout_arrow_horiz:empty').each(function() { $(this).append($.getSvgIcon('arrow_right').width(5).height(5)); @@ -266,7 +266,7 @@ }, 1); } }); - + $('#rulers').on("dblclick", function(e){ $("#base_unit_container").css({ top: e.pageY-10, @@ -277,7 +277,7 @@ $("#base_unit_container") .on("mouseleave mouseenter", function(e){ t = setTimeout(function(){$("#base_unit_container").fadeOut(500)}, 200) - if(event.type == "mouseover") clearTimeout(t) + if(event.type == "mouseover") clearTimeout(t) }) $("#base_unit") .on("change", function(e) { @@ -287,28 +287,28 @@ Editor.canvas = svgCanvas = new $.SvgCanvas(document.getElementById("svgcanvas"), curConfig); Editor.show_save_warning = false; Editor.paintBox = {fill: null, stroke:null, canvas:null}; - var palette = ["#444444", "#482816", "#422C10", "#3B2F0E", "#32320F", - "#293414", "#1F361B", "#153723", "#0C372C", - "#083734", "#0E353B", "#1A333F", "#273141", - "#332D40", "#3E2A3C", "#462735", "#4B252D", - "#4D2425", "#4C261D", "#666666", "#845335", "#7B572D", - "#6F5C2A", "#62612C", "#546433", "#46673D", - "#396849", "#306856", "#2D6862", "#33666C", - "#426373", "#535F75", "#645A73", "#74556D", - "#805064", "#884D58", "#8B4D4B", "#894F3F", - "#999999", "#C48157", "#B8874D", "#A98E49", "#97944B", - "#849854", "#729C62", "#619E73", "#559E84", - "#529D94", "#5B9BA2", "#6D97AB", "#8391AE", - "#9A8AAB", "#AF84A3", "#BF7E96", "#C97A86", - "#CE7975", "#CC7C65", "#BBBBBB", "#FFB27C", "#FABA6F", + var palette = ["#444444", "#482816", "#422C10", "#3B2F0E", "#32320F", + "#293414", "#1F361B", "#153723", "#0C372C", + "#083734", "#0E353B", "#1A333F", "#273141", + "#332D40", "#3E2A3C", "#462735", "#4B252D", + "#4D2425", "#4C261D", "#666666", "#845335", "#7B572D", + "#6F5C2A", "#62612C", "#546433", "#46673D", + "#396849", "#306856", "#2D6862", "#33666C", + "#426373", "#535F75", "#645A73", "#74556D", + "#805064", "#884D58", "#8B4D4B", "#894F3F", + "#999999", "#C48157", "#B8874D", "#A98E49", "#97944B", + "#849854", "#729C62", "#619E73", "#559E84", + "#529D94", "#5B9BA2", "#6D97AB", "#8391AE", + "#9A8AAB", "#AF84A3", "#BF7E96", "#C97A86", + "#CE7975", "#CC7C65", "#BBBBBB", "#FFB27C", "#FABA6F", "#E6C36A", "#CFCA6D", "#B8D078", "#A0D58A", - "#8CD79F", "#7DD8B5", "#7AD6CA", "#84D3DB", - "#9ACEE6", "#B6C7EA", "#D3BEE7", "#EDB6DC", - "#FFAFCC", "#FFAAB8", "#FFA9A2", "#FFAC8D", - "#DDDDDD", "#FFE7A2", "#FFF093", "#FFFA8D", "#FFFF91", - "#EEFF9F", "#D1FFB4", "#B9FFCE", "#A8FFE9", - "#A4FFFF", "#B1FFFF", "#CBFFFF", "#EDFFFF", - "#FFF5FF", "#FFEBFF", "#FFE2FF", "#FFDCEC", + "#8CD79F", "#7DD8B5", "#7AD6CA", "#84D3DB", + "#9ACEE6", "#B6C7EA", "#D3BEE7", "#EDB6DC", + "#FFAFCC", "#FFAAB8", "#FFA9A2", "#FFAC8D", + "#DDDDDD", "#FFE7A2", "#FFF093", "#FFFA8D", "#FFFF91", + "#EEFF9F", "#D1FFB4", "#B9FFCE", "#A8FFE9", + "#A4FFFF", "#B1FFFF", "#CBFFFF", "#EDFFFF", + "#FFF5FF", "#FFEBFF", "#FFE2FF", "#FFDCEC", "#FFDBD2", "#FFDFB8" ], isMac = (navigator.platform.indexOf("Mac") >= 0), @@ -320,69 +320,69 @@ default_img_url = curConfig.imgPath + "placeholder.svg", workarea = $("#workarea"), canv_menu = $("#cmenu_canvas"), - exportWindow = null, + exportWindow = null, tool_scale = 1, ui_context = 'toolbars', orig_source = ''; - + // This puts the correct shortcuts in the menus if (!isMac) { $('.shortcut').each(function(){ var text = $(this).text(); $(this).text(text.split("鈱�").join("Ctrl+")) - }); + }); } // This sets up alternative dialog boxes. They mostly work the same way as // their UI counterparts, expect instead of returning the result, a callback // needs to be included that returns the result as its first parameter. - // In the future we may want to add additional types of dialog boxes, since + // In the future we may want to add additional types of dialog boxes, since // they should be easy to handle this way. (function() { $('#dialog_container').draggable({cancel:'#dialog_content, #dialog_buttons *', containment: 'window'}); var box = $('#dialog_box'), btn_holder = $('#dialog_buttons'); - + var dbox = function(type, msg, callback, defText) { $('#dialog_content').html('<p>'+msg.replace(/\n/g,'</p><p>')+'</p>') .toggleClass('prompt',(type=='prompt')); btn_holder.empty(); - + var ok = $('<input type="button" value="' + uiStrings.common.ok + '">').appendTo(btn_holder); - + if(type != 'alert') { $('<input type="button" value="' + uiStrings.common.cancel + '">') .appendTo(btn_holder) .on("click touchstart", function() { box.hide();callback(false)}); } - + if(type == 'prompt') { var input = $('<input type="text">').prependTo(btn_holder); input.val(defText || ''); input.bind('keydown', 'return', function() {ok.trigger("click touchstart");}); } - + if(type == 'process') { ok.hide(); } - + box.show(); - - ok.on("click touchstart", function() { + + ok.on("click touchstart", function() { box.hide(); var resp = (type == 'prompt')?input.val():true; if(callback) callback(resp); }).focus(); - + if(type == 'prompt') input.focus(); } - + $.alert = function(msg, cb) { dbox('alert', msg, cb);}; $.confirm = function(msg, cb) { dbox('confirm', msg, cb);}; $.process_cancel = function(msg, cb) { dbox('process', msg, cb);}; $.prompt = function(msg, txt, cb) { dbox('prompt', msg, cb, txt);}; }()); - + var setSelectMode = function() { var curr = $('.tool_button_current'); if(curr.length && curr[0].id !== 'tool_select') { @@ -391,7 +391,7 @@ } svgCanvas.setMode('select'); }; - + var setEyedropperMode = function() { var curr = $('.tool_button_current'); if(curr.length && curr[0].id !== 'tool_eyedropper') { @@ -400,7 +400,7 @@ } svgCanvas.setMode('eyedropper'); } - + var togglePathEditMode = function(editmode, elems) { $('#tools_bottom_2,#tools_bottom_3').toggle(!editmode); if(editmode) { @@ -417,11 +417,11 @@ selector.reset(elems[0]); selector.selectorRect.setAttribute('display', 'inline'); } - + setIcon('#tool_select', 'select'); } } - + // used to make the flyouts stay on the screen longer the very first time var flyoutspeed = 1250; var textBeingEntered = false; @@ -431,32 +431,32 @@ var docprops = false; var preferences = false; var cur_context = ''; - + var saveHandler = function(window,svg) { Editor.show_save_warning = false; - - // by default, we add the XML prolog back, systems integrating SVG-edit (wikis, CMSs) + + // by default, we add the XML prolog back, systems integrating SVG-edit (wikis, CMSs) // can just provide their own custom save handler and might not want the XML prolog svg = '<?xml version="1.0"?>\n' + svg; - + // Opens the SVG in new window, with warning about Mozilla bug #308590 when applicable - + var ua = navigator.userAgent; // Chrome 5 (and 6?) don't allow saving, show source instead ( http://code.google.com/p/chromium/issues/detail?id=46735 ) // IE9 doesn't allow standalone Data URLs ( https://connect.microsoft.com/IE/feedback/details/542600/data-uri-images-fail-when-loaded-by-themselves ) if(~ua.indexOf('MSIE')) { showSourceEditor(0,true); - return; + return; } var win = window.open("data:image/svg+xml;base64," + Utils.encode64(svg)); - + // Alert will only appear the first time saved OR the first time the bug is encountered var done = $.pref('save_notice_done'); if(done !== "all") { - + var note = uiStrings.notification.saveFromBrowser.replace('%s', 'SVG'); - + // Check if FF and has <defs/> if(ua.indexOf('Gecko/') !== -1) { if(svg.indexOf('<defs') !== -1) { @@ -467,23 +467,23 @@ $.pref('save_notice_done', 'part'); } } else { - $.pref('save_notice_done', 'all'); + $.pref('save_notice_done', 'all'); } - + if(done !== 'part') { win.alert(note); } } }; - + var exportHandler = function(window, data) { var issues = data.issues; - + if(!$('#export_canvas').length) { $('<canvas>', {id: 'export_canvas'}).hide().appendTo('body'); } var c = $('#export_canvas')[0]; - + c.width = svgCanvas.contentW; c.height = svgCanvas.contentH; canvg(c, data.svg, {renderCallback: function() { @@ -492,23 +492,23 @@ var done = $.pref('export_notice_done'); if(done !== "all") { var note = uiStrings.notification.saveFromBrowser.replace('%s', 'PNG'); - + // Check if there's issues if(issues.length) { var pre = "\n \u2022 "; note += ("\n\n" + uiStrings.notification.noteTheseIssues + pre + issues.join(pre)); - } - + } + // Note that this will also prevent the notice even though new issues may appear later. // May want to find a way to deal with that without annoying the user - $.pref('export_notice_done', 'all'); + $.pref('export_notice_done', 'all'); exportWindow.alert(note); } }}); }; - + // called when we've selected a different element - var selectedChanged = function(window,elems) { + var selectedChanged = function(window,elems) { var mode = svgCanvas.getMode(); if(mode === "select") setSelectMode(); if (mode === "pathedit") return updateContextPanel(); @@ -540,15 +540,15 @@ multiselected: multiselected }); }; - + // Call when part of element is in process of changing, generally // on mousemove actions like rotate, move, etc. var elementTransition = function(window,elems) { var mode = svgCanvas.getMode(); var elem = elems[0]; - + if(!elem) return; - + multiselected = (elems.length >= 2 && elems[1] != null) ? elems : null; // Only updating fields for single elements for now if(!multiselected) { @@ -559,7 +559,7 @@ rotateCursor(ang); $('#tool_reorient').toggleClass('disabled', ang == 0); break; - + // TODO: Update values that change on move/resize, etc // case "select": // case "resize": @@ -570,22 +570,22 @@ elems: elems }); }; - + // called when any element has changed var elementChanged = function(window,elems) { var mode = svgCanvas.getMode(); if(mode === "select") { setSelectMode(); } - + for (var i = 0; i < elems.length; ++i) { var elem = elems[i]; - + // if the element changed was the svg, then it could be a resolution change if (elem && elem.tagName === "svg") { //populateLayers(); updateCanvas(); - } + } // Update selectedElement if element is no longer part of the image. // This occurs for the text elements in Firefox else if(elem && selectedElement && selectedElement.parentNode == null) { @@ -593,29 +593,29 @@ selectedElement = elem; } } - + Editor.show_save_warning = true; - + // we update the contextual panel with potentially new // positional/sizing information (we DON'T want to update the // toolbar here as that creates an infinite loop) // also this updates the history buttons - + // we tell it to skip focusing the text control if the // text element was previously in focus updateContextPanel(); - + // In the event a gradient was flipped: if(selectedElement && mode === "select") { Editor.paintBox.fill.update(); Editor.paintBox.stroke.update(); } - + svgCanvas.runExtensions("elementChanged", { elems: elems }); }; - + var zoomChanged = function(window, bbox, autoCenter) { var scrbar = 15, res = svgCanvas.getResolution(), @@ -625,7 +625,7 @@ if(!z_info) return; var zoomlevel = z_info.zoom, bb = z_info.bbox; - + if(zoomlevel < .001) { changeZoom({value: .1}); return; @@ -653,23 +653,23 @@ } } animateZoom() - - - + + + //if(autoCenter) { // updateCanvas(); //} else { // updateCanvas(false, {x: bb.x * zoomlevel + (bb.width * zoomlevel)/2, y: bb.y * zoomlevel + (bb.height * zoomlevel)/2}); //} - + if(svgCanvas.getMode() == 'zoom' && bb.width) { // Go to select if a zoom box was drawn setSelectMode(); } - + zoomDone(); } - + $('#cur_context_panel').delegate('a', 'click', function() { var link = $(this); if(link.attr('data-root')) { @@ -680,14 +680,14 @@ svgCanvas.clearSelection(); return false; }); - + var contextChanged = function(win, context) { - + var link_str = ''; if(context) { var str = ''; link_str = '<a href="#" data-root="y">' + svgCanvas.getCurrentDrawing().getCurrentLayerName() + '</a>'; - + $(context).parentsUntil('#svgcontent > g').andSelf().each(function() { if(this.id) { str += ' > ' + this.id; @@ -706,15 +706,15 @@ $('#cur_context_panel').toggle(!!context).html(link_str); } - + // Makes sure the current selected paint is available to work with var prepPaints = function() { Editor.paintBox.fill.prep(); Editor.paintBox.stroke.prep(); } - + var flyout_funcs = {}; - + var setupFlyouts = function(holders) { $.each(holders, function(hold_sel, btn_opts) { var buttons = $(hold_sel).children(); @@ -726,7 +726,7 @@ .each(function(i) { // Get this buttons options var opts = btn_opts[i]; - + // Remember the function that goes with this ID flyout_funcs[opts.sel] = opts.fn; @@ -737,7 +737,7 @@ var options = opts; //find the currently selected tool if comes from keystroke if (event.type === "keydown") { - var flyoutIsSelected = $(options.parent + "_show").hasClass('tool_button_current'); + var flyoutIsSelected = $(options.parent + "_show").hasClass('tool_button_current'); var currentOperation = $(options.parent + "_show").attr("data-curopt"); $.each(holders[opts.parent], function(i, tool){ if (tool.sel == currentOperation) { @@ -779,12 +779,12 @@ // Set first as default shower.attr('data-curopt', btn_opts[0].sel); } - + var timer; - + var pos = $(show_sel).position(); $(hold_sel).css({'left': pos.left+34, 'top': pos.top+77}); - + // Clicking the "show" icon should set the current mode shower.mousedown(function(evt) { $('#workarea').one("mousedown", function(){$('#tools_shapelib').hide()}) @@ -818,22 +818,22 @@ flyout_funcs[opt](); } }); - + // $('#tools_rect').mouseleave(function(){$('#tools_rect').fadeOut();}); }); - + setFlyoutTitles(); } - + var makeFlyoutHolder = function(id, child) { var div = $('<div>',{ 'class': 'tools_flyout', id: id }).appendTo('#svg_editor').append(child); - + return div; } - + var setFlyoutPositions = function() { $('.tools_flyout').each(function() { var shower = $('#' + this.id + '_show'); @@ -842,12 +842,12 @@ $(this).css({left: (pos.left + w)*tool_scale, top: pos.top}); }); } - + var setFlyoutTitles = function() { $('.tools_flyout').each(function() { var shower = $('#' + this.id + '_show'); if(shower.data('isLibrary')) return; - + var tooltips = []; $(this).children().each(function() { tooltips.push(this.title); @@ -856,14 +856,14 @@ }); } - var resize_timer; - + var resize_timer; + var extAdded = function(window, ext) { - + var cb_called = false; var resize_done = false; var cb_ready = true; // Set to false to delay callback (e.g. wait for $.svgIcons) - + function prepResize() { if(resize_timer) { clearTimeout(resize_timer); @@ -873,31 +873,31 @@ resize_timer = setTimeout(function() { resize_done = true; setIconSize(curPrefs.iconsize); - }, 50); + }, 50); } } - + var runCallback = function() { if(ext.callback && !cb_called && cb_ready) { cb_called = true; ext.callback(); } } - + var btn_selects = []; - + if(ext.context_tools) { $.each(ext.context_tools, function(i, tool) { // Add select tool var cont_id = tool.container_id?(' id="' + tool.container_id + '"'):""; - + var panel = $('#' + tool.panel); - + // create the panel if it doesn't exist if(!panel.length) panel = $('<div>', {id: tool.panel}).appendTo("#tools_top").hide(); - + // TODO: Allow support for other types, or adding to existing tool switch (tool.type) { case 'tool_button': @@ -919,23 +919,23 @@ html += "</select></label>"; // Creates the tool, hides & adds it, returns the select element var sel = $(html).appendTo(panel).find('select'); - + $.each(tool.events, function(evt, func) { $(sel).bind(evt, func); }); break; - case 'button-select': + case 'button-select': var html = '<div id="' + tool.id + '" class="dropdown toolset" title="' + tool.title + '">' + '<div id="cur_' + tool.id + '" class="icon_label"></div><button></button></div>'; - + var list = $('<ul id="' + tool.id + '_opts"></ul>').appendTo('#option_lists'); if(tool.colnum) { list.addClass('optcols' + tool.colnum); } - + // Creates the tool, hides & adds it, returns the select element var dropdown = $(html).appendTo(panel).children(); - + btn_selects.push({ elem: ('#' + tool.id), list: ('#' + tool.id + '_opts'), @@ -947,40 +947,40 @@ break; case 'input': var html = '<label' + cont_id + '>' - + '<span id="' + tool.id + '_label">' + + '<span id="' + tool.id + '_label">' + tool.label + ':</span>' + '<input id="' + tool.id + '" title="' + tool.title + '" size="' + (tool.size || "4") + '" value="' + (tool.defval || "") + '" type="text"/></label>' - + // Creates the tool, hides & adds it, returns the select element - + // Add to given tool.panel var inp = $(html).appendTo(panel).find('input'); - + if(tool.spindata) { inp.SpinButton(tool.spindata); } - + if(tool.events) { $.each(tool.events, function(evt, func) { inp.bind(evt, func); }); } break; - + default: break; } }); } - + if(ext.buttons) { var fallback_obj = {}, placement_obj = {}, svgicons = ext.svgicons; var holders = {}; - - + + // Add buttons given by extension $.each(ext.buttons, function(i, btn) { var icon; @@ -1001,11 +1001,11 @@ placement_obj['#' + id] = svgicon; } } - + var cls, parent; - - - + + + // Set button up according to its type switch ( btn.type ) { case 'mode_flyout': @@ -1035,7 +1035,7 @@ $('<div>', {id: btn.panel}).appendTo("#tools_top"); break; } - + var button = $((btn.list || btn.type == 'app_menu')?'<li/>':'<div/>') .attr("id", id) .attr("title", btn.title) @@ -1053,7 +1053,7 @@ // var opts = btn.includeWith; // // opts.button, default, position var ref_btn = $(button); - + var flyout_holder = ref_btn.parent(); // Create a flyout menu if there isn't one already if(!ref_btn.parent().hasClass('tools_flyout')) { @@ -1062,22 +1062,22 @@ var show_btn = ref_btn.clone() .attr('id',tls_id + '_show') .append($('<div>',{'class':'flyout_arrow_horiz'})); - + ref_btn.before(show_btn); - + // Create a flyout div flyout_holder = makeFlyoutHolder(tls_id, ref_btn); flyout_holder.data('isLibrary', true); show_btn.data('isLibrary', true); - } - - - + } + + + // var ref_data = Actions.getButtonData(opts.button); - + placement_obj['#' + tls_id + '_show'] = btn.id; // TODO: Find way to set the current icon using the iconloader if this is not default - + // Include data for extension button as well as ref button var cur_h = holders['#'+flyout_holder[0].id] = [{ sel: '#'+id, @@ -1090,7 +1090,7 @@ } else if(btn.type == 'app_menu' || btn.type == 'menu') { button.append(btn.title); } - + } else if(btn.list) { // Add button to list button.addClass('push_button'); @@ -1105,7 +1105,7 @@ var opts = btn.includeWith; // opts.button, default, position var ref_btn = $(opts.button); - + var flyout_holder = ref_btn.parent(); // Create a flyout menu if there isn't one already if(!ref_btn.parent().hasClass('tools_flyout')) { @@ -1114,20 +1114,20 @@ var show_btn = ref_btn.clone() .attr('id',tls_id + '_show') .append($('<div>',{'class':'flyout_arrow_horiz'})); - + ref_btn.before(show_btn); - + // Create a flyout div flyout_holder = makeFlyoutHolder(tls_id, ref_btn); - } - + } + var ref_data = Actions.getButtonData(opts.button); - + if(opts.isDefault) { placement_obj['#' + tls_id + '_show'] = btn.id; - } + } // TODO: Find way to set the current icon using the iconloader if this is not default - + // Include data for extension button as well as ref button var cur_h = holders['#'+flyout_holder[0].id] = [{ sel: '#'+id, @@ -1136,12 +1136,12 @@ key: btn.key, isDefault: btn.includeWith?btn.includeWith.isDefault:0 }, ref_data]; - + // {sel:'#tool_rect', fn: clickRect, evt: 'mouseup', key: 4, parent: '#tools_rect', icon: 'rect'} - + var pos = ("position" in opts)?opts.position:'last'; var len = flyout_holder.children().length; - + // Add at given position or end if(!isNaN(pos) && pos >= 0 && pos < len) { flyout_holder.children().eq(pos).before(button); @@ -1149,12 +1149,12 @@ flyout_holder.append(button); cur_h.reverse(); } - } - + } + if(!svgicons) { button.append(icon); } - + if(!btn.list) { // Add given events to button $.each(btn.events, function(name, func) { @@ -1183,11 +1183,11 @@ } setupFlyouts(holders); }); - + $.each(btn_selects, function() { - addAltDropDown(this.elem, this.list, this.callback, {seticon: true}); + addAltDropDown(this.elem, this.list, this.callback, {seticon: true}); }); - + if (svgicons) cb_ready = false; // Delay callback @@ -1205,13 +1205,13 @@ cb_ready = true; // Ready for callback runCallback(); } - + }); } - + runCallback(); }; - + var getPaint = function(color, opac, type) { // update the editor's fill paint var opts = null; @@ -1222,10 +1222,10 @@ } else { refElem = $("#" + type + "_color defs *")[0]; } - + opts = { alpha: opac }; opts[refElem.tagName] = refElem; - } + } else if (color.indexOf("#") === 0) { opts = { alpha: opac, @@ -1239,15 +1239,15 @@ }; } return new $.jGraduate.Paint(opts); - }; - + }; + // set the canvas properties at init var res = svgCanvas.getResolution(); if(curConfig.baseUnit !== "px") { res.w = svgedit.units.convertUnit(res.w) + curConfig.baseUnit; res.h = svgedit.units.convertUnit(res.h) + curConfig.baseUnit; } - + var createBackground = function(fill) { svgCanvas.createLayer("background") cur_shape = svgCanvas.addSvgElementFromJson({ @@ -1267,11 +1267,11 @@ svgCanvas.setCurrentLayer("Layer 1") svgCanvas.setCurrentLayerPosition("1") } - + // create a new layer background if it doesn't exist if (!document.getElementById('canvas_background')) createBackground(); var fill = document.getElementById('canvas_background').getAttribute("fill"); - + // updates the toolbar (colors, opacity, etc) based on the selected element // This function also updates the opacity and id elements that are in the context panel var updateToolbar = function() { @@ -1292,7 +1292,7 @@ case 'a': // Look for common styles var gWidth = null; - + var childs = selectedElement.getElementsByTagName('*'); for(var i = 0, len = childs.length; i < len; i++) { var swidth = childs[i].getAttribute("stroke-width"); @@ -1302,7 +1302,7 @@ gWidth = null; } } - + $('#stroke_width').val(gWidth === null ? "0" : gWidth); updateContextPanel(); break; @@ -1310,7 +1310,7 @@ //removed because multiselect shouldnt set color //Editor.paintBox.fill.update(false); //Editor.paintBox.stroke.update(false); - + $('#stroke_width').val(selectedElement.getAttribute("stroke-width") || 0); var dash = selectedElement.getAttribute("stroke-dasharray") || "none" $('option', '#stroke_style').removeAttr('selected'); @@ -1320,9 +1320,9 @@ $.fn.dragInput.updateCursor($('#stroke_width')[0]) $.fn.dragInput.updateCursor($('#blur')[0]) } - + } - + // All elements including image and group have opacity if(selectedElement != null) { var opac_perc = ((selectedElement.getAttribute("opacity")||1.0)*100); @@ -1330,31 +1330,31 @@ $.fn.dragInput.updateCursor($('#group_opacity')[0]) } }; - + var setImageURL = Editor.setImageURL = function(url) { if(!url) url = default_img_url; - + svgCanvas.setImageURL(url); $('#image_url').val(url); } - + var setInputWidth = function(elem) { var w = Math.min(Math.max(12 + elem.value.length * 6, 50), 300); $(elem).width(w); } - + // updates the context panel tools based on the selected element var updateContextPanel = function(e) { var elem = selectedElement; // If element has just been deleted, consider it null if(elem != null && !elem.parentNode) elem = null; if (multiselected && multiselected[0] != null && !multiselected[0].parentNode) multiselected = false; - + var currentLayerName = svgCanvas.getCurrentDrawing().getCurrentLayerName(); var currentMode = svgCanvas.getMode(); var unit = curConfig.baseUnit !== 'px' ? curConfig.baseUnit : null; var is_node = currentMode == 'pathedit'; //elem ? (elem.id && elem.id.indexOf('pathpointgrip') == 0) : false; - + if (is_node) { $('.context_panel').hide(); $('#path_node_panel').show(); @@ -1362,10 +1362,10 @@ var point = path.getNodePoint(); $('#tool_add_subpath').removeClass('push_button_pressed').addClass('tool_button'); $('#tool_node_delete').toggleClass('disabled', !path.canDeleteNodes); - + // Show open/close button based on selected point setIcon('#tool_openclose_path', path.closed_subpath ? 'open_path' : 'close_path'); - + if(point) { var seg_type = $('#seg_type'); if(unit) { @@ -1381,18 +1381,18 @@ seg_type.val(4).attr('disabled','disabled'); } } - $("#tools_top").removeClass("multiselected") + $("#tools_top").removeClass("multiselected") $("#stroke_panel").hide(); $("#canvas_panel").hide(); return; } - + var menu_items = $('#cmenu_canvas li'); $('.context_panel').hide(); $('.menu_item', '#edit_menu').addClass('disabled'); $('.menu_item', '#object_menu').addClass('disabled'); - - + + //hack to show the proper multialign box if (multiselected) { multiselected = multiselected.filter(Boolean); @@ -1401,17 +1401,17 @@ } if (!elem && !multiselected) { - $("#tools_top").removeClass("multiselected") + $("#tools_top").removeClass("multiselected") $("#stroke_panel").hide(); $("#canvas_panel").show(); } - + if (elem != null) { $("#stroke_panel").show(); var elname = elem.nodeName; var angle = svgCanvas.getRotationAngle(elem); $('#angle').val(Math.round(angle)); - + var blurval = svgCanvas.getBlur(elem); $('#blur').val(blurval); if(!is_node && currentMode != 'pathedit') { @@ -1426,7 +1426,7 @@ y = bb.y; } } - + if(unit) { x = svgedit.units.convertUnit(x); y = svgedit.units.convertUnit(y); @@ -1439,34 +1439,34 @@ $("#path_x").val(Math.round(x)) $("#path_y").val(Math.round(y)) } - + // Elements in this array cannot be converted to a path var no_path = ['image', 'text', 'path', 'g', 'use'].indexOf(elname) == -1; if (no_path) $('.action_path_convert_selected').removeClass('disabled'); if (elname === "path") $('.action_path_selected').removeClass('disabled'); - + } - + var link_href = null; if (el_name === 'a') { link_href = svgCanvas.getHref(elem); $('#g_panel').show(); } - + if(elem.parentNode.tagName === 'a') { if(!$(elem).siblings().length) { $('#a_panel').show(); link_href = svgCanvas.getHref(elem.parentNode); } } - + // Hide/show the make_link buttons $('#tool_make_link, #tool_make_link').toggle(!link_href); - + if(link_href) { $('#link_url').val(link_href); } - + // update contextual tools here var panels = { g: [], @@ -1475,39 +1475,39 @@ image: ['width','height', 'x', 'y'], circle: ['cx','cy','r'], ellipse: ['cx','cy','rx','ry'], - line: ['x1','y1','x2','y2'], + line: ['x1','y1','x2','y2'], text: ['x', 'y'], 'use': [], path : [] }; - + var el_name = elem.tagName; - + if($(elem).data('gsvg')) { $('#g_panel').show(); } - + if (el_name == "path" || el_name == "polyline") { $('#path_panel').show(); } - + if(panels[el_name]) { var cur_panel = panels[el_name]; $('#' + el_name + '_panel').show(); - + // corner radius has to live in a different panel - // because otherwise it changes the position of the + // because otherwise it changes the position of the // of the elements if(el_name == "rect") $("#cornerRadiusLabel").show() else $("#cornerRadiusLabel").hide() - + $.each(cur_panel, function(i, item) { var attrVal = elem.getAttribute(item); if(curConfig.baseUnit !== 'px' && elem[item]) { var bv = elem[item].baseVal.value; attrVal = svgedit.units.convertUnit(bv); } - + //update the draginput cursors var name_item = document.getElementById(el_name + '_' + item); name_item.value = Math.round(attrVal) || 0; @@ -1515,13 +1515,13 @@ $.fn.dragInput.updateCursor(name_item ); } }); - + if(el_name == 'text') { var font_family = elem.getAttribute("font-family"); var select = document.getElementById("font_family_dropdown"); select.selectedIndex = 3 - - $('#text_panel').css("display", "inline"); + + $('#text_panel').css("display", "inline"); $('#tool_italic').toggleClass('active', svgCanvas.getItalic()) $('#tool_bold').toggleClass('active', svgCanvas.getBold()) $('#font_family').val(font_family); @@ -1547,19 +1547,19 @@ menu_items[(el_name === 'g' ? 'en':'dis') + 'ableContextMenuItems']('#ungroup'); menu_items[((el_name === 'g' || !multiselected) ? 'dis':'en') + 'ableContextMenuItems']('#group'); } - + if (multiselected) { $('#multiselected_panel').show(); $('.action_multi_selected').removeClass('disabled'); menu_items .enableContextMenuItems('#group') .disableContextMenuItems('#ungroup'); - } - + } + if (!elem) { menu_items.disableContextMenuItems('#delete,#cut,#copy,#group,#ungroup,#move_front,#move_up,#move_down,#move_back'); } - + // update history buttons if (undoMgr.getUndoStackSize() > 0) { $('#tool_undo').removeClass( 'disabled'); @@ -1573,21 +1573,21 @@ else { $('#tool_redo').addClass( 'disabled'); } - + svgCanvas.addedNew = false; - + if ( (elem && !is_node) || multiselected) { // update the selected elements' layer $('#selLayerNames').removeAttr('disabled').val(currentLayerName); - + // Enable regular menu options canv_menu.enableContextMenuItems('#delete,#cut,#copy,#move_front,#move_up,#move_down,#move_back'); } }; - + $('#text').on("focus", function(e){ textBeingEntered = true; } ); $('#text').on("blur", function(){ textBeingEntered = false; } ); - + // bind the selected event to our function that handles updates to the UI svgCanvas.bind("selected", selectedChanged); svgCanvas.bind("transition", elementTransition); @@ -1598,7 +1598,7 @@ svgCanvas.bind("contextset", contextChanged); svgCanvas.bind("extension_added", extAdded); svgCanvas.textActions.setInputElem($("#text")[0]); - + var str = '<div class="palette_item transparent" data-rgb="none"></div>\ <div class="palette_item black" data-rgb="#000000"></div>\ <div class="palette_item white" data-rgb="#ffffff"></div>' @@ -1606,11 +1606,11 @@ str += '<div class="palette_item" style="background-color: ' + item + ';" data-rgb="' + item + '"></div>'; }); $('#palette').append(str); - + var changeFontSize = function(ctl) { svgCanvas.setFontSize(ctl.value); } - + var changeStrokeWidth = function(ctl) { var val = ctl.value; if(val == 0 && selectedElement && ['line', 'polyline'].indexOf(selectedElement.nodeName) >= 0) { @@ -1618,11 +1618,11 @@ } svgCanvas.setStrokeWidth(val); } - + //cache var $indicator = $('#tool_angle_indicator') var $reorient = $('#tool_reorient') - + rotateCursor = function(angle){ var rotate_string = 'rotate('+ angle + 'deg)' $indicator.css({ @@ -1633,14 +1633,14 @@ 'transform': rotate_string }); } - + var changeRotationAngle = function(ctl) { var preventUndo = true; svgCanvas.setRotationAngle(ctl.value, preventUndo); rotateCursor(ctl.value) $('#tool_reorient').toggleClass('disabled', ctl.value == 0); } - + var changeZoom = function(ctl) { var zoomlevel = ctl.value / 100; if(zoomlevel < .001) { @@ -1653,12 +1653,12 @@ width: 0, height: 0, // center pt of scroll position - x: (w_area[0].scrollLeft + w_area.width()/2)/zoom, + x: (w_area[0].scrollLeft + w_area.width()/2)/zoom, y: (w_area[0].scrollTop + w_area.height()/2)/zoom, zoom: zoomlevel }, true); } - + var changeBlur = function(ctl, completed) { val = ctl.value; $('#blur').val(val); @@ -1669,35 +1669,35 @@ svgCanvas.setBlurNoUndo(val); } } - + var operaRepaint = function() { // Repaints canvas in Opera. Needed for stroke-dasharray change as well as fill change if(!window.opera) return; $('<p/>').hide().appendTo('body').remove(); } - + $('#stroke_style').change(function(){ svgCanvas.setStrokeAttr('stroke-dasharray', $(this).val()); $("#stroke_style_label").html(this.options[this.selectedIndex].text) operaRepaint(); }); - + $('#seg_type').change(function() { svgCanvas.setSegType($(this).val()); $("#seg_type_label").html(this.options[this.selectedIndex].text) }); - + // Lose focus for select elements when changed (Allows keyboard shortcuts to work better) $('select').change(function(){$(this).blur();}); - + $('#font_family').change(function() { svgCanvas.setFontFamily(this.value); }); - + $('#text').keyup(function(){ svgCanvas.setTextContent(this.value); }); - + changeAttribute = function(el, completed) { var attr = el.getAttribute("data-attr"); var multiplier = el.getAttribute("data-multiplier") || 1; @@ -1712,7 +1712,7 @@ //if (!noUndo) svgCanvas.changeSelectedAttribute(attr, val); svgCanvas.changeSelectedAttributeNoUndo(attr, val); }; - + picking = false; $(document).on("mouseup", function(){picking = false;}) @@ -1726,7 +1726,7 @@ var color = $(this).attr('data-rgb'); var paint = null; var noUndo = true; - if (evt.type == "mousedown") noUndo = false + if (evt.type == "mousedown") noUndo = false // Webkit-based browsers returned 'initial' here for no stroke if (color === 'transparent' || color === 'initial' || color === '#none') { color = 'none'; @@ -1735,9 +1735,9 @@ else { paint = new $.jGraduate.Paint({alpha: 100, solidColor: color.substr(1)}); } - + Editor.paintBox[picker].setPaint(paint); - + if (isStroke) { svgCanvas.setColor('stroke', color, noUndo); if (color != 'none' && svgCanvas.getStrokeOpacity() != 1) { @@ -1751,7 +1751,7 @@ } } }).bind('contextmenu', function(e) {e.preventDefault()}); - + $("#toggle_stroke_tools").toggle(function() { $(".stroke_tool").css('display','table-cell'); $(this).addClass('expanded'); @@ -1761,7 +1761,7 @@ $(this).removeClass('expanded'); resetScrollPos(); }); - + // This is a common function used when a tool has been clicked (chosen) // It does several common things: // - removes the tool_button_current class from whatever tool currently has it @@ -1779,12 +1779,12 @@ $(button).addClass('tool_button_current').removeClass('tool_button'); return true; }; - + (function() { - var last_x = null, last_y = null, w_area = workarea[0], + var last_x = null, last_y = null, w_area = workarea[0], panning = false, keypan = false; - - var move_pan = function(evt) { + + var move_pan = function(evt) { if(panning === false) return; w_area.scrollLeft -= (evt.clientX - last_x); @@ -1794,7 +1794,7 @@ if(evt.type === 'mouseup' || evt.type === 'touchend') panning = false; return false; } - + var start_pan = function(evt) { if(evt.button === 1 || keypan === true || (evt.originalEvent.touches && evt.originalEvent.touches.length >= 2)) { panning = true; @@ -1803,19 +1803,19 @@ return false; } } - + $('#svgcanvas') .on('mousemove mouseup touchend', move_pan) .on("mousedown touchmove", start_pan) - + $(window).mouseup(function() { panning = false; }); - + $(document).bind('keydown', 'space', function(evt) { evt.preventDefault(); svgCanvas.spaceKey = keypan = true; - + }).bind('keyup', 'space', function(evt) { evt.preventDefault(); svgCanvas.spaceKey = keypan = false; @@ -1829,14 +1829,14 @@ } }) }()); - - + + function setStrokeOpt(opt, changeElem) { var id = opt.id; var bits = id.split('_'); var pre = bits[0]; var val = bits[1]; - + if(changeElem) { svgCanvas.setStrokeAttr('stroke-' + pre, val); } @@ -1844,7 +1844,7 @@ setIcon('#cur_' + pre , id, 20); $(opt).addClass('current').siblings().removeClass('current'); } - + //menu handling var menus = $('.menu'); var blinker = function(e) { @@ -1862,12 +1862,12 @@ if(!$(e.target).hasClass("disabled") && $(e.target).hasClass("menu_item")) blinker(e) else $('#menu_bar').removeClass('active') - } + } } - + $('.menu_item').on('mousedown touchstart', function(e){blinker(e)}); $("svg, body").on('mousedown touchstart', function(e){closer(e)}); - + var accumulatedDelta = 0 $('#workarea').on('mousewheel', function(e, delta, deltaX, deltaY){ if (e.altKey || e.ctrlKey) { @@ -1876,7 +1876,7 @@ $("#zoom").val(parseInt(zoom + deltaY*(e.altKey ? 10 : 5))).change() } }); - + $('.menu_title') .on('mousedown', function() { $("#tools_shapelib").hide() @@ -1889,27 +1889,27 @@ $(this).parent().addClass('open'); }); - + // Made public for UI customization. // TODO: Group UI functions into a public methodDraw.ui interface. Editor.addDropDown = function(elem, callback, dropUp) { if ($(elem).length == 0) return; // Quit if called on non-existant element var button = $(elem).find('button'); - + var list = $(elem).find('ul').attr('id', $(elem)[0].id + '-list'); - + if(!dropUp) { // Move list to place where it can overflow container $('#option_lists').append(list); } - + var on_button = false; if(dropUp) { $(elem).addClass('dropup'); } - + list.find('li').bind('mouseup', callback); - + $(window).mouseup(function(evt) { if(!on_button) { button.removeClass('down'); @@ -1917,11 +1917,11 @@ } on_button = false; }); - + button.bind('mousedown',function() { if (!button.hasClass('down')) { button.addClass('down'); - + if(!dropUp) { var pos = $(elem).offset(); // position slider @@ -1931,7 +1931,7 @@ }); } list.show(); - + on_button = true; } else { button.removeClass('down'); @@ -1943,7 +1943,7 @@ on_button = false; }); } - + // TODO: Combine this with addDropDown or find other way to optimize var addAltDropDown = function(elem, list, callback, opts) { var button = $(elem); @@ -1961,7 +1961,7 @@ callback.apply(this, arguments); }); - + $(window).mouseup(function(evt) { if(!on_button) { button.removeClass('down'); @@ -1970,7 +1970,7 @@ } on_button = false; }); - + var height = list.height(); $(elem).bind('mousedown',function() { var off = $(elem).offset(); @@ -1981,7 +1981,7 @@ off.top += $(elem).height(); } $(list).offset(off); - + if (!button.hasClass('down')) { button.addClass('down'); list.show(); @@ -1998,51 +1998,51 @@ }).mouseout(function() { on_button = false; }); - + if(opts.multiclick) { list.mousedown(function() { on_button = true; }); } } - + $('#font_family_dropdown').change(function() { var fam = this.options[this.selectedIndex].value var fam_display = this.options[this.selectedIndex].text $('#preview_font').html(fam_display).css("font-family", fam); $('#font_family').val(fam).change(); }); - + $('div', '#position_opts').each(function(){ this.addEventListener("mouseup", function(){ var letter = this.id.replace('tool_pos','').charAt(0); svgCanvas.alignSelectedElements(letter, 'page'); }) }); - + /* - + When a flyout icon is selected (if flyout) { - Change the icon - Make pressing the button run its stuff } - Run its stuff - + When its shortcut key is pressed - If not current in list, do as above , else: - Just run its stuff - + */ - + // Unfocus text input when workarea is mousedowned. (function() { var inp; var unfocus = function() { $(inp).blur(); } - + $('#svg_editor').find('button, select, input:not(#text)').focus(function() { inp = this; ui_context = 'toolbars'; @@ -2055,7 +2055,7 @@ $('#text').focus(); } }); - + }()); var clickSelect = function() { @@ -2063,80 +2063,80 @@ svgCanvas.setMode('select'); } }; - + var clickFHPath = function() { if (toolButtonClick('#tool_fhpath')) { svgCanvas.setMode('fhpath'); } }; - + var clickLine = function() { if (toolButtonClick('#tool_line')) { svgCanvas.setMode('line'); } }; - + var clickSquare = function(){ if (toolButtonClick('#tool_square')) { svgCanvas.setMode('square'); } }; - + var clickRect = function(){ if (toolButtonClick('#tool_rect')) { svgCanvas.setMode('rect'); } }; - + var clickFHRect = function(){ if (toolButtonClick('#tool_fhrect')) { svgCanvas.setMode('fhrect'); } }; - + var clickCircle = function(){ if (toolButtonClick('#tool_circle')) { svgCanvas.setMode('circle'); } }; - + var clickEllipse = function(){ if (toolButtonClick('#tool_ellipse')) { svgCanvas.setMode('ellipse'); } }; - + var clickFHEllipse = function(){ if (toolButtonClick('#tool_fhellipse')) { svgCanvas.setMode('fhellipse'); } }; - + var clickImage = function(){ if (toolButtonClick('#tool_image')) { svgCanvas.setMode('image'); } }; - + var clickZoom = function(){ if (toolButtonClick('#tool_zoom')) { svgCanvas.setMode('zoom'); } }; - + var dblclickZoom = function(){ if (toolButtonClick('#tool_zoom')) { zoomImage(); setSelectMode(); } }; - + var clickText = function(){ if (toolButtonClick('#tool_text')) { svgCanvas.setMode('text'); } }; - + var clickPath = function(){ if (toolButtonClick('#tool_path')) { svgCanvas.setMode('path'); @@ -2153,43 +2153,43 @@ path.deletePathNode(); } }; - + var cutSelected = function() { if (selectedElement != null || multiselected) { flash($('#edit_menu')); svgCanvas.cutSelectedElements(); } }; - + var copySelected = function() { if (selectedElement != null || multiselected) { flash($('#edit_menu')); svgCanvas.copySelectedElements(); } }; - + var pasteSelected = function() { flash($('#edit_menu')); - var zoom = svgCanvas.getZoom(); - var x = (workarea[0].scrollLeft + workarea.width()/2)/zoom - svgCanvas.contentW; + var zoom = svgCanvas.getZoom(); + var x = (workarea[0].scrollLeft + workarea.width()/2)/zoom - svgCanvas.contentW; var y = (workarea[0].scrollTop + workarea.height()/2)/zoom - svgCanvas.contentH; - svgCanvas.pasteElements('point', x, y); + svgCanvas.pasteElements('point', x, y); } - + var moveToTopSelected = function() { if (selectedElement != null) { flash($('#object_menu')); svgCanvas.moveToTopSelectedElement(); } }; - + var moveToBottomSelected = function() { if (selectedElement != null) { flash($('#object_menu')); svgCanvas.moveToBottomSelectedElement(); } }; - + var moveUpSelected = function() { if (selectedElement != null) { flash($('#object_menu')); @@ -2203,7 +2203,7 @@ svgCanvas.moveUpDownSelected("Down"); } }; - + var moveUpDownSelected = function(dir) { if (selectedElement != null) { flash($('#object_menu')); @@ -2223,13 +2223,13 @@ updateContextPanel(); } } - + var reorientPath = function() { if (selectedElement != null) { path.reorient(); } } - + var makeHyperlink = function() { if (selectedElement != null || multiselected) { $.prompt(uiStrings.notification.enterNewLinkURL, "http://", function(url) { @@ -2237,7 +2237,7 @@ }); } } - + var moveSelected = function(dx,dy) { if (selectedElement != null || multiselected) { if(curConfig.gridSnapping) { @@ -2250,24 +2250,24 @@ svgCanvas.moveSelectedElements(dx,dy); } }; - + var linkControlPoints = function() { // var linked = document.getElementById('tool_node_link').checked; // path.linkControlPoints(linked); } - + var clonePathNode = function() { if (path.getNodePoint()) { path.clonePathNode(); } }; - + var deletePathNode = function() { if (path.getNodePoint()) { path.deletePathNode(); } }; - + var addSubPath = function() { var button = $('#tool_add_subpath'); var sp = !button.hasClass('push_button_pressed'); @@ -2276,23 +2276,23 @@ } else { button.removeClass('push_button_pressed').addClass('tool_button'); } - + path.addSubPath(sp); - + }; - + var opencloseSubPath = function() { path.opencloseSubPath(); - } - + } + var selectNext = function() { svgCanvas.cycleElement(1); }; - + var selectPrev = function() { svgCanvas.cycleElement(0); }; - + var rotateSelected = function(cw,step) { if (selectedElement == null || multiselected) return; if(!cw) step *= -1; @@ -2300,7 +2300,7 @@ svgCanvas.setRotationAngle(new_angle); updateContextPanel(); }; - + var clickClear = function(){ var dims = curConfig.dimensions; $.confirm(uiStrings.notification.QwantToClear, function(ok) { @@ -2315,17 +2315,17 @@ svgCanvas.runExtensions('onNewDocument'); }); }; - + var clickBold = function(){ svgCanvas.setBold( !svgCanvas.getBold() ); updateContextPanel(); }; - + var clickItalic = function(){ svgCanvas.setItalic( !svgCanvas.getItalic() ); updateContextPanel(); }; - + var clickExport = function() { // Open placeholder window (prevents popup) if(!customHandlers.pngsave) { @@ -2343,16 +2343,16 @@ }); } } - + // by default, svgCanvas.open() is a no-op. - // it is up to an extension mechanism (opera widget, etc) + // it is up to an extension mechanism (opera widget, etc) // to call setCustomHandlers() which will make it do something var clickOpen = function(){ svgCanvas.open(); }; var clickImport = function(){ }; - + var flash = function($menu){ var menu_title = $menu.prev(); menu_title.css({ @@ -2361,21 +2361,21 @@ }); setTimeout(function(){menu_title.removeAttr("style")}, 200); } - + var clickUndo = function(){ if (undoMgr.getUndoStackSize() > 0) { flash($('#edit_menu')); undoMgr.undo(); } }; - + var clickRedo = function(){ if (undoMgr.getRedoStackSize() > 0) { flash($('#edit_menu')); undoMgr.redo(); } }; - + var clickGroup = function(){ // group if (multiselected) { @@ -2388,17 +2388,17 @@ svgCanvas.ungroupSelectedElement(); } }; - + var clickClone = function(){ flash($('#edit_menu')); svgCanvas.cloneSelectedElements(20,20); }; - + var clickAlign = function() { var letter = this.id.replace('tool_align','').charAt(0); svgCanvas.alignSelectedElements(letter, $('#align_relative_to').val()); }; - + var clickSwitch = function() { var stroke_rect = document.querySelector('#tool_stroke rect'); $("#tool_stroke").toggleClass('active') @@ -2414,9 +2414,9 @@ var fill = getPaint(fill_color, fill_opacity, "fill"); Editor.paintBox.fill.setPaint(stroke, true); Editor.paintBox.stroke.setPaint(fill, true); - + }; - + var zoomImage = function(multiplier) { var res = svgCanvas.getResolution(); multiplier = multiplier?res.zoom * multiplier:1; @@ -2426,22 +2426,22 @@ zoomDone(); updateCanvas(true); }; - + var zoomDone = function() { // updateBgImage(); updateWireFrame(); //updateCanvas(); // necessary? } - + var clickWireframe = function() { flash($('#view_menu')); var wf = !$('#tool_wireframe').hasClass('push_button_pressed'); - if (wf) + if (wf) $('#tool_wireframe').addClass('push_button_pressed'); else $('#tool_wireframe').removeClass('push_button_pressed'); workarea.toggleClass('wireframe'); - + if(supportsNonSS) return; var wf_rules = $('#wireframe_rules'); if(!wf_rules.length) { @@ -2449,27 +2449,27 @@ } else { wf_rules.empty(); } - + updateWireFrame(); } - + var clickSnapGrid = function() { flash($('#view_menu')); var sg = !$('#tool_snap').hasClass('push_button_pressed'); - if (sg) + if (sg) $('#tool_snap').addClass('push_button_pressed'); else - $('#tool_snap').removeClass('push_button_pressed'); + $('#tool_snap').removeClass('push_button_pressed'); curConfig.gridSnapping = sg; } - + var minimizeModal = function() { - + if (window.self != window.top) { //we're in an iframe top.exit_fullscreen(); } } - + var clickRulers = function() { flash($('#view_menu')); var rulers = !$('#tool_rulers').hasClass('push_button_pressed'); @@ -2485,29 +2485,29 @@ } $('#rulers').toggle(!!curConfig.showRulers) } - + var updateWireFrame = function() { // Test support if(supportsNonSS) return; - + var rule = "#workarea.wireframe #svgcontent * { stroke-width: " + 1/svgCanvas.getZoom() + "px; }"; $('#wireframe_rules').text(workarea.hasClass('wireframe') ? rule : ""); } - + var showSourceEditor = function(e, forSaving){ if (editingsource) return; flash($('#view_menu')); editingsource = true; - + $('#save_output_btns').toggle(!!forSaving); $('#tool_source_back').toggle(!forSaving); - + var str = orig_source = svgCanvas.getSvgString(); $('#svg_source_textarea').val(str); $('#svg_source_editor').fadeIn(); $('#svg_source_textarea').focus().select(); }; - + var clickSave = function(){ flash($('#file_menu')); // In the future, more options can be provided here @@ -2517,17 +2517,17 @@ } svgCanvas.save(saveOpts); }; - + var saveSourceEditor = function(){ if (!editingsource) return; - + var saveChanges = function() { svgCanvas.clearSelection(); hideSourceEditor(); zoomImage(); prepPaints(); } - + if (!svgCanvas.setSvgString($('#svg_source_textarea').val())) { $.confirm(uiStrings.notification.QerrorsRevertToSource, function(ok) { if(!ok) return false; @@ -2536,18 +2536,18 @@ } else { saveChanges(); } - setSelectMode(); + setSelectMode(); }; - + function setBackground(color, url) { // if(color == curPrefs.bkgd_color && url == curPrefs.bkgd_url) return; $.pref('bkgd_color', color); $.pref('bkgd_url', url); - + // This should be done in svgcanvas.js for the borderRect fill svgCanvas.setBackground(color, url); } - + var setIcon = Editor.setIcon = function(elem, icon_id, forcedSize) { var icon = (typeof icon_id === 'string') ? $.getSvgIcon(icon_id, true) : icon_id.clone(); if(!icon) { @@ -2557,7 +2557,7 @@ $(elem).find("img").replaceWith(icon); } - + var ua_prefix; (ua_prefix = function() { var regex = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/; @@ -2569,34 +2569,34 @@ return prop.match(regex)[0]; } } - + // Nothing found so far? if('WebkitOpacity' in someScript.style) return 'Webkit'; if('KhtmlOpacity' in someScript.style) return 'Khtml'; - + return ''; }()); - + var scaleElements = function(elems, scale) { var prefix = '-' + ua_prefix.toLowerCase() + '-'; - + var sides = ['top', 'left', 'bottom', 'right']; - + elems.each(function() { // console.log('go', scale); // Handled in CSS // this.style[ua_prefix + 'Transform'] = 'scale(' + scale + ')'; - + var el = $(this); - + var w = el.outerWidth() * (scale - 1); var h = el.outerHeight() * (scale - 1); var margins = {}; - + for(var i = 0; i < 4; i++) { var s = sides[i]; - + var cur = el.data('orig_margin-' + s); if(cur == null) { cur = parseInt(el.css('margin-' + s)); @@ -2609,48 +2609,48 @@ } else if(s === 'bottom') { val += h; } - + el.css('margin-' + s, val); // el.css('outline', '1px solid red'); } }); } - + var setIconSize = Editor.setIconSize = function(size, force) { if(size == curPrefs.size && !force) return; // return; // var elems = $('.tool_button, .push_button, .tool_button_current, .disabled, .icon_label, #url_notice, #tool_open'); - + var sel_toscale = '#tools_top .toolset, #editor_panel > *, #history_panel > *,\ #main_button, #tools_left > *, #path_node_panel > *, #multiselected_panel > *,\ #g_panel > *, #tool_font_size > *, .tools_flyout'; - + var elems = $(sel_toscale); - + var scale = 1; - + if(typeof size == 'number') { scale = size; } else { var icon_sizes = { s:.75, m:1, l:1.25, xl:1.5 }; scale = icon_sizes[size]; } - + Editor.tool_scale = tool_scale = scale; - - setFlyoutPositions(); + + setFlyoutPositions(); var hidden_ps = elems.parents(':hidden'); hidden_ps.css('visibility', 'hidden').show(); scaleElements(elems, scale); hidden_ps.css('visibility', 'visible').hide(); - + var rule_elem = $('#tool_size_rules'); if(!rule_elem.length) { rule_elem = $('<style id="tool_size_rules"><\/style>').appendTo('head'); } else { rule_elem.empty(); } - + if(size != 'm') { var style_str = ''; $.each(cssResizeRules, function(selector, rules) { @@ -2674,10 +2674,10 @@ ); rule_elem.text(style_str); } - + setFlyoutPositions(); } - + var cancelOverlays = function() { $('#dialog_box').hide(); if (!editingsource && !docprops && !preferences) { @@ -2686,7 +2686,7 @@ } return; }; - + if (editingsource) { if (orig_source !== $('#svg_source_textarea').val()) { $.confirm(uiStrings.notification.QignoreSourceChanges, function(ok) { @@ -2703,7 +2703,7 @@ } resetScrollPos(); }; - + var hideSourceEditor = function(){ $('#svg_source_editor').hide(); editingsource = false; @@ -2711,25 +2711,25 @@ }; var win_wh = {width:$(window).width(), height:$(window).height()}; - + var resetScrollPos = $.noop, curScrollPos; - + /* Fix for Issue 781: Drawing area jumps to top-left corner on window resize (IE9) if(svgedit.browser.isIE()) { (function() { resetScrollPos = function() { - if(workarea[0].scrollLeft === 0 + if(workarea[0].scrollLeft === 0 && workarea[0].scrollTop === 0) { workarea[0].scrollLeft = curScrollPos.left; workarea[0].scrollTop = curScrollPos.top; } } - + curScrollPos = { left: workarea[0].scrollLeft, top: workarea[0].scrollTop }; - + $(window).resize(resetScrollPos); methodDraw.ready(function() { // TODO: Find better way to detect when to do this to minimize @@ -2738,7 +2738,7 @@ resetScrollPos(); }, 500); }); - + workarea.scroll(function() { curScrollPos = { left: workarea[0].scrollLeft, @@ -2747,11 +2747,11 @@ }); }()); }*/ - + $(window).resize(function(evt) { updateCanvas(); }); - + (function() { workarea.scroll(function() { // TODO: jQuery's scrollLeft/Top() wouldn't require a null check @@ -2759,18 +2759,18 @@ $('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft; } if ($('#ruler_y').length != 0) { - $('#ruler_y')[0].scrollTop = workarea[0].scrollTop; + $('#ruler_y')[0].scrollTop = workarea[0].scrollTop; } }); }()); - + $('#url_notice').click(function() { $.alert(this.title); }); - + $('#change_image_url').click(promptImgURL); - + function promptImgURL() { var curhref = svgCanvas.getHref(selectedElement); curhref = curhref.indexOf("data:") === 0?"":curhref; @@ -2778,26 +2778,26 @@ if(url) setImageURL(url); }); } - + // TODO: go back to the color boxes having white background-color and then setting - // background-image to none.png (otherwise partially transparent gradients look weird) + // background-image to none.png (otherwise partially transparent gradients look weird) var colorPicker = function(elem) { var picker = elem[0].id == 'stroke_color' ? 'stroke' : 'fill'; var is_background = elem[0].id == "canvas_color" if (is_background) picker = 'canvas' // var opacity = (picker == 'stroke' ? $('#stroke_opacity') : $('#fill_opacity')); var paint = Editor.paintBox[picker].paint; - + var title = (picker == 'stroke' ? 'Pick a Stroke Paint and Opacity' : 'Pick a Fill Paint and Opacity'); var was_none = false; var pos = is_background ? {'right': 175, 'top': 50} : {'left': 50, 'bottom': 50} - + $("#color_picker") .draggable({cancel:'.jGraduate_tabs, .jGraduate_colPick, .jGraduate_gradPick, .jPicker', containment: 'window'}) .removeAttr("style") .css(pos) .jGraduate( - { + { paint: paint, window: { pickerTitle: title }, images: { clientPath: curConfig.jGraduatePath }, @@ -2805,17 +2805,17 @@ }, function(p) { paint = new $.jGraduate.Paint(p); - + Editor.paintBox[picker].setPaint(paint); svgCanvas.setPaint(picker, paint); - + $('#color_picker').hide(); }, function(p) { $('#color_picker').hide(); }); }; - + var PaintBox = function(container, type) { var background = document.getElementById("canvas_background"); var cur = {color: "fff", opacity: 1} @@ -2837,11 +2837,11 @@ fill="#' + cur.color + '" opacity="' + cur.opacity + '"/>\ <defs><linearGradient id="gradbox_"/></defs></svg>', 'text/xml'); var docElem = svgdocbox.documentElement; - + docElem = $(container)[0].appendChild(document.importNode(docElem, true)); if (type === 'canvas') docElem.setAttribute('width',60.5); else docElem.setAttribute('width',"100%"); - + this.rect = docElem.firstChild; this.defs = docElem.getElementsByTagName('defs')[0]; this.grad = this.defs.firstChild; @@ -2880,14 +2880,14 @@ } else createBackground(fillAttr) } - + if(apply) { svgCanvas.setColor(this.type, fillAttr, true); svgCanvas.setPaintOpacity(this.type, opac, true); } - + } - + this.update = function(apply) { if(!selectedElement) return; var type = this.type; @@ -2895,13 +2895,13 @@ case 'use': case 'image': case 'foreignObject': - // These elements don't have fill or stroke, so don't change + // These elements don't have fill or stroke, so don't change // the current value return; case 'g': case 'a': var gPaint = null; - + var childs = selectedElement.getElementsByTagName('*'); for(var i = 0, len = childs.length; i < len; i++) { var elem = childs[i]; @@ -2919,7 +2919,7 @@ return; } var paintColor = gPaint; - + var paintOpacity = 1; break; default: @@ -2927,7 +2927,7 @@ if (isNaN(paintOpacity)) { paintOpacity = 1.0; } - + var defColor = type === "fill" ? "black" : "none"; var paintColor = selectedElement.getAttribute(type) || defColor; } @@ -2936,16 +2936,16 @@ svgCanvas.setPaintOpacity(type, paintOpacity, true); } - paintOpacity *= 100; - + paintOpacity *= 100; + var paint = getPaint(paintColor, paintOpacity, type); // update the rect inside #fill_color/#stroke_color this.setPaint(paint); } - + this.prep = function() { var ptype = this.paint.type; - + switch ( ptype ) { case 'linearGradient': case 'radialGradient': @@ -2954,14 +2954,14 @@ } } }; - + Editor.paintBox.fill = new PaintBox('#fill_color', 'fill'); Editor.paintBox.stroke = new PaintBox('#stroke_color', 'stroke'); Editor.paintBox.canvas = new PaintBox('#canvas_color', 'canvas'); $('#stroke_width').val(curConfig.initStroke.width); $('#group_opacity').val(curConfig.initOpacity * 100); - + // Use this SVG elem to test vectorEffect support var test_el = Editor.paintBox.fill.rect.cloneNode(false); test_el.setAttribute('style','vector-effect:non-scaling-stroke'); @@ -2975,8 +2975,8 @@ } $(blur_test).remove(); - - + + // Test for embedImage support (use timeout to not interfere with page load) setTimeout(function() { svgCanvas.embedImage('images/placeholder.svg', function(datauri) { @@ -2989,7 +2989,7 @@ } }); },1000); - + $('#tool_fill').click(function(){ if ($('#tool_fill').hasClass('active')) { colorPicker($('#fill_color')); @@ -2999,7 +2999,7 @@ $("#tool_stroke").removeClass('active'); } }); - + $('#tool_stroke').on("click", function(){ if ($('#tool_stroke').hasClass('active')) { colorPicker($('#stroke_color')); @@ -3009,11 +3009,11 @@ $("#tool_fill").removeClass('active'); } }); - + $('#tool_canvas').on("click touchstart", function(){ colorPicker($('#canvas_color')); }); - + $('#tool_stroke').on("touchstart", function(){ $('#tool_stroke').addClass('active'); $("#tool_fill").removeClass('active'); @@ -3025,14 +3025,14 @@ $("#tool_stroke").removeClass('active'); colorPicker($('#fill_color')); }); - + $('#zoom_select').on("change", function() { var val = this.options[this.selectedIndex].text val = val.split("%")[0] $("#zoom").val(val).trigger("change") }); - - $('.push_button').mousedown(function() { + + $('.push_button').mousedown(function() { if (!$(this).hasClass('disabled')) { $(this).addClass('push_button_pressed').removeClass('push_button'); } @@ -3041,26 +3041,26 @@ }).mouseup(function() { $(this).removeClass('push_button_pressed').addClass('push_button'); }); - - + + // function changeResolution(x,y) { // var zoom = svgCanvas.getResolution().zoom; // setResolution(x * zoom, y * zoom); // } - + var centerCanvas = function() { // this centers the canvas vertically in the workarea (horizontal handled in CSS) workarea.css('line-height', workarea.height() + 'px'); }; - + $(window).bind('load resize', centerCanvas); - + function stepFontSize(elem, step) { var orig_val = elem.value-0; var sug_val = orig_val + step; var increasing = sug_val >= orig_val; if(step === 0) return orig_val; - + if(orig_val >= 24) { if(increasing) { return Math.round(orig_val * 1.1); @@ -3069,7 +3069,7 @@ } } else if(orig_val <= 1) { if(increasing) { - return orig_val * 2; + return orig_val * 2; } else { return orig_val / 2; } @@ -3077,13 +3077,13 @@ return sug_val; } } - + function stepZoom(elem, step) { var orig_val = elem.value-0; if(orig_val === 0) return 100; var sug_val = orig_val + step; if(step === 0) return orig_val; - + if(orig_val >= 100) { return sug_val; } else { @@ -3094,13 +3094,13 @@ } } } - + var changeCanvasSize = function(ctl){ var width = $("#canvas_width"); var height = $("#canvas_height"); var w = width.val(); var h = height.val() - + if(w != "fit" && !svgedit.units.isValidUnit('width', w)) { $.alert(uiStrings.notification.invalidAttrValGiven); width.parent().addClass('error'); @@ -3113,7 +3113,7 @@ $.alert(uiStrings.notification.invalidAttrValGiven); height.parent().addClass('error'); return false; - } + } height.parent().removeClass('error'); if(!svgCanvas.setResolution(w, h)) { $.alert(uiStrings.notification.noContentToFitTo); @@ -3124,8 +3124,8 @@ } updateCanvas(); } - - + + $('#resolution').change(function(){ var w = $('#canvas_width')[0]; var h = $('#canvas_height')[0]; @@ -3145,10 +3145,10 @@ var res = svgCanvas.getResolution() w.value = res.w h.value = res.h - + } else { var dims = this.value.split('x'); - dims[0] = parseInt(dims[0]); + dims[0] = parseInt(dims[0]); dims[1] = parseInt(dims[1]); var diff_w = dims[0] - w.value; var diff_h = dims[1] - h.value; @@ -3176,14 +3176,14 @@ } }); - + $('#zoom').change(function(){ changeZoom(this) }) - + //Prevent browser from erroneously repopulating fields $('input,select').attr("autocomplete","off"); - + // Associate all button actions as well as non-button keyboard shortcuts var Actions = function() { // sel:'selector', fn:function, evt:'event', key:[key, preventDefault, NoDisableInInput] @@ -3238,12 +3238,12 @@ {sel:'#tool_italic', fn: clickItalic, evt: 'mousedown', key: [modKey + 'I', true]}, //{sel:'#sidepanel_handle', fn: toggleSidePanel, key: ['X']}, {sel:'#copy_save_done', fn: cancelOverlays, evt: 'click'}, - + // Shortcuts not associated with buttons - + {key: 'ctrl+left', fn: function(){rotateSelected(0,1)}}, {key: 'ctrl+right', fn: function(){rotateSelected(1,1)}}, - {key: 'ctrl+shift+left', fn: function(){rotateSelected(0,5)}}, + {key: 'ctrl+shift+left', fn: function(){rotateSelected(0,5)}}, {key: 'ctrl+shift+right', fn: function(){rotateSelected(1,5)}}, {key: 'shift+O', fn: selectPrev}, {key: 'shift+P', fn: selectNext}, @@ -3264,7 +3264,7 @@ {key: ['alt+shift+up', true], fn: function(){svgCanvas.cloneSelectedElements(0,-10)}}, {key: ['alt+shift+down', true], fn: function(){svgCanvas.cloneSelectedElements(0,10)}}, {key: ['alt+shift+left', true], fn: function(){svgCanvas.cloneSelectedElements(-10,0)}}, - {key: ['alt+shift+right', true], fn: function(){svgCanvas.cloneSelectedElements(10,0)}}, + {key: ['alt+shift+right', true], fn: function(){svgCanvas.cloneSelectedElements(10,0)}}, {key: modKey + 'A', fn: function(){svgCanvas.selectAllInCurrentLayer();}}, {key: 'I', fn: function(){setEyedropperMode()}}, @@ -3272,44 +3272,44 @@ {key: modKey + 'shift+z', fn: clickRedo}, {key: 'esc', fn: minimizeModal} ]; - + // Tooltips not directly associated with a single function var key_assocs = { '4/Shift+4': '#tools_rect_show', '5/Shift+5': '#tools_ellipse_show' }; - + return { setAll: function() { var flyouts = {}; - - $.each(tool_buttons, function(i, opts) { + + $.each(tool_buttons, function(i, opts) { // Bind function to button if(opts.sel) { var btn = $(opts.sel); if (btn.length == 0) return true; // Skip if markup does not exist if(opts.evt) { - if (svgedit.browser.isTouch() && opts.evt === "click") opts.evt = "mousedown" + if (svgedit.browser.isTouch() && opts.evt === "click") opts.evt = "mousedown" btn[opts.evt](opts.fn); } - + // Add to parent flyout menu, if able to be displayed if(opts.parent && $(opts.parent + '_show').length != 0) { var f_h = $(opts.parent); if(!f_h.length) { f_h = makeFlyoutHolder(opts.parent.substr(1)); } - + f_h.append(btn); - + if(!$.isArray(flyouts[opts.parent])) { flyouts[opts.parent] = []; } flyouts[opts.parent].push(opts); } } - - + + // Bind function to shortcut key if(opts.key) { // Set shortcut based on options @@ -3326,7 +3326,7 @@ var modifier_key = keyval.split("+")[0]; if (modifier_key == "ctrl") keyval.replace("ctrl", "cmd") } - + $.each(keyval.split('/'), function(i, key) { $(document).bind('keydown', key, function(e) { fn(); @@ -3337,7 +3337,7 @@ return false; }); }); - + // Put shortcut in title if(opts.sel && !opts.hidekey && btn.attr('title')) { var new_title = btn.attr('title').split('[')[0] + ' (' + keyval + ')'; @@ -3349,10 +3349,10 @@ } } }); - + // Setup flyouts setupFlyouts(flyouts); - + $(window).bind('keydown', 'tab', function(e) { if(ui_context === 'canvas') { e.preventDefault(); @@ -3364,18 +3364,18 @@ selectPrev(); } }); - + $('#tool_zoom').dblclick(dblclickZoom); }, setTitles: function() { $.each(key_assocs, function(keyval, sel) { var menu = ($(sel).parents('#main_menu').length); - + $(sel).each(function() { if(menu) { var t = $(this).text().split(' [')[0]; } else { - var t = this.title.split(' [')[0]; + var t = this.title.split(' [')[0]; } var key_str = ''; // Shift+Up @@ -3404,9 +3404,9 @@ } }; }(); - + Actions.setAll(); - + // Select given tool Editor.ready(function() { var tool, @@ -3422,22 +3422,22 @@ tool = $("#tool_select"); } tool.click().mouseup(); - + if(curConfig.wireframe) { $('#tool_wireframe').click(); } - + if(curConfig.showlayers) { toggleSidePanel(); } - + $('#rulers').toggle(!!curConfig.showRulers); }); - - - $('#canvas_height').dragInput({ min: 10, max: null, step: 10, callback: changeCanvasSize, cursor: false, dragAdjust: .1 }); - $('#canvas_width') .dragInput({ min: 10, max: null, step: 10, callback: changeCanvasSize, cursor: false, dragAdjust: .1 }); - $('#rect_width') .dragInput({ min: 1, max: null, step: 1, callback: changeAttribute, cursor: false }); + + + $('#canvas_height').dragInput({ min: 10, max: null, step: 10, callback: changeCanvasSize, cursor: false, dragAdjust: .1 }); + $('#canvas_width') .dragInput({ min: 10, max: null, step: 10, callback: changeCanvasSize, cursor: false, dragAdjust: .1 }); + $('#rect_width') .dragInput({ min: 1, max: null, step: 1, callback: changeAttribute, cursor: false }); $('#rect_height') .dragInput({ min: 1, max: null, step: 1, callback: changeAttribute, cursor: false }); $('#ellipse_cx') .dragInput({ min: 1, max: null, step: 1, callback: changeAttribute, cursor: false }); $('#ellipse_cy') .dragInput({ min: 1, max: null, step: 1, callback: changeAttribute, cursor: false }); @@ -3473,9 +3473,9 @@ $('#font_size') .dragInput({ min: 1, max: 250, step: 1, callback: changeFontSize, cursor: true, stepfunc: stepFontSize, dragAdjust: .15 }); $('#group_opacity').dragInput({ min: 0, max: 100, step: 5, callback: changeAttribute, cursor: true, start: 100 }); $('#blur') .dragInput({ min: 0, max: 10, step: .1, callback: changeBlur, cursor: true, start: 0 }); - // Set default zoom + // Set default zoom $('#zoom').val(svgCanvas.getZoom() * 100); - + $("#workarea").contextMenu({ menu: 'cmenu_canvas', inSpeed: 0 @@ -3500,8 +3500,8 @@ case 'group': svgCanvas.groupSelectedElements(); break; - case 'ungroup': - svgCanvas.ungroupSelectedElement(); + case 'ungroup': + svgCanvas.ungroupSelectedElement(); break; case 'move_front': moveToTopSelected(); @@ -3521,18 +3521,18 @@ } break; } - + }); - + $('.contextMenu li').mousedown(function(ev) { ev.preventDefault(); }) - + $('#cmenu_canvas li').disableContextMenu(); canv_menu.enableContextMenuItems('#delete,#cut,#copy'); - - window.onbeforeunload = function() { - // Suppress warning if page is empty + + window.onbeforeunload = function() { + // Suppress warning if page is empty if(undoMgr.getUndoStackSize() === 0) { Editor.show_save_warning = false; } @@ -3540,10 +3540,10 @@ // show_save_warning is set to "false" when the page is saved. if(!curConfig.no_save_warning && Editor.show_save_warning) { // Browser already asks question about closing the page - return uiStrings.notification.unsavedChanges; + return uiStrings.notification.unsavedChanges; } }; - + Editor.openPrep = function(func) { $('#main_menu').hide(); if(undoMgr.getUndoStackSize() === 0) { @@ -3552,9 +3552,9 @@ $.confirm(uiStrings.notification.QwantToOpen, func); } } - + if (window.FileReader) { - + var import_image = function(e) { e.stopPropagation(); e.preventDefault(); @@ -3566,7 +3566,7 @@ if (file) { if(file.type.indexOf("image") != -1) { //detected an image - + //svg handing if(file.type.indexOf("svg") != -1) { var reader = new FileReader(); @@ -3580,7 +3580,7 @@ }; reader.readAsText(file); } - + //image handling else { var reader = new FileReader(); @@ -3622,9 +3622,9 @@ } } } - + var workarea = $("#workarea") - + function onDragEnter(e) { e.stopPropagation(); e.preventDefault(); @@ -3653,7 +3653,7 @@ workarea[0].addEventListener('dragover', onDragOver, false); workarea[0].addEventListener('dragleave', onDragLeave, false); workarea[0].addEventListener('drop', import_image, false); - + var open = $('<input type="file">').change(function() { var f = this; Editor.openPrep(function(ok) { @@ -3670,67 +3670,67 @@ }); }); $("#tool_open").show().prepend(open); - + var img_import = $('<input type="file">').change(import_image); $("#tool_import").show().prepend(img_import); } - + var updateCanvas = Editor.updateCanvas = function(center, new_ctr) { var w = workarea.width(), h = workarea.height(); var w_orig = w, h_orig = h; var zoom = svgCanvas.getZoom(); var w_area = workarea; var cnvs = $("#svgcanvas"); - + var old_ctr = { x: w_area[0].scrollLeft + w_orig/2, y: w_area[0].scrollTop + h_orig/2 }; - + var multi = curConfig.canvas_expansion; w = Math.max(w_orig, svgCanvas.contentW * zoom * multi); h = Math.max(h_orig, svgCanvas.contentH * zoom * multi); - + if(w == w_orig && h == h_orig) { workarea.css('overflow','hidden'); } else { workarea.css('overflow','scroll'); } - + var old_can_y = cnvs.height()/2; var old_can_x = cnvs.width()/2; cnvs.width(w).height(h); var new_can_y = h/2; var new_can_x = w/2; var offset = svgCanvas.updateCanvas(w, h); - + var ratio = new_can_x / old_can_x; - + var scroll_x = w/2 - w_orig/2; var scroll_y = h/2 - h_orig/2; - + if(!new_ctr) { - + var old_dist_x = old_ctr.x - old_can_x; var new_x = new_can_x + old_dist_x * ratio; - + var old_dist_y = old_ctr.y - old_can_y; var new_y = new_can_y + old_dist_y * ratio; - + new_ctr = { x: new_x, y: new_y }; - + } else { new_ctr.x += offset.x, new_ctr.y += offset.y; } - + //width.val(offset.x) //height.val(offset.y) - + if(center) { // Go to top-left for larger documents if(svgCanvas.contentW > w_area.width()) { @@ -3751,7 +3751,7 @@ workarea.scroll(); } } - + // Make [1,2,5] array var r_intervals = []; for(var i = .1; i < 1E5; i *= 10) { @@ -3759,7 +3759,7 @@ r_intervals.push(2 * i); r_intervals.push(5 * i); } - + function updateRulers(scanvas, zoom) { var workarea = document.getElementById("workarea"); var title_show = document.getElementById("title_show"); @@ -3767,44 +3767,44 @@ var offset_y = 48; if(!zoom) zoom = svgCanvas.getZoom(); if(!scanvas) scanvas = $("#svgcanvas"); - + var limit = 30000; - + var c_elem = svgCanvas.getContentElem(); - + var units = svgedit.units.getTypeMap(); var unit = units[curConfig.baseUnit]; // 1 = 1px - + for(var d = 0; d < 2; d++) { var is_x = (d === 0); var dim = is_x ? 'x' : 'y'; var lentype = is_x?'width':'height'; var content_d = c_elem.getAttribute(dim)-0; - + var $hcanv_orig = $('#ruler_' + dim + ' canvas:first'); - + // Bit of a hack to fully clear the canvas in Safari & IE9 $hcanv = $hcanv_orig.clone(); $hcanv_orig.replaceWith($hcanv); - + var hcanv = $hcanv[0]; - + // Set the canvas size to the width of the container var ruler_len = scanvas[lentype]()*2; var total_len = ruler_len; hcanv.parentNode.style[lentype] = total_len + 'px'; - + var canv_count = 1; var ctx_num = 0; var ctx_arr; var ctx = hcanv.getContext("2d"); - - ctx.fillStyle = "rgb(200,0,0)"; - ctx.fillRect(0,0,hcanv.width,hcanv.height); - + + ctx.fillStyle = "rgb(200,0,0)"; + ctx.fillRect(0,0,hcanv.width,hcanv.height); + // Remove any existing canvasses $hcanv.siblings().remove(); - + // Create multiple canvases when necessary (due to browser limits) if(ruler_len >= limit) { var num = parseInt(ruler_len / limit) + 1; @@ -3816,17 +3816,17 @@ hcanv.parentNode.appendChild(copy); ctx_arr[i] = copy.getContext('2d'); } - + copy[lentype] = ruler_len % limit; - + // set copy width to last ruler_len = limit; } - + hcanv[lentype] = ruler_len; - + var u_multi = unit * zoom; - + // Calculate the main number interval var raw_m = 50 / u_multi; var multi = 1; @@ -3837,7 +3837,7 @@ break; } } - + var big_int = multi * u_multi; ctx.font = "normal 9px 'Lucida Grande', sans-serif"; ctx.fillStyle = "#777"; @@ -3856,7 +3856,7 @@ ctx.moveTo(15, cur_d); ctx.lineTo(0, cur_d); } - + var num = (label_pos - content_d) / u_multi; var label; if(multi >= 1) { @@ -3865,16 +3865,16 @@ var decs = (multi+'').split('.')[1].length; label = num.toFixed(decs)-0; } - + // Do anything special for negative numbers? // var is_neg = label < 0; // real_d2 = Math.abs(real_d2); - + // Change 1000s to Ks if(label !== 0 && label !== 1000 && label % 1000 === 0) { label = (label / 1000) + 'K'; } - + if(is_x) { ctx.fillText(label, ruler_d+2, 8); ctx.fillStyle = "#777"; @@ -3885,7 +3885,7 @@ ctx.fillStyle = "#777"; } } - + var part = big_int / 10; for(var i = 1; i < 10; i++) { var sub_d = Math.round(ruler_d + part * i) + .5; @@ -3901,7 +3901,7 @@ ruler_d -= limit; sub_d = Math.round(ruler_d + part * i) + .5; } - + var line_num = (i % 2)?12:10; if(is_x) { ctx.moveTo(sub_d, 15); @@ -3916,15 +3916,15 @@ ctx.stroke(); } } - + // $(function() { updateCanvas(true); // }); - + // var revnums = "svg-editor.js ($Rev: 2083 $) "; // revnums += svgCanvas.getVersion(); // $('#copyright')[0].setAttribute("title", revnums); - + // Callback handler for embedapi.js try{ var json_encode = function(obj){ @@ -3959,35 +3959,35 @@ var cbid = parseInt(e.data.substr(0, e.data.indexOf(";"))); try{ e.source.postMessage("SVGe"+cbid+";"+json_encode(eval(e.data)), "*"); - }catch(err){ + }catch(err){ e.source.postMessage("SVGe"+cbid+";error:"+err.message, "*"); } }, false) }catch(err){ window.embed_error = err; } - - - + + + // For Compatibility with older extensions $(function() { window.svgCanvas = svgCanvas; svgCanvas.ready = methodDraw.ready; }); - - + + Editor.setLang = function(lang, allStrings) { $.pref('lang', lang); $('#lang_select').val(lang); if(allStrings) { - + var notif = allStrings.notification; - + svgCanvas.runExtensions("langChanged", lang); - + // Update flyout tooltips setFlyoutTitles(); - + // Copy title for certain tool elements var elems = { '#stroke_color': '#tool_stroke .icon_label, #tool_stroke .color_block', @@ -3995,22 +3995,22 @@ '#linejoin_miter': '#cur_linejoin', '#linecap_butt': '#cur_linecap' } - + $.each(elems, function(source, dest) { $(dest).attr('title', $(source)[0].title); }); - + // Copy alignment titles $('#multiselected_panel div[id^=tool_align]').each(function() { $('#tool_pos' + this.id.substr(10))[0].title = this.title; }); - + } }; }; - + var callbacks = []; - + function loadSvgString(str, callback) { var success = svgCanvas.setSvgString(str) !== false; callback = callback || $.noop; @@ -4022,7 +4022,7 @@ }); } } - + Editor.ready = function(cb) { if(!is_ready) { callbacks.push(cb); @@ -4037,19 +4037,19 @@ }); is_ready = true; }; - + Editor.loadFromString = function(str) { Editor.ready(function() { loadSvgString(str); }); }; - + Editor.loadFromURL = function(url, opts) { if(!opts) opts = {}; var cache = opts.cache; var cb = opts.callback; - + Editor.ready(function() { $.ajax({ 'url': url, @@ -4068,7 +4068,7 @@ }); }); }; - + Editor.loadFromDataURI = function(str) { Editor.ready(function() { var pre = 'data:image/svg+xml;base64,'; @@ -4076,10 +4076,10 @@ loadSvgString(svgedit.utilities.decode64(src)); }); }; - + Editor.addExtension = function() { var args = arguments; - + // Note that we don't want this on Editor.ready since some extensions // may want to run before then (like server_opensave). $(function() { @@ -4089,9 +4089,9 @@ return Editor; }(jQuery); - + // Run init once DOM is loaded $(methodDraw.init); - -})(); \ No newline at end of file + +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/path.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/path.js index 5b3cd5d..15b432a 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/path.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/path.js @@ -58,7 +58,7 @@ svgedit.path.init = function(editorContext) { editorContext_ = editorContext; - + pathFuncs = [0,'ClosePath']; var pathFuncsStrs = ['Moveto', 'Lineto', 'CurvetoCubic', 'CurvetoQuadratic', 'Arc', 'LinetoHorizontal', 'LinetoVertical','CurvetoCubicSmooth','CurvetoQuadraticSmooth']; @@ -170,7 +170,7 @@ svgedit.path.addCtrlGrip = function(id) { var pointGrip = svgedit.utilities.getElem("ctrlpointgrip_"+id); if(pointGrip) return pointGrip; - + pointGrip = document.createElementNS(svgns, "circle"); svgedit.utilities.assignAttributes(pointGrip, { 'id': "ctrlpointgrip_" + id, @@ -222,7 +222,7 @@ var item = seg.item; var index = seg.index; if(!item || !("x1" in item) || !("x2" in item)) return null; - var cpt = {}; + var cpt = {}; var pointGripContainer = svgedit.path.getGripContainer(); // Note that this is intentionally not seg.prev.item @@ -287,7 +287,7 @@ 'd': 'M0,0 0,0' }); pointGripContainer.appendChild(segLine); - } + } if(update) { var prev = seg.prev; @@ -314,13 +314,13 @@ // Function: smoothControlPoints // Takes three points and creates a smoother line based on them -// -// Parameters: +// +// Parameters: // ct1 - Object with x and y values (first control point) // ct2 - Object with x and y values (second control point) // pt - Object with x and y values (third point) // -// Returns: +// Returns: // Array of two "smoothed" point objects svgedit.path.smoothControlPoints = this.smoothControlPoints = function(ct1, ct2, pt) { // each point must not be the origin @@ -328,20 +328,20 @@ y1 = ct1.y - pt.y, x2 = ct2.x - pt.x, y2 = ct2.y - pt.y; - + if ( (x1 != 0 || y1 != 0) && (x2 != 0 || y2 != 0) ) { var anglea = Math.atan2(y1,x1), angleb = Math.atan2(y2,x2), r1 = Math.sqrt(x1*x1+y1*y1), r2 = Math.sqrt(x2*x2+y2*y2), nct1 = editorContext_.getSVGRoot().createSVGPoint(), - nct2 = editorContext_.getSVGRoot().createSVGPoint(); + nct2 = editorContext_.getSVGRoot().createSVGPoint(); if (anglea < 0) { anglea += 2*Math.PI; } if (angleb < 0) { angleb += 2*Math.PI; } - + var angleBetween = Math.abs(anglea - angleb), angleDiff = Math.abs(Math.PI - angleBetween)/2; - + var new_anglea, new_angleb; if (anglea - angleb > 0) { new_anglea = angleBetween < Math.PI ? (anglea + angleDiff) : (anglea - angleDiff); @@ -351,13 +351,13 @@ new_anglea = angleBetween < Math.PI ? (anglea - angleDiff) : (anglea + angleDiff); new_angleb = angleBetween < Math.PI ? (angleb + angleDiff) : (angleb - angleDiff); } - + // rotate the points nct1.x = r1 * Math.cos(new_anglea) + pt.x; nct1.y = r1 * Math.sin(new_anglea) + pt.y; nct2.x = r2 * Math.cos(new_angleb) + pt.x; nct2.y = r2 * Math.sin(new_angleb) + pt.y; - + return [nct1, nct2]; } return undefined; @@ -368,7 +368,7 @@ this.index = index; this.item = item; this.type = item.pathSegType; - + this.ctrlpts = []; this.ptgrip = null; this.segsel = null; @@ -426,7 +426,7 @@ this.type = this.item.pathSegType; } svgedit.path.getControlPoints(this); - } + } // this.segsel.setAttribute("display", y?"inline":"none"); } }; @@ -435,17 +435,17 @@ var item = this.item; // fix for path tool dom breakage, amending item does bad things now, so we take a copy and use that. Can probably improve to just take a shallow copy of object var cloneItem = $.extend({}, item); - var cur_pts = (this.ctrlpts) - ? [cloneItem.x += dx, cloneItem.y += dy, - cloneItem.x1, cloneItem.y1, + var cur_pts = (this.ctrlpts) + ? [cloneItem.x += dx, cloneItem.y += dy, + cloneItem.x1, cloneItem.y1, cloneItem.x2 += dx, cloneItem.y2 += dy] : [cloneItem.x += dx, cloneItem.y += dy]; - + svgedit.path.replacePathSeg(this.type, this.index, cur_pts); if(this.next && this.next.ctrlpts) { var next = this.next.item; - var next_pts = [next.x, next.y, + var next_pts = [next.x, next.y, next.x1 += dx, next.y1 += dy, next.x2, next.y2]; svgedit.path.replacePathSeg(this.next.type, this.next.index, next_pts); } @@ -482,7 +482,7 @@ cloneItem['x' + anum ] = pt.x + (pt.x - this.item['x' + num]); cloneItem['y' + anum ] = pt.y + (pt.y - this.item['y' + num]); - var pts = [ + var pts = [ cloneItem.x, cloneItem.y, cloneItem.x1, cloneItem.y1, cloneItem.x2, cloneItem.y2 @@ -500,7 +500,7 @@ var pts = [item.x,item.y, item.x1,item.y1, item.x2,item.y2]; - + svgedit.path.replacePathSeg(this.type, this.index, pts); this.update(true); }; @@ -536,23 +536,23 @@ this.segs = []; this.selected_pts = []; this.first_seg = null; - + // Set up segs array for(var i=0; i < len; i++) { var item = segList.getItem(i); var segment = new svgedit.path.Segment(i, item); segment.path = this; this.segs.push(segment); - } - + } + var segs = this.segs; var start_i = null; for(var i=0; i < len; i++) { - var seg = segs[i]; + var seg = segs[i]; var next_seg = (i+1) >= len ? null : segs[i+1]; var prev_seg = (i-1) < 0 ? null : segs[i-1]; - + if(seg.type === 2) { if(prev_seg && prev_seg.type !== 1) { // New sub-path, last one is open, @@ -568,7 +568,7 @@ // This is the last real segment of a closed sub-path // Next is first seg after "M" seg.next = segs[start_i+1]; - + // First seg after "M"'s prev is this seg.next.prev = seg; seg.mate = segs[start_i]; @@ -594,7 +594,7 @@ } else if(seg.type !== 1){ // Regular segment, so add grip and its "next" seg.addGrip(); - + // Don't set its "next" if it's an "M" if(next_seg && next_seg.type !== 2) { seg.next = next_seg; @@ -652,17 +652,17 @@ svgedit.path.Path.prototype.deleteSeg = function(index) { var seg = this.segs[index]; var list = this.elem.pathSegList; - + seg.show(false); var next = seg.next; if(seg.mate) { // Make the next point be the "M" point var pt = [next.item.x, next.item.y]; svgedit.path.replacePathSeg(2, next.index, pt); - + // Reposition last node svgedit.path.replacePathSeg(4, seg.index, pt); - + list.removeItem(seg.mate.index); } else if(!seg.prev) { // First node of open path, make next point the M @@ -670,7 +670,7 @@ var pt = [next.item.x, next.item.y]; svgedit.path.replacePathSeg(2, seg.next.index, pt); list.removeItem(index); - + } else { list.removeItem(index); } @@ -690,7 +690,7 @@ return false; } }); - + return closed; }; @@ -698,7 +698,7 @@ var pos = this.selected_pts.indexOf(index); if(pos == -1) { return; - } + } this.segs[index].select(false); this.selected_pts.splice(pos, 1); }; @@ -727,7 +727,7 @@ return this; }; -// Move selected points +// Move selected points svgedit.path.Path.prototype.movePts = function(d_x, d_y) { var i = this.selected_pts.length; while(i--) { @@ -750,23 +750,23 @@ var text; while(i--) { var sel_pt = this.selected_pts[i]; - + // Selected seg var cur = this.segs[sel_pt]; var prev = cur.prev; if(!prev) continue; - + if(!new_type) { // double-click, so just toggle text = "Toggle Path Segment Type"; // Toggle segment to curve/straight line var old_type = cur.type; - + new_type = (old_type == 6) ? 4 : 6; - } - + } + new_type = new_type-0; - + var cur_x = cur.item.x; var cur_y = cur.item.y; var prev_x = prev.item.x; @@ -797,12 +797,12 @@ break; case 4: points = [cur_x,cur_y]; - + // Store original prevve segment nums cur.olditem = cur.item; break; } - + cur.setType(new_type, points); } svgedit.path.path.endChanges(text); @@ -821,7 +821,7 @@ this.addPtsToSelection(pt); if(ctrl_num) { this.dragctrl = ctrl_num; - + if(link_control_pts) { this.segs[pt].setLinked(ctrl_num); } @@ -860,20 +860,20 @@ var getRotVals = function(x, y, oldcx, oldcy, newcx, newcy, angle) { dx = x - oldcx; dy = y - oldcy; - + // rotate the point around the old center r = Math.sqrt(dx*dx + dy*dy); theta = Math.atan2(dy,dx) + angle; dx = r * Math.cos(theta) + oldcx; dy = r * Math.sin(theta) + oldcy; - + // dx,dy should now hold the actual coordinates of each // point after being rotated // now we want to rotate them around the new center in the reverse direction dx -= newcx; dy -= newcy; - + r = Math.sqrt(dx*dx + dy*dy); theta = Math.atan2(dy,dx) - angle; return {'x':(r * Math.cos(theta) + newcx)/1, @@ -881,7 +881,7 @@ }; // If the path was rotated, we must now pay the piper: -// Every path point must be rotated into the rotated coordinate system of +// Every path point must be rotated into the rotated coordinate system of // its old center, then determine the new center, then rotate it back // This is because we want the path to remember its rotation @@ -898,16 +898,16 @@ oldcy = oldbox.y + oldbox.height/2, newcx = box.x + box.width/2, newcy = box.y + box.height/2, - + // un-rotate the new center to the proper position dx = newcx - oldcx, dy = newcy - oldcy, r = Math.sqrt(dx*dx + dy*dy), theta = Math.atan2(dy,dx) + angle; - + newcx = r * Math.cos(theta) + oldcx; newcy = r * Math.sin(theta) + oldcy; - + var list = current_path.pathSegList, i = list.numberOfItems; while (i) { @@ -915,7 +915,7 @@ var seg = list.getItem(i), type = seg.pathSegType; if(type == 1) continue; - + var rvals = getRotVals(seg.x,seg.y, oldcx, oldcy, newcx, newcy, angle), points = [rvals.x, rvals.y]; if(seg.x1 != null && seg.x2 != null) { @@ -926,10 +926,10 @@ svgedit.path.replacePathSeg(type, i, points); } // loop for each point - box = svgedit.utilities.getBBox(current_path); + box = svgedit.utilities.getBBox(current_path); // selectedBBoxes[0].x = box.x; selectedBBoxes[0].y = box.y; // selectedBBoxes[0].width = box.width; selectedBBoxes[0].height = box.height; - + // now we must set the new transform to be rotated around the new center var R_nc = svgroot.createSVGTransform(), tlist = svgedit.transformlist.getTransformList(current_path); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/sanitize.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/sanitize.js index 08ac7ad..66e6581 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/sanitize.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/sanitize.js @@ -78,7 +78,7 @@ "title": [], "tspan": ["class", "clip-path", "clip-rule", "dx", "dy", "fill", "fill-opacity", "fill-rule", "filter", "font-family", "font-size", "font-style", "font-weight", "id", "mask", "opacity", "requiredFeatures", "rotate", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "text-anchor", "textLength", "transform", "x", "xml:space", "y"], "use": ["class", "clip-path", "clip-rule", "fill", "fill-opacity", "fill-rule", "filter", "height", "id", "mask", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "transform", "width", "x", "xlink:href", "y"], - + // MathML Elements "annotation": ["encoding"], "annotation-xml": ["encoding"], @@ -151,7 +151,7 @@ var parent = node.parentNode; // can parent ever be null here? I think the root node's parent is the document... if (!doc || !parent) return; - + var allowedAttrs = svgWhiteList_[node.nodeName]; var allowedAttrsNS = svgWhiteListNS_[node.nodeName]; @@ -159,7 +159,7 @@ if (allowedAttrs != undefined) { var se_attrs = []; - + var i = node.attributes.length; while (i--) { // if the attribute is not in our whitelist, then remove it @@ -168,20 +168,20 @@ var attrName = attr.nodeName; var attrLocalName = attr.localName; var attrNsURI = attr.namespaceURI; - // Check that an attribute with the correct localName in the correct namespace is on + // Check that an attribute with the correct localName in the correct namespace is on // our whitelist or is a namespace declaration for one of our allowed namespaces if (!(allowedAttrsNS.hasOwnProperty(attrLocalName) && attrNsURI == allowedAttrsNS[attrLocalName] && attrNsURI != xmlnsns) && - !(attrNsURI == xmlnsns && nsMap_[attr.nodeValue]) ) + !(attrNsURI == xmlnsns && nsMap_[attr.nodeValue]) ) { // TODO(codedread): Programmatically add the se: attributes to the NS-aware whitelist. // Bypassing the whitelist to allow se: prefixes. Is there // a more appropriate way to do this? if(attrName.indexOf('se:') == 0) { se_attrs.push([attrName, attr.nodeValue]); - } + } node.removeAttributeNS(attrNsURI, attrLocalName); } - + // Add spaces before negative signs where necessary if(svgedit.browser.isGecko()) { switch ( attrName ) { @@ -192,7 +192,7 @@ node.setAttribute(attrName, val); } } - + // for the style attribute, rewrite it in terms of XML presentational attributes if (attrName == "style") { var props = attr.nodeValue.split(";"), @@ -207,15 +207,15 @@ node.removeAttribute('style'); } } - + $.each(se_attrs, function(i, attr) { node.setAttributeNS(se_ns, attr[0], attr[1]); }); - + // for some elements that have a xlink:href, ensure the URI refers to a local element // (but not for links) var href = svgedit.utilities.getHref(node); - if(href && + if(href && ["filter", "linearGradient", "pattern", "radialGradient", "textPath", "use"].indexOf(node.nodeName) >= 0) { @@ -226,13 +226,13 @@ node.removeAttributeNS(xlinkns, "href"); } } - + // Safari crashes on a <use> without a xlink:href, so we just remove the node here if (node.nodeName == "use" && !svgedit.utilities.getHref(node)) { parent.removeChild(node); return; } - // if the element has attributes pointing to a non-local reference, + // if the element has attributes pointing to a non-local reference, // need to remove the attribute $.each(["clip-path", "fill", "filter", "marker-end", "marker-mid", "marker-start", "mask", "stroke"],function(i,attr) { var val = node.getAttribute(attr); @@ -245,7 +245,7 @@ } } }); - + // recurse to children i = node.childNodes.length; while (i--) { svgedit.sanitize.sanitizeSvg(node.childNodes.item(i)); } diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/select.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/select.js index 8b6f2a7..83f5272 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/select.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/select.js @@ -27,7 +27,7 @@ // Class: svgedit.select.Selector // Private class for DOM element selection boxes -// +// // Parameters: // id - integer to internally indentify the selector // elem - DOM element associated with this selector @@ -61,7 +61,7 @@ } }) ); - + if (svgedit.browser.isTouch()) { this.selectorRect.setAttribute("stroke-opacity", 0.3); } @@ -82,10 +82,10 @@ }; -// Function: svgedit.select.Selector.reset +// Function: svgedit.select.Selector.reset // Used to reset the id and element that the selector is attached to // -// Parameters: +// Parameters: // e - DOM element associated with this selector svgedit.select.Selector.prototype.reset = function(e) { this.locked = true; @@ -164,7 +164,7 @@ var bbox = svgedit.utilities.getBBox(selected); if(tagName === 'g' && !$.data(selected, 'gsvg')) { // The bbox for a group does not include stroke vals, so we - // get the bbox based on its children. + // get the bbox based on its children. var stroked_bbox = svgFactory_.getStrokedBBox(selected.childNodes); if(stroked_bbox) { bbox = stroked_bbox; @@ -177,17 +177,17 @@ // we need to handle temporary transforms too // if skewed, get its transformed box, then find its axis-aligned bbox - + //* offset *= current_zoom; - + var nbox = svgedit.math.transformBox(l*current_zoom, t*current_zoom, w*current_zoom, h*current_zoom, m), aabox = nbox.aabox, nbax = aabox.x - offset, nbay = aabox.y - offset, nbaw = aabox.width + (offset * 2), nbah = aabox.height + (offset * 2); - + // now if the shape is rotated, un-rotate it var cx = nbax + nbaw/2, cy = nbay + nbah/2; @@ -227,7 +227,7 @@ + ' ' + (nbax+nbaw) + ',' + (nbay+nbah) + ' ' + nbax + ',' + (nbay+nbah) + 'z'; selectedBox.setAttribute('d', dstr); - + var xform = angle ? 'rotate(' + [angle,cx,cy].join(',') + ')' : ''; this.selectorGroup.setAttribute('transform', xform); @@ -255,17 +255,17 @@ selectedGrips[dir].setAttribute('x', coords[0]); selectedGrips[dir].setAttribute('y', coords[1]); }; - + this.rotateCoords = { 'nw': [nbax, nbay], 'ne': [nbax+nbaw+8, nbay], 'sw': [nbax, nbay+nbah+8], 'se': [nbax+nbaw+8, nbay+nbah+8] }; - + for(var dir in this.rotateCoords) { var coords = this.rotateCoords[dir]; - mgr.rotateGrips[dir].setAttribute('cx', coords[0]); + mgr.rotateGrips[dir].setAttribute('cx', coords[0]); mgr.rotateGrips[dir].setAttribute('cy', coords[1]); } @@ -369,12 +369,12 @@ } }); if (svgedit.browser.isTouch()) { - + grip.setAttribute("width", 30.5) grip.setAttribute("height", 30.5) grip.setAttribute("fill-opacity", 0.3) } - + $.data(grip, 'dir', dir); $.data(grip, 'type', 'resize'); this.selectorGrips[dir] = this.selectorGripsGroup.appendChild(grip); @@ -402,7 +402,7 @@ 'id': 'placeholder_defs' } }) - + var pattern = svgFactory_.createSVGElement({ 'element': 'pattern', 'attr': { @@ -415,7 +415,7 @@ 'viewBox': '0 0 10 10' } }) - + var pattern_bg = svgFactory_.createSVGElement({ 'element': 'rect', 'attr': { @@ -437,7 +437,7 @@ 'fill': "#eee" } }) - + var pattern_square2 = svgFactory_.createSVGElement({ 'element': 'rect', 'attr': { @@ -505,7 +505,7 @@ }; // Function: svgedit.select.SelectorManager.releaseSelector -// Removes the selector of the given element (hides selection box) +// Removes the selector of the given element (hides selection box) // // Parameters: // elem - DOM element to remove the selector for @@ -546,7 +546,7 @@ 'fill': 'none', 'stroke': '#666', 'stroke-width': 1, - 'stroke-dasharray': '3,2', + 'stroke-dasharray': '3,2', 'display': 'none', 'style': 'pointer-events:none' } @@ -602,4 +602,4 @@ return selectorManager_; }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgcanvas.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgcanvas.js index 093f8ae..f0a4d9c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgcanvas.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgcanvas.js @@ -39,10 +39,10 @@ // This fixes $(...).attr() to work as expected with SVG elements. // Does not currently use *AttributeNS() since we rarely need that. - + // See http://api.jquery.com/attr/ for basic documentation of .attr() - - // Additional functionality: + + // Additional functionality: // - When getting attributes, a string that's a number is return as type number. // - If an array is supplied as first parameter, multiple values are returned // as an object with values for each given attributes @@ -72,7 +72,7 @@ obj[aname] = attr; } return obj; - + } else if(typeof key === "object") { // Setting attributes form object for(var v in key) { @@ -93,7 +93,7 @@ } return this; }; - + }()); // Class: SvgCanvas @@ -117,7 +117,7 @@ var curConfig = { show_outside_canvas: true, selectNew: true, - dimensions: [640, 480] + dimensions: [200, 200] }; // Update config with new one if given @@ -183,8 +183,8 @@ // Function: setIdPrefix // Changes the ID prefix to the given value // -// Parameters: -// p - String with the new prefix +// Parameters: +// p - String with the new prefix canvas.setIdPrefix = function(p) { idprefix = p; }; @@ -238,7 +238,7 @@ // Function: addSvgElementFromJson // Create a new SVG element based on the given object keys/values and add it to the current layer -// The element will be ran through cleanupElement before being returned +// The element will be ran through cleanupElement before being returned // // Parameters: // data - Object with the following keys/values: @@ -342,7 +342,7 @@ var elems = cmd.elements(); canvas.pathActions.clear(); call("changed", elems); - + var cmdType = cmd.type(); var isApply = (eventType == EventTypes.AFTER_APPLY); if (cmdType == MoveElementCommand.type()) { @@ -360,7 +360,7 @@ } else { if (!isApply) restoreRefElems(cmd.elem); } - + if(cmd.elem.tagName === 'use') { setUseData(cmd.elem); } @@ -374,8 +374,8 @@ if (values["stdDeviation"]) { canvas.setBlurOffsets(cmd.elem.parentNode, values["stdDeviation"]); } - - // Remove & Re-add hack for Webkit (issue 775) + + // Remove & Re-add hack for Webkit (issue 775) //if(cmd.elem.tagName === 'use' && svgedit.browser.isWebkit()) { // var elem = cmd.elem; // if(!elem.getAttribute('x') && !elem.getAttribute('y')) { @@ -462,9 +462,9 @@ } } } - + var childs = elem.getElementsByTagName('*'); - + if(childs.length) { for(var i = 0, l = childs.length; i < l; i++) { restoreRefElems(childs[i]); @@ -484,55 +484,55 @@ // Object to contain image data for raster images that were found encodable var encodableImages = {}, - + // String with image URL of last loadable image last_good_img_url = curConfig.imgPath + 'logo.png', - + // Array with current disabled elements (for in-group editing) disabled_elems = [], - + // Object with save options save_options = {round_digits: 5}, - + // Boolean indicating whether or not a draw action has been started started = false, - + // String with an element's initial transform attribute value start_transform = null, - + // String indicating the current editor mode current_mode = "select", - + // String with the current direction in which an element is being resized current_resize_mode = "none", - + // Object with IDs for imported files, to see if one was already added import_ids = {}; // Current text style properties var cur_text = all_properties.text, - + // Current general properties cur_properties = cur_shape, - + // Array with selected elements' Bounding box object // selectedBBoxes = new Array(1), - + // The DOM element that was just selected justSelected = null, - + // DOM element for selection rectangle drawn by the user rubberBox = null, - + // Array of current BBoxes (still needed?) curBBoxes = [], - + // Object to contain all included extensions extensions = {}, - + // Canvas point for the most recent right click lastClickPoint = null, - + // Map of deleted reference elements removedElements = {} @@ -558,14 +558,14 @@ // Function: addExtension // Add an extension to the editor -// +// // Parameters: // name - String with the ID of the extension // ext_func - Function supplied by the extension with its data this.addExtension = function(name, ext_func) { if(!(name in extensions)) { // Provide private vars/funcs here. Is there a better way to do this? - + if($.isFunction(ext_func)) { var ext = ext_func($.extend(canvas.getPrivateMethods(), { svgroot: svgroot, @@ -582,7 +582,7 @@ console.log('Cannot add extension "' + name + '", an extension by that name already exists"'); } }; - + // This method rounds the incoming value to the nearest value based on the current_zoom var round = this.round = function(val) { return parseInt(val*current_zoom)/current_zoom; @@ -590,10 +590,10 @@ // This method sends back an array or a NodeList full of elements that // intersect the multi-select rubber-band-box on the current_layer only. -// -// Since the only browser that supports the SVG DOM getIntersectionList is Opera, +// +// Since the only browser that supports the SVG DOM getIntersectionList is Opera, // we need to provide an implementation here. We brute-force it for now. -// +// // Reference: // Firefox does not implement getIntersectionList(), see https://bugzilla.mozilla.org/show_bug.cgi?id=501421 // Webkit does not implement getIntersectionList(), see https://bugs.webkit.org/show_bug.cgi?id=11274 @@ -601,12 +601,12 @@ if (rubberBox == null) { return null; } var parent = current_group || getCurrentDrawing().getCurrentLayer(); - + if(!curBBoxes.length) { // Cache all bboxes curBBoxes = getVisibleElementsAndBBoxes(parent); } - + var resultList = null; try { resultList = parent.getIntersectionList(rect, null); @@ -614,16 +614,16 @@ if (resultList == null || typeof(resultList.item) != "function") { resultList = []; - + if(!rect) { var rubberBBox = rubberBox.getBBox(); var bb = {}; - + for(var o in rubberBBox) { bb[o] = rubberBBox[o] / current_zoom; } rubberBBox = bb; - + } else { var rubberBBox = rect; } @@ -635,8 +635,8 @@ } } } - // addToSelection expects an array, but it's ok to pass a NodeList - // because using square-bracket notation is allowed: + // addToSelection expects an array, but it's ok to pass a NodeList + // because using square-bracket notation is allowed: // http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html return resultList; }; @@ -644,34 +644,34 @@ // TODO(codedread): Migrate this into svgutils.js // Function: getStrokedBBox // Get the bounding box for one or more stroked and/or transformed elements -// +// // Parameters: // elems - Array with DOM elements to check -// +// // Returns: // A single bounding box object getStrokedBBox = this.getStrokedBBox = function(elems) { if(!elems) elems = getVisibleElements(); if(!elems.length) return false; - + // Make sure the expected BBox is returned if the element is a group var getCheckedBBox = function(elem) { - + try { // TODO: Fix issue with rotated groups. Currently they work // fine in FF, but not in other browsers (same problem mentioned // in Issue 339 comment #2). - + var bb = svgedit.utilities.getBBox(elem); - + var angle = svgedit.utilities.getRotationAngle(elem); if ((angle && angle % 90) || svgedit.math.hasMatrixTransform(svgedit.transformlist.getTransformList(elem))) { // Accurate way to get BBox of rotated element in Firefox: // Put element in group and get its BBox - + var good_bb = false; - + // Get the BBox from the raw path for these elements var elemNames = ['ellipse','path','line','polyline','polygon']; if(elemNames.indexOf(elem.tagName) >= 0) { @@ -684,10 +684,10 @@ bb = good_bb = canvas.convertToPath(elem, true); } } - + if(!good_bb) { // Must use clone else FF freaks out - var clone = elem.cloneNode(true); + var clone = elem.cloneNode(true); var g = document.createElementNS(svgns, "g"); var parent = elem.parentNode; parent.appendChild(g); @@ -695,17 +695,17 @@ bb = svgedit.utilities.bboxToObj(g.getBBox()); parent.removeChild(g); } - + // Old method: Works by giving the rotated BBox, // this is (unfortunately) what Opera and Safari do // natively when getting the BBox of the parent group // var angle = angle * Math.PI / 180.0; -// var rminx = Number.MAX_VALUE, rminy = Number.MAX_VALUE, +// var rminx = Number.MAX_VALUE, rminy = Number.MAX_VALUE, // rmaxx = Number.MIN_VALUE, rmaxy = Number.MIN_VALUE; // var cx = round(bb.x + bb.width/2), // cy = round(bb.y + bb.height/2); -// var pts = [ [bb.x - cx, bb.y - cy], +// var pts = [ [bb.x - cx, bb.y - cy], // [bb.x + bb.width - cx, bb.y - cy], // [bb.x + bb.width - cx, bb.y + bb.height - cy], // [bb.x - cx, bb.y + bb.height - cy] ]; @@ -717,23 +717,23 @@ // var theta = Math.atan2(y,x) + angle; // x = round(r * Math.cos(theta) + cx); // y = round(r * Math.sin(theta) + cy); -// +// // // now set the bbox for the shape after it's been rotated // if (x < rminx) rminx = x; // if (y < rminy) rminy = y; // if (x > rmaxx) rmaxx = x; // if (y > rmaxy) rmaxy = y; // } -// +// // bb.x = rminx; // bb.y = rminy; // bb.width = rmaxx - rminx; // bb.height = rmaxy - rminy; } return bb; - } catch(e) { + } catch(e) { console.log(elem, e); - } + } }; var full_bb; @@ -742,18 +742,18 @@ if(!this.parentNode) return; full_bb = getCheckedBBox(this); }); - + // This shouldn't ever happen... if(full_bb == null) return null; - + // full_bb doesn't include the stoke, so this does no good! // if(elems.length == 1) return full_bb; - + var max_x = full_bb.x + full_bb.width; var max_y = full_bb.y + full_bb.height; var min_x = full_bb.x; var min_y = full_bb.y; - + // FIXME: same re-creation problem with this function as getCheckedBBox() above var getOffset = function(elem) { var sw = elem.getAttribute("stroke-width"); @@ -773,10 +773,10 @@ bboxes.push(cur_bb); } }); - + full_bb.x = min_x; full_bb.y = min_y; - + $.each(elems, function(i, elem) { var cur_bb = bboxes[i]; // ensure that elem is really an element node @@ -786,7 +786,7 @@ max_y = Math.max(max_y, cur_bb.y + cur_bb.height + offset); } }); - + full_bb.width = max_x - min_x; full_bb.height = max_y - min_y; return full_bb; @@ -830,7 +830,7 @@ // * bbox - The element's BBox as retrieved from getStrokedBBox var getVisibleElementsAndBBoxes = this.getVisibleElementsAndBBoxes = function(parent) { if(!parent) parent = $(svgcontent).children(); // Prevent layers from being included - + var contentElems = []; $(parent).children().each(function(i, elem) { try { @@ -870,7 +870,7 @@ new_el.setAttributeNS(attr.namespaceURI, attr.nodeName, attr.nodeValue); } }); - + // Opera's "d" value needs to be reset for Opera/Win/non-EN // Also needed for webkit (else does not keep curved segments on clone) if(svgedit.browser.isWebkit() && el.nodeName == 'path') { @@ -891,7 +891,7 @@ break; } }); - + if($(el).data('gsvg')) { $(new_el).data('gsvg', new_el.firstChild); } else if($(el).data('symbol')) { @@ -915,7 +915,7 @@ getId = c.getId = function() { return getCurrentDrawing().getId(); }; getNextId = c.getNextId = function() { return getCurrentDrawing().getNextId(); }; - + // Function: call // Run the callback function associated with the given event // @@ -927,14 +927,14 @@ return events[event](this, arg); } }; - + // Function: bind // Attaches a callback function to an event // // Parameters: // event - String indicating the name of the event // f - The callback function to bind to the event - // + // // Return: // The previous event c.bind = function(event, f) { @@ -942,7 +942,7 @@ events[event] = f; return old; }; - + }(canvas)); // Function: canvas.prepareSvg @@ -972,13 +972,13 @@ } // Function: ffClone -// Hack for Firefox bugs where text element features aren't updated or get +// Hack for Firefox bugs where text element features aren't updated or get // messed up. See issue 136 and issue 137. -// This function clones the element and re-selects it -// TODO: Test for this bug on load and add it to "support" object instead of +// This function clones the element and re-selects it +// TODO: Test for this bug on load and add it to "support" object instead of // browser sniffing // -// Parameters: +// Parameters: // elem - The (text) DOM element to clone var ffClone = function(elem) { if(!svgedit.browser.isGecko()) return elem; @@ -1016,7 +1016,7 @@ var bbox = svgedit.utilities.getBBox(elem); var cx = bbox.x+bbox.width/2, cy = bbox.y+bbox.height/2; var tlist = getTransformList(elem); - + // only remove the real rotational transform if present (i.e. at index=0) if (tlist.numberOfItems > 0) { var xform = tlist.getItem(0); @@ -1038,7 +1038,7 @@ else if (tlist.numberOfItems == 0) { elem.removeAttribute("transform"); } - + if (!preventUndo) { // we need to undo it, then redo it so it can be undo-able! :) // TODO: figure out how to make changes to transform list undo-able cross-browser? @@ -1057,7 +1057,7 @@ }; // Function: recalculateAllSelectedDimensions -// Runs recalculateDimensions on the selected elements, +// Runs recalculateDimensions on the selected elements, // adding the changes to a single batch command var recalculateAllSelectedDimensions = this.recalculateAllSelectedDimensions = function() { var text = (current_resize_mode == "none" ? "position" : "size"); @@ -1080,9 +1080,9 @@ }; // this is how we map paths to our preferred relative segment types -var pathMap = [0, 'z', 'M', 'm', 'L', 'l', 'C', 'c', 'Q', 'q', 'A', 'a', +var pathMap = [0, 'z', 'M', 'm', 'L', 'l', 'C', 'c', 'Q', 'q', 'A', 'a', 'H', 'h', 'V', 'v', 'S', 's', 'T', 't']; - + // Debug tool to easily see the current matrix in the browser's console var logMatrix = function(m) { console.log([m.a,m.b,m.c,m.d,m.e,m.f]); @@ -1106,7 +1106,7 @@ assignAttributes(selected, changes, 1000, true); } box = svgedit.utilities.getBBox(selected); - + for(var i = 0; i < 2; i++) { var type = i === 0 ? 'fill' : 'stroke'; var attrVal = selected.getAttribute(type); @@ -1114,15 +1114,15 @@ if(m.a < 0 || m.d < 0) { var grad = getRefElem(attrVal); var newgrad = grad.cloneNode(true); - + if(m.a < 0) { //flip x var x1 = newgrad.getAttribute('x1'); var x2 = newgrad.getAttribute('x2'); newgrad.setAttribute('x1', -(x1 - 1)); newgrad.setAttribute('x2', -(x2 - 1)); - } - + } + if(m.d < 0) { //flip y var y1 = newgrad.getAttribute('y1'); @@ -1134,7 +1134,7 @@ findDefs().appendChild(newgrad); selected.setAttribute(type, 'url(#' + newgrad.id + ')'); } - + // Not really working :( // if(selected.tagName === 'path') { // reorientGrads(selected, m); @@ -1146,8 +1146,8 @@ var elName = selected.tagName; if(elName === "g" || elName === "text" || elName === "use") { // if it was a translate, then just update x,y - if (m.a == 1 && m.b == 0 && m.c == 0 && m.d == 1 && - (m.e != 0 || m.f != 0) ) + if (m.a == 1 && m.b == 0 && m.c == 0 && m.d == 1 && + (m.e != 0 || m.f != 0) ) { // [T][M] = [M][T'] // therefore [T'] = [M_inv][T][M] @@ -1165,7 +1165,7 @@ chlist.appendItem(mt); } } - + // now we have a set of changes and an applied reduced transform list // we apply the changes directly to the DOM switch (elName) @@ -1173,7 +1173,7 @@ case "foreignObject": case "rect": case "image": - + // Allow images to be inverted (give them matrix when flipped) if(elName === 'image' && (m.a < 0 || m.d < 0)) { // Convert to matrix @@ -1184,10 +1184,10 @@ chlist.appendItem(mt); } else { var pt1 = remap(changes.x,changes.y); - + changes.width = scalew(changes.width); changes.height = scaleh(changes.height); - + changes.x = pt1.x + Math.min(0,changes.width); changes.y = pt1.y + Math.min(0,changes.height); changes.width = Math.abs(changes.width); @@ -1201,7 +1201,7 @@ changes.cy = c.y; changes.rx = scalew(changes.rx); changes.ry = scaleh(changes.ry); - + changes.rx = Math.abs(changes.rx); changes.ry = Math.abs(changes.ry); finishUp(); @@ -1225,7 +1225,7 @@ changes.y1 = pt1.y; changes.x2 = pt2.x; changes.y2 = pt2.y; - + case "text": var tspan = selected.querySelectorAll('tspan'); var i = tspan.length @@ -1272,7 +1272,7 @@ selected.setAttribute("points", pstr); break; case "path": - + var segList = selected.pathSegList; var len = segList.numberOfItems; changes.d = new Array(len); @@ -1293,7 +1293,7 @@ sweepFlag: seg.sweepFlag }; } - + var len = changes.d.length, firstseg = changes.d[0], currentpt = remap(firstseg.x,firstseg.y); @@ -1330,7 +1330,7 @@ seg.r2 = scaleh(seg.r2); } } // for each segment - + var dstr = ""; var len = changes.d.length; for (var i = 0; i < len; ++i) { @@ -1359,7 +1359,7 @@ dstr += seg.x1 + "," + seg.y1 + " " + seg.x2 + "," + seg.y2 + " " + seg.x + "," + seg.y + " "; break; - case 9: // relative quad (q) + case 9: // relative quad (q) case 8: // absolute quad (Q) dstr += seg.x1 + "," + seg.y1 + " " + seg.x + "," + seg.y + " "; break; @@ -1389,14 +1389,14 @@ // ty - The translation's y value var updateClipPath = function(attr, tx, ty) { var path = getRefElem(attr).firstChild; - + var cp_xform = getTransformList(path); - + var newxlate = svgroot.createSVGTransform(); newxlate.setTranslate(tx, ty); cp_xform.appendItem(newxlate); - + // Update clipPath's dimensions recalculateDimensions(path); } @@ -1407,13 +1407,13 @@ // Parameters: // selected - The DOM element to recalculate // -// Returns: +// Returns: // Undo command object with the resulting change var recalculateDimensions = this.recalculateDimensions = function(selected) { if (selected == null) return null; - + var tlist = getTransformList(selected); - + // remove any unnecessary transforms if (tlist && tlist.numberOfItems > 0) { var k = tlist.numberOfItems; @@ -1438,13 +1438,13 @@ // End here if all it has is a rotation if(tlist.numberOfItems === 1 && getRotationAngle(selected)) return null; } - + // if this element had no transforms, we are done if (!tlist || tlist.numberOfItems == 0) { selected.removeAttribute("transform"); return null; } - + // TODO: Make this work for more than 2 if (tlist) { var k = tlist.numberOfItems; @@ -1463,23 +1463,23 @@ tlist.removeItem(mxs[1][1]); tlist.insertItemBefore(m_new, mxs[1][1]); } - + // combine matrix + translate k = tlist.numberOfItems; if(k >= 2 && tlist.getItem(k-2).type === 1 && tlist.getItem(k-1).type === 2) { var mt = svgroot.createSVGTransform(); - + var m = matrixMultiply( - tlist.getItem(k-2).matrix, + tlist.getItem(k-2).matrix, tlist.getItem(k-1).matrix - ); + ); mt.setMatrix(m); tlist.removeItem(k-2); tlist.removeItem(k-2); tlist.appendItem(mt); } } - + // If it still has a single [M] or [R][M], return null too (prevents BatchCommand from being returned). switch ( selected.tagName ) { // Ignore these elements, as they can absorb the [M] @@ -1496,13 +1496,13 @@ return null; } } - - // Grouped SVG element + + // Grouped SVG element var gsvg = $(selected).data('gsvg'); - - // we know we have some transforms, so set up return variable + + // we know we have some transforms, so set up return variable var batchCmd = new BatchCommand("Transform"); - + // store initial values that will be affected by reducing the transform list var changes = {}, initial = null, attrs = []; switch (selected.tagName) @@ -1544,7 +1544,7 @@ changes["d"] = selected.getAttribute("d"); break; } // switch on element type to get initial values - + if(attrs.length) { changes = $(selected).attr(attrs); $.each(changes, function(attr, val) { @@ -1557,8 +1557,8 @@ y: $(gsvg).attr('y') || 0 }; } - - // if we haven't created an initial array in polygon/polyline/path, then + + // if we haven't created an initial array in polygon/polyline/path, then // make a copy of initial values and include the transform if (initial == null) { initial = $.extend(true, {}, changes); @@ -1568,7 +1568,7 @@ } // save the start transform value too initial["transform"] = start_transform ? start_transform : ""; - + // if it's a regular group, we have special processing to flatten transforms if ((selected.tagName == "g" && !gsvg) || selected.tagName == "a") { var box = svgedit.utilities.getBBox(selected), @@ -1576,8 +1576,8 @@ newcenter = transformPoint(box.x+box.width/2, box.y+box.height/2, transformListToTransform(tlist).matrix), m = svgroot.createSVGMatrix(); - - + + // temporarily strip off the rotate and save the old center var gangle = getRotationAngle(selected); if (gangle) { @@ -1609,17 +1609,17 @@ } // first, if it was a scale then the second-last transform will be it - if (N >= 3 && tlist.getItem(N-2).type == 3 && - tlist.getItem(N-3).type == 2 && tlist.getItem(N-1).type == 2) + if (N >= 3 && tlist.getItem(N-2).type == 3 && + tlist.getItem(N-3).type == 2 && tlist.getItem(N-1).type == 2) { operation = 3; // scale - + // if the children are unrotated, pass the scale down directly // otherwise pass the equivalent matrix() down directly var tm = tlist.getItem(N-3).matrix, sm = tlist.getItem(N-2).matrix, tmn = tlist.getItem(N-1).matrix; - + var children = selected.childNodes; var c = children.length; while (c--) { @@ -1649,7 +1649,7 @@ // childTlist.appendItem(translateOrigin); // } // } - + var angle = getRotationAngle(child); var old_start_transform = start_transform; var childxforms = []; @@ -1664,10 +1664,10 @@ // if not rotated or skewed, push the [T][S][-T] down to the child else { // update the transform list with translate,scale,translate - + // slide the [T][S][-T] from the front to the back // [T][S][-T][M] = [M][T2][S2][-T2] - + // (only bringing [-T] to the right of [M]) // [T][S][-T][M] = [T][S][M][-T2] // [-T2] = [M_inv][-T][M] @@ -1676,7 +1676,7 @@ var t2 = svgroot.createSVGMatrix(); t2.e = -t2n.e; t2.f = -t2n.f; - + // [T][S][-T][M] = [M][T2][S2][-T2] // [S2] = [T2_inv][M_inv][T][S][-T][M][-T2_inv] var s2 = matrixMultiply(t2.inverse(), m.inverse(), tm, sm, tmn, m, t2n.inverse()); @@ -1697,8 +1697,8 @@ // logMatrix(scale.matrix); } // not rotated batchCmd.addSubCommand( recalculateDimensions(child) ); - // TODO: If any <use> have this group as a parent and are - // referencing this child, then we need to impose a reverse + // TODO: If any <use> have this group as a parent and are + // referencing this child, then we need to impose a reverse // scale on it so that when it won't get double-translated // var uses = selected.getElementsByTagNameNS(svgns, "use"); // var href = "#"+child.id; @@ -1728,19 +1728,19 @@ e2t.setMatrix(m); tlist.clear(); tlist.appendItem(e2t); - } - // next, check if the first transform was a translate + } + // next, check if the first transform was a translate // if we had [ T1 ] [ M ] we want to transform this into [ M ] [ T2 ] // therefore [ T2 ] = [ M_inv ] [ T1 ] [ M ] - else if ( (N == 1 || (N > 1 && tlist.getItem(1).type != 3)) && - tlist.getItem(0).type == 2) + else if ( (N == 1 || (N > 1 && tlist.getItem(1).type != 3)) && + tlist.getItem(0).type == 2) { operation = 2; // translate var T_M = transformListToTransform(tlist).matrix; tlist.removeItem(0); var M_inv = transformListToTransform(tlist).matrix.inverse(); var M2 = matrixMultiply( M_inv, T_M ); - + tx = M2.e; ty = M2.f; @@ -1748,13 +1748,13 @@ // we pass the translates down to the individual children var children = selected.childNodes; var c = children.length; - + var clipPaths_done = []; - + while (c--) { var child = children.item(c); if (child.nodeType == 1) { - + // Check if child has clip-path if(child.getAttribute('clip-path')) { // tx, ty @@ -1762,12 +1762,12 @@ if(clipPaths_done.indexOf(attr) === -1) { updateClipPath(attr, tx, ty); clipPaths_done.push(attr); - } + } } var old_start_transform = start_transform; start_transform = child.getAttribute("transform"); - + var childTlist = getTransformList(child); // some children might not have a transform (<metadata>, <defs>, etc) if (childTlist) { @@ -1779,7 +1779,7 @@ childTlist.appendItem(newxlate); } batchCmd.addSubCommand( recalculateDimensions(child) ); - // If any <use> have this group as a parent and are + // If any <use> have this group as a parent and are // referencing this child, then impose a reverse translate on it // so that when it won't get double-translated var uses = selected.getElementsByTagNameNS(svgns, "use"); @@ -1798,9 +1798,9 @@ } } } - + clipPaths_done = []; - + start_transform = old_start_transform; } } @@ -1817,18 +1817,18 @@ var old_start_transform = start_transform; start_transform = child.getAttribute("transform"); var childTlist = getTransformList(child); - + if (!childTlist) continue; - + var em = matrixMultiply(m, transformListToTransform(childTlist).matrix); var e2m = svgroot.createSVGTransform(); e2m.setMatrix(em); childTlist.clear(); childTlist.appendItem(e2m,0); - + batchCmd.addSubCommand( recalculateDimensions(child) ); start_transform = old_start_transform; - + // Convert stroke // TODO: Find out if this should actually happen somewhere else var sw = child.getAttribute("stroke-width"); @@ -1855,9 +1855,9 @@ if (tlist.numberOfItems == 0) { selected.removeAttribute("transform"); } - return null; + return null; } - + // if it was a translate, put back the rotate at the new center if (operation == 2) { if (gangle) { @@ -1865,7 +1865,7 @@ x: oldcenter.x + first_m.e, y: oldcenter.y + first_m.f }; - + var newRot = svgroot.createSVGTransform(); newRot.setRotate(gangle,newcenter.x,newcenter.y); if(tlist.numberOfItems) { @@ -1914,7 +1914,7 @@ } } } - + if (gangle) { if(tlist.numberOfItems) { tlist.insertItemBefore(rnew, 0); @@ -1934,9 +1934,9 @@ // but we still may need to recalculate them (see issue 595). // TODO: Figure out how to get BBox from these elements in case they // have a rotation transform - + if(!box && selected.tagName != 'path') return null; - + var m = svgroot.createSVGMatrix(), // temporarily strip off the rotate and save the old center @@ -1945,7 +1945,7 @@ var oldcenter = {x: box.x+box.width/2, y: box.y+box.height/2}, newcenter = transformPoint(box.x+box.width/2, box.y+box.height/2, transformListToTransform(tlist).matrix); - + var a = angle * Math.PI / 180; if ( Math.abs(a) > (1.0e-10) ) { var s = Math.sin(a)/(1 - Math.cos(a)); @@ -1965,11 +1965,11 @@ } } } - + // 2 = translate, 3 = scale, 4 = rotate, 1 = matrix imposition var operation = 0; var N = tlist.numberOfItems; - + // Check if it has a gradient with userSpaceOnUse, in which case // adjust it by recalculating the matrix transform. // TODO: Make this work in Webkit using svgedit.transformlist.SVGTransformList @@ -1992,14 +1992,14 @@ } } - // first, if it was a scale of a non-skewed element, then the second-last + // first, if it was a scale of a non-skewed element, then the second-last // transform will be the [S] // if we had [M][T][S][T] we want to extract the matrix equivalent of // [T][S][T] and push it down to the element - if (N >= 3 && tlist.getItem(N-2).type == 3 && - tlist.getItem(N-3).type == 2 && tlist.getItem(N-1).type == 2) - - // Removed this so a <use> with a given [T][S][T] would convert to a matrix. + if (N >= 3 && tlist.getItem(N-2).type == 3 && + tlist.getItem(N-3).type == 2 && tlist.getItem(N-1).type == 2) + + // Removed this so a <use> with a given [T][S][T] would convert to a matrix. // Is that bad? // && selected.nodeName != "use" { @@ -2019,12 +2019,12 @@ tlist.appendItem(e2t); // reset the matrix so that the element is not re-mapped m = svgroot.createSVGMatrix(); - } // if we had [R][T][S][-T][M], then this was a rotated matrix-element + } // if we had [R][T][S][-T][M], then this was a rotated matrix-element // if we had [T1][M] we want to transform this into [M][T2] - // therefore [ T2 ] = [ M_inv ] [ T1 ] [ M ] and we can push [T2] + // therefore [ T2 ] = [ M_inv ] [ T1 ] [ M ] and we can push [T2] // down to the element - else if ( (N == 1 || (N > 1 && tlist.getItem(1).type != 3)) && - tlist.getItem(0).type == 2) + else if ( (N == 1 || (N > 1 && tlist.getItem(1).type != 3)) && + tlist.getItem(0).type == 2) { operation = 2; // translate var oldxlate = tlist.getItem(0).matrix, @@ -2069,7 +2069,7 @@ if (angle) { var newRot = svgroot.createSVGTransform(); newRot.setRotate(angle,newcenter.x,newcenter.y); - + if(tlist.numberOfItems) { tlist.insertItemBefore(newRot, 0); } else { @@ -2081,12 +2081,12 @@ } return null; } - + // if it was a translate or resize, we need to remap the element and absorb the xform if (operation == 1 || operation == 2 || operation == 3) { remapElement(selected,changes,m); } // if we are remapping - + // if it was a translate, put back the rotate at the new center if (operation == 2) { if (angle) { @@ -2119,7 +2119,7 @@ var rnew_inv = rnew.matrix.inverse(); var m_inv = m.inverse(); var extrat = matrixMultiply(m_inv, rnew_inv, rold, m); - + remapElement(selected,changes,extrat); if (angle) { if(tlist.numberOfItems) { @@ -2135,9 +2135,9 @@ if (tlist.numberOfItems == 0) { selected.removeAttribute("transform"); } - + batchCmd.addSubCommand(new ChangeElementCommand(selected, initial)); - + return batchCmd; }; @@ -2148,7 +2148,7 @@ // Function: clearSelection // Clears the selection. The 'selected' handler is then called. -// Parameters: +// Parameters: // noCall - Optional boolean that when true does not call the "selected" handler var clearSelection = this.clearSelection = function(noCall) { if (selectedElements[0] != null) { @@ -2177,9 +2177,9 @@ if (elemsToAdd.length == 0) { return; } // find the first null in our selectedElements array var j = 0; - + while (j < selectedElements.length) { - if (selectedElements[j] == null) { + if (selectedElements[j] == null) { break; } ++j; @@ -2192,7 +2192,7 @@ if (!elem || !svgedit.utilities.getBBox(elem)) continue; if(elem.tagName === 'a' && elem.childNodes.length === 1) { - // Make "a" element's child be the selected element + // Make "a" element's child be the selected element elem = elem.firstChild; } @@ -2205,7 +2205,7 @@ // if (j == 0) selectedBBoxes[0] = svgedit.utilities.getBBox(elem); j++; var sel = selectorManager.requestSelector(elem); - + if (selectedElements.length > 1) { sel.showGrips(false); } @@ -2220,12 +2220,12 @@ selectedElements.sort(function(a,b) { if(a && b && a.compareDocumentPosition) { - return 3 - (b.compareDocumentPosition(a) & 6); + return 3 - (b.compareDocumentPosition(a) & 6); } else if(a == null) { return 1; } }); - + // Make sure first elements are not null while(selectedElements[0] == null) selectedElements.shift(0); }; @@ -2285,10 +2285,10 @@ // Function: getMouseTarget // Gets the desired element from a mouse event -// +// // Parameters: // evt - Event object from the mouse event -// +// // Returns: // DOM element we want var getMouseTarget = this.getMouseTarget = function(evt) { @@ -2296,33 +2296,33 @@ return null; } var mouse_target = evt.target; - + // if it was a <use>, Opera and WebKit return the SVGElementInstance if (mouse_target.correspondingUseElement) mouse_target = mouse_target.correspondingUseElement; - + // for foreign content, go up until we find the foreignObject - // WebKit browsers set the mouse target to the svgcanvas div - if ([mathns, htmlns].indexOf(mouse_target.namespaceURI) >= 0 && - mouse_target.id != "svgcanvas") + // WebKit browsers set the mouse target to the svgcanvas div + if ([mathns, htmlns].indexOf(mouse_target.namespaceURI) >= 0 && + mouse_target.id != "svgcanvas") { while (mouse_target.nodeName != "foreignObject") { mouse_target = mouse_target.parentNode; if(!mouse_target) return svgroot; } } - + // Get the desired mouse_target with jQuery selector-fu // If it's root-like, select the root var current_layer = getCurrentDrawing().getCurrentLayer(); if([svgroot, container, svgcontent, current_layer].indexOf(mouse_target) >= 0) { return svgroot; } - + var $target = $(mouse_target); // If it's a selection grip, return the grip parent if($target.closest('#selectorParentGroup').length) { - // While we could instead have just returned mouse_target, + // While we could instead have just returned mouse_target, // this makes it easier to indentify as being a selector grip return selectorManager.selectorParentGroup; } @@ -2330,8 +2330,8 @@ while (mouse_target.parentNode && mouse_target.parentNode !== (current_group || current_layer)) { mouse_target = mouse_target.parentNode; } - -// + +// // // go up until we hit a child of a layer // while (mouse_target.parentNode.parentNode.tagName == 'g') { // mouse_target = mouse_target.parentNode; @@ -2341,7 +2341,7 @@ // if (mouse_target.nodeName.toLowerCase() == "div") { // mouse_target = svgroot; // } - + return mouse_target; }; @@ -2359,7 +2359,7 @@ maxx: null, maxy: null }; - + // - when we are in a create mode, the element is added to the canvas // but the action is not recorded until mousing up // - when we are in select mode, select the element, remember the position @@ -2374,7 +2374,7 @@ var pt = transformPoint( evt.pageX, evt.pageY, root_sctm ), mouse_x = pt.x * current_zoom, mouse_y = pt.y * current_zoom; - + evt.preventDefault(); @@ -2382,15 +2382,15 @@ current_mode = "select"; lastClickPoint = pt; } - + var x = mouse_x / current_zoom, y = mouse_y / current_zoom, mouse_target = getMouseTarget(evt); - + if(mouse_target.tagName === 'a' && mouse_target.childNodes.length === 1) { mouse_target = mouse_target.firstChild; } - + // real_x/y ignores grid-snap value var real_x = r_start_x = start_x = x; var real_y = r_start_y = start_y = y; @@ -2402,9 +2402,9 @@ start_y = snapToGrid(start_y); } - // if it is a selector grip, then it must be a single element selected, + // if it is a selector grip, then it must be a single element selected, // set the mouse_target to that and update the mode to rotate/resize - + if (mouse_target == selectorManager.selectorParentGroup && selectedElements[0] != null) { var grip = evt.target; var griptype = elData(grip, "type"); @@ -2420,7 +2420,7 @@ } mouse_target = selectedElements[0]; } - + start_transform = mouse_target.getAttribute("transform"); var tlist = getTransformList(mouse_target); switch (current_mode) { @@ -2428,11 +2428,11 @@ started = true; current_resize_mode = "none"; if(right_click) started = false; - + if (mouse_target != svgroot) { // if this element is not yet selected, clear selection and select it if (selectedElements.indexOf(mouse_target) == -1) { - // only clear selection if shift is not pressed (otherwise, add + // only clear selection if shift is not pressed (otherwise, add // element to selection) if (!evt.shiftKey) { // No need to do the call here as it will be done on addToSelection @@ -2443,7 +2443,7 @@ pathActions.clear(); } // else if it's a path, go into pathedit mode in mouseup - + if(!right_click) { // insert a dummy transform so if the element(s) are moved it will have // a transform to use for its translate @@ -2466,11 +2466,11 @@ } r_start_x *= current_zoom; r_start_y *= current_zoom; -// console.log('p',[evt.pageX, evt.pageY]); -// console.log('c',[evt.clientX, evt.clientY]); -// console.log('o',[evt.offsetX, evt.offsetY]); +// console.log('p',[evt.pageX, evt.pageY]); +// console.log('c',[evt.clientX, evt.clientY]); +// console.log('o',[evt.offsetX, evt.offsetY]); // console.log('s',[start_x, start_y]); - + assignAttributes(rubberBox, { 'x': r_start_x, 'y': r_start_y, @@ -2480,7 +2480,7 @@ }, 100); } break; - case "zoom": + case "zoom": started = true; if (rubberBox == null) { rubberBox = selectorManager.getRubberBandBox(); @@ -2497,7 +2497,7 @@ started = true; start_x = x; start_y = y; - + // Getting the BBox from the selection box, since we know we // want to orient around it init_bbox = svgedit.utilities.getBBox($('#selectedBox0')[0]); @@ -2509,7 +2509,7 @@ // append three dummy transforms to the tlist so that // we can translate,scale,translate in mousemove var pos = getRotationAngle(mouse_target)?1:0; - + if(hasMatrixTransform(tlist)) { tlist.insertItemBefore(svgroot.createSVGTransform(), pos); tlist.insertItemBefore(svgroot.createSVGTransform(), pos); @@ -2518,7 +2518,7 @@ tlist.appendItem(svgroot.createSVGTransform()); tlist.appendItem(svgroot.createSVGTransform()); tlist.appendItem(svgroot.createSVGTransform()); - + if(svgedit.browser.supportsNonScalingStroke()) { //Handle crash for newer Webkit: https://code.google.com/p/svg-edit/issues/detail?id=904 //Chromium issue: https://code.google.com/p/chromium/issues/detail?id=114625 @@ -2701,27 +2701,27 @@ // This could occur in an extension break; } - + var ext_result = runExtensions("mouseDown", { event: evt, start_x: start_x, start_y: start_y, selectedElements: selectedElements }, true); - + $.each(ext_result, function(i, r) { if(r && r.started) { started = true; } }); if (current_mode) { - document.getElementById("workarea").className = + document.getElementById("workarea").className = (current_mode == "resize") ? evt.target.style.cursor : current_mode } }; - + // in this function we do not record any state changes yet (but we do update // any elements that are still being created, moved or resized on the canvas) var mouseMove = function(evt) { @@ -2743,23 +2743,23 @@ } evt.preventDefault(); - + switch (current_mode) { case "select": // we temporarily use a translate on the element(s) being dragged - // this transform is removed upon mousing up and the element is + // this transform is removed upon mousing up and the element is // relocated to the new location if (selectedElements[0] !== null) { var dx = x - start_x; var dy = y - start_y; - + if(curConfig.gridSnapping){ dx = snapToGrid(dx); dy = snapToGrid(dy); } - - if(evt.shiftKey) { + + if(evt.shiftKey) { var xya = snapToAngle(start_x,start_y,x,y); x=xya.x; y=xya.y; } if (dx != 0 || dy != 0) { @@ -2790,13 +2790,13 @@ } else { tlist.appendItem(xform); } - + // update our internal bbox that we're tracking while dragging selectorManager.requestSelector(selected).resize(); } //duplicate only once - // alt drag = create a clone and save the reference + // alt drag = create a clone and save the reference if(evt.altKey) { //clone doesn't exist yet if (!canvas.addClones) { @@ -2812,14 +2812,14 @@ window.addEventListener("keyup", canvas.removeClones) } } - + call("transition", selectedElements); } - - - + + + } break; case "multiselect": @@ -2839,7 +2839,7 @@ var elemsToRemove = [], elemsToAdd = [], newList = getIntersectionList(), len = selectedElements.length; - + for (var i = 0; i < len; ++i) { var ind = newList.indexOf(selectedElements[i]); if (ind == -1) { @@ -2849,16 +2849,16 @@ newList[ind] = null; } } - + len = newList.length; for (i = 0; i < len; ++i) { if (newList[i]) elemsToAdd.push(newList[i]); } - - if (elemsToRemove.length > 0) + + if (elemsToRemove.length > 0) canvas.removeFromSelection(elemsToRemove); - - if (elemsToAdd.length > 0) + + if (elemsToAdd.length > 0) addToSelection(elemsToAdd); - + break; case "resize": // we track the resize bounding box and translate/scale the selected element @@ -2866,10 +2866,10 @@ // the shape's coordinates var tlist = getTransformList(selected), hasMatrix = hasMatrixTransform(tlist), - box = hasMatrix ? init_bbox : svgedit.utilities.getBBox(selected), + box = hasMatrix ? init_bbox : svgedit.utilities.getBBox(selected), left=box.x, top=box.y, width=box.width, height=box.height, dx=(x-start_x), dy=(y-start_y); - + if(curConfig.gridSnapping){ dx = snapToGrid(dx); dy = snapToGrid(dy); @@ -2893,24 +2893,24 @@ } if(current_resize_mode.indexOf("e")==-1 && current_resize_mode.indexOf("w")==-1) { dx = 0; - } - + } + var ts = null, tx = 0, ty = 0, - sy = height ? (height+dy)/height : 1, + sy = height ? (height+dy)/height : 1, sx = width ? (width+dx)/width : 1; // if we are dragging on the north side, then adjust the scale factor and ty if(current_resize_mode.indexOf("n") >= 0) { sy = height ? (height-dy)/height : 1; ty = height; } - + // if we dragging on the east side, then adjust the scale factor and tx if(current_resize_mode.indexOf("w") >= 0) { sx = width ? (width-dx)/width : 1; tx = width; } - + // update the transform list with translate,scale,translate var translateOrigin = svgroot.createSVGTransform(), scale = svgroot.createSVGTransform(), @@ -2929,7 +2929,7 @@ else sy = sx; } scale.setScale(sx,sy); - + translateBack.setTranslate(left+tx,top+ty); if(hasMatrix) { var diff = angle?1:0; @@ -2944,9 +2944,9 @@ } selectorManager.requestSelector(selected).resize(); - + call("transition", selectedElements); - + break; case "zoom": real_x *= current_zoom; @@ -2956,7 +2956,7 @@ 'y': Math.min(r_start_y*current_zoom, real_y), 'width': Math.abs(real_x - r_start_x*current_zoom), 'height': Math.abs(real_y - r_start_y*current_zoom) - },100); + },100); break; case "text": assignAttributes(shape,{ @@ -2971,10 +2971,10 @@ } var x2 = x; - var y2 = y; + var y2 = y; if(evt.shiftKey) { var xya = snapToAngle(start_x,start_y,x2,y2); x2=xya.x; y2=xya.y; } - + shape.setAttributeNS(null, "x2", x2); shape.setAttributeNS(null, "y2", y2); break; @@ -2998,11 +2998,11 @@ } if (evt.altKey){ w *=2; - h *=2; + h *=2; new_x = start_x - w/2; new_y = start_y - h/2; } - + if(curConfig.gridSnapping){ w = snapToGrid(w); h = snapToGrid(h); @@ -3016,7 +3016,7 @@ 'x': new_x, 'y': new_y },1000); - + break; case "circle": var c = $(shape).attr(["cx", "cy"]); @@ -3042,7 +3042,7 @@ if (evt.shiftKey) { ry = rx cy = (y > start_y) ? start_y + rx : start_y - rx - + } if (evt.altKey) { cx = start_x @@ -3072,7 +3072,7 @@ case "pathedit": x *= current_zoom; y *= current_zoom; - + if(curConfig.gridSnapping){ x = snapToGrid(x); y = snapToGrid(y); @@ -3091,7 +3091,7 @@ var xya = snapToAngle(x1,y1,x,y); x=xya.x; y=xya.y; } - + if(rubberBox && rubberBox.getAttribute('display') !== 'none') { real_x *= current_zoom; real_y *= current_zoom; @@ -3100,10 +3100,10 @@ 'y': Math.min(r_start_y*current_zoom, real_y), 'width': Math.abs(real_x - r_start_x*current_zoom), 'height': Math.abs(real_y - r_start_y*current_zoom) - },100); + },100); } pathActions.mouseMove(evt, x, y); - + break; case "textedit": x *= current_zoom; @@ -3116,13 +3116,13 @@ // 'height': Math.abs(y-start_y) // },100); // } - + textActions.mouseMove(mouse_x, mouse_y); - + break; case "rotate": var box = svgedit.utilities.getBBox(selected), - cx = box.x + box.width/2, + cx = box.x + box.width/2, cy = box.y + box.height/2, m = getMatrix(selected), center = transformPoint(cx,cy,m); @@ -3150,7 +3150,7 @@ default: break; } - + runExtensions("mouseMove", { event: evt, mouse_x: mouse_x, @@ -3159,16 +3159,16 @@ }); }; // mouseMove() - - + + /* mouseover mode var mouseOver = function(evt) { - + if(canvas.spaceKey || evt.button === 1 || current_mode != "select") return; evt.stopPropagation(); mouse_target = getMouseTarget(evt); if (svghover.lastChild) svghover.removeChild(svghover.lastChild); - + if (mouse_target.id == "svgroot") return switch (mouse_target.nodeName) { case "polyline": @@ -3176,7 +3176,7 @@ case "path": case "ellipse": case "rect": - var clone = mouse_target.cloneNode(true); + var clone = mouse_target.cloneNode(true); clone.setAttribute("stroke", "#c00") clone.setAttribute("stroke-width", "1") clone.setAttribute("stroke-opacity", "1") @@ -3184,13 +3184,13 @@ clone.setAttribute("fill", "none") hover_group.appendChild(clone); break; - + default: break; } } */ - + // - in create mode, the element's opacity is set properly, we create an InsertElementCommand // and store it on the Undo stack // - in move/resize mode, the element's attributes which were affected by the move/resize are @@ -3256,7 +3256,7 @@ cur_text.font_family = selected.getAttribute("font-family"); } selectorManager.requestSelector(selected).showGrips(true); - + // This shouldn't be necessary as it was done on mouseDown... // call("selected", [selected]); } @@ -3264,8 +3264,8 @@ recalculateAllSelectedDimensions(); // if it was being dragged/resized - r_start_x = r_start_x; - r_start_y = r_start_y; + r_start_x = r_start_x; + r_start_y = r_start_y; var difference_x = Math.abs(real_x-r_start_x); var difference_y = Math.abs(real_y-r_start_y); @@ -3292,7 +3292,7 @@ } } } // no change in mouse position - + // Remove non-scaling stroke if(svgedit.browser.supportsNonScalingStroke()) { var elem = selectedElements[0]; @@ -3401,7 +3401,7 @@ element = null; // continue to be set to true so that mouseMove happens started = true; - + var res = pathActions.mouseUp(evt, element, mouse_x, mouse_y); element = res.element; keep = res.keep; @@ -3421,7 +3421,7 @@ element = null; current_mode = "select"; var batchCmd = canvas.undoMgr.finishUndoableChange(); - if (!batchCmd.isEmpty()) { + if (!batchCmd.isEmpty()) { addCommandToHistory(batchCmd); } // perform recalculation to weed out any stray identity transforms that might get stuck @@ -3432,13 +3432,13 @@ // This could occur in an extension break; } - + var ext_result = runExtensions("mouseUp", { event: evt, mouse_x: mouse_x, mouse_y: mouse_y }, true); - + $.each(ext_result, function(i, r) { if(r) { keep = r.keep || keep; @@ -3446,37 +3446,37 @@ started = r.started || started; } }); - + if (!keep && element != null) { getCurrentDrawing().releaseId(getId()); element.parentNode.removeChild(element); element = null; - + var t = evt.target; - - // if this element is in a group, go up until we reach the top-level group + + // if this element is in a group, go up until we reach the top-level group // just below the layer groups // TODO: once we implement links, we also would have to check for <a> elements while (t.parentNode.parentNode.tagName == "g") { t = t.parentNode; } - // if we are not in the middle of creating a path, and we've clicked on some shape, + // if we are not in the middle of creating a path, and we've clicked on some shape, // then go to Select mode. // WebKit returns <div> when the canvas is clicked, Firefox/Opera return <svg> if ( (current_mode != "path" || !drawn_path) && t.parentNode.id != "selectorParentGroup" && - t.id != "svgcanvas" && t.id != "svgroot") + t.id != "svgcanvas" && t.id != "svgroot") { // switch into "select" mode if we've clicked on an element canvas.setMode("select"); selectOnly([t], true); } - + } else if (element != null) { canvas.addedNew = true; - + if(useUnit) svgedit.units.convertAttrs(element); - + var ani_dur = .2, c_ani; if(opac_ani.beginElement && element.getAttribute('opacity') != cur_shape.opacity) { c_ani = $(opac_ani).clone().attr({ @@ -3490,7 +3490,7 @@ } else { ani_dur = 0; } - + // Ideally this would be done on the endEvent of the animation, // but that doesn't seem to be supported in Webkit setTimeout(function() { @@ -3508,14 +3508,14 @@ // we create the insert command that is stored on the stack // undo means to call cmd.unapply(), redo means to call cmd.apply() addCommandToHistory(new InsertElementCommand(element)); - + call("changed",[element]); }, ani_dur * 1000); } - + start_transform = null; }; - + var dblClick = function(evt) { var evt_target = evt.target; var parent = evt_target.parentNode; @@ -3523,16 +3523,16 @@ var tagName = mouse_target.tagName; if(parent === current_group) return; - + if(tagName === 'text' && current_mode !== 'textedit') { var pt = transformPoint( evt.pageX, evt.pageY, root_sctm ); textActions.select(mouse_target, pt.x, pt.y); } - + if((tagName === "g" || tagName === "a") && getRotationAngle(mouse_target)) { - // TODO: Allow method of in-group editing without having to do + // TODO: Allow method of in-group editing without having to do // this (similar to editing rotated paths) - + // Ungroup and regroup pushGroupProperties(mouse_target); mouse_target = selectedElements[0]; @@ -3542,7 +3542,7 @@ if(current_group) { leaveContext(); } - + if((parent.tagName !== 'g' && parent.tagName !== 'a') || parent === getCurrentDrawing().getCurrentLayer() || mouse_target === selectorManager.selectorParentGroup) @@ -3558,12 +3558,12 @@ e.preventDefault(); return false; }; - + // Added mouseup to the container here. // TODO(codedread): Figure out why after the Closure compiler, the window mouseup is ignored. $(container).mousedown(mouseDown).mousemove(mouseMove).click(handleLinkInCanvas).dblclick(dblClick).mouseup(mouseUp); // $(window).mouseup(mouseUp); - + $(container).bind("mousewheel DOMMouseScroll", function(e){ if(!e.shiftKey) return; e.preventDefault(); @@ -3589,14 +3589,14 @@ if (e.detail > 0) { bbox.factor = .5; } else if (e.detail < 0) { - bbox.factor = 2; - } + bbox.factor = 2; + } } - + if(!bbox.factor) return; call("zoomed", bbox); }); - + }()); // Function: preventClickDefault @@ -3621,11 +3621,11 @@ var matrix; var last_x, last_y; var allow_dbl; - + function setCursor(index) { var empty = (textinput.value === ""); $(textinput).focus(); - + if(!arguments.length) { if(empty) { index = 0; @@ -3634,7 +3634,7 @@ index = textinput.selectionEnd; } } - + var charbb; charbb = chardata[index]; if(!empty) { @@ -3650,7 +3650,7 @@ }); cursor = getElem("selectorParentGroup").appendChild(cursor); } - + if(!blinker) { blinker = setInterval(function() { var show = (cursor.getAttribute('display') === 'none'); @@ -3658,11 +3658,11 @@ }, 600); } - - + + var start_pt = ptToScreen(charbb.x, textbb.y); var end_pt = ptToScreen(charbb.x, (textbb.y + textbb.height)); - + assignAttributes(cursor, { x1: start_pt.x, y1: start_pt.y, @@ -3671,20 +3671,20 @@ visibility: 'visible', display: 'inline' }); - + if(selblock) selblock.setAttribute('d', 'M 0 0'); } - + function setSelection(start, end, skipInput) { if(start === end) { setCursor(end); return; } - + if(!skipInput) { textinput.setSelectionRange(start, end); } - + selblock = getElem("text_selectblock"); if (!selblock) { @@ -3698,30 +3698,30 @@ getElem("selectorParentGroup").appendChild(selblock); } - + var startbb = chardata[start]; - + var endbb = chardata[end]; - + cursor.setAttribute('visibility', 'hidden'); - + var tl = ptToScreen(startbb.x, textbb.y), tr = ptToScreen(startbb.x + (endbb.x - startbb.x), textbb.y), bl = ptToScreen(startbb.x, textbb.y + textbb.height), br = ptToScreen(startbb.x + (endbb.x - startbb.x), textbb.y + textbb.height); - - + + var dstr = "M" + tl.x + "," + tl.y + " L" + tr.x + "," + tr.y + " " + br.x + "," + br.y + " " + bl.x + "," + bl.y + "z"; - + assignAttributes(selblock, { d: dstr, 'display': 'inline' }); } - + function getIndexFromPoint(mouse_x, mouse_y) { // Position cursor here var pt = svgroot.createSVGPoint(); @@ -3748,62 +3748,62 @@ } return charpos; } - + function setCursorFromPoint(mouse_x, mouse_y) { setCursor(getIndexFromPoint(mouse_x, mouse_y)); } - + function setEndSelectionFromPoint(x, y, apply) { var i1 = textinput.selectionStart; var i2 = getIndexFromPoint(x, y); - + var start = Math.min(i1, i2); var end = Math.max(i1, i2); setSelection(start, end, !apply); } - + function screenToPt(x_in, y_in) { var out = { x: x_in, y: y_in } - + out.x /= current_zoom; - out.y /= current_zoom; + out.y /= current_zoom; if(matrix) { var pt = transformPoint(out.x, out.y, matrix.inverse()); out.x = pt.x; out.y = pt.y; } - + return out; - } - + } + function ptToScreen(x_in, y_in) { var out = { x: x_in, y: y_in } - + if(matrix) { var pt = transformPoint(out.x, out.y, matrix); out.x = pt.x; out.y = pt.y; } - + out.x *= current_zoom; out.y *= current_zoom; - + return out; } - + function hideCursor() { if(cursor) { cursor.setAttribute('visibility', 'hidden'); } } - + function selectAll(evt) { setSelection(0, curtext.textContent.length); $(this).unbind(evt); @@ -3811,25 +3811,25 @@ function selectWord(evt) { if(!allow_dbl || !curtext) return; - + var ept = transformPoint( evt.pageX, evt.pageY, root_sctm ), mouse_x = ept.x * current_zoom, mouse_y = ept.y * current_zoom; var pt = screenToPt(mouse_x, mouse_y); - + var index = getIndexFromPoint(pt.x, pt.y); var str = curtext.textContent; var first = str.substr(0, index).replace(/[a-z0-9]+$/i, '').length; var m = str.substr(index).match(/^[a-z0-9]+/i); var last = (m?m[0].length:0) + index; setSelection(first, last); - + // Set tripleclick $(evt.target).click(selectAll); setTimeout(function() { $(evt.target).unbind('click', selectAll); }, 300); - + } return { @@ -3843,27 +3843,27 @@ }, mouseDown: function(evt, mouse_target, start_x, start_y) { var pt = screenToPt(start_x, start_y); - + textinput.focus(); setCursorFromPoint(pt.x, pt.y); last_x = start_x; last_y = start_y; - + // TODO: Find way to block native selection }, mouseMove: function(mouse_x, mouse_y) { var pt = screenToPt(mouse_x, mouse_y); setEndSelectionFromPoint(pt.x, pt.y); - }, + }, mouseUp: function(evt, mouse_x, mouse_y) { var pt = screenToPt(mouse_x, mouse_y); - + setEndSelectionFromPoint(pt.x, pt.y, true); - - // TODO: Find a way to make this work: Use transformed BBox instead of evt.target + + // TODO: Find a way to make this work: Use transformed BBox instead of evt.target // if(last_x === mouse_x && last_y === mouse_y // && !svgedit.math.rectsIntersect(transbb, {x: pt.x, y: pt.y, width:0, height:0})) { -// textActions.toSelectMode(true); +// textActions.toSelectMode(true); // } if( @@ -3883,21 +3883,21 @@ allow_dbl = false; current_mode = "textedit"; selectorManager.requestSelector(curtext).showGrips(false); - + // Make selector group accept clicks var sel = selectorManager.requestSelector(curtext).selectorRect; - + textActions.init(); $(curtext).css('cursor', 'text'); - + if(!arguments.length) { setCursor(); } else { var pt = screenToPt(x, y); setCursorFromPoint(pt.x, pt.y); } - + setTimeout(function() { allow_dbl = true; }, 300); @@ -3909,11 +3909,11 @@ if(selblock) $(selblock).attr('display','none'); if(cursor) $(cursor).attr('visibility','hidden'); $(curtext).css('cursor', 'move'); - + if(selectElem) { clearSelection(); $(curtext).css('cursor', 'move'); - + call("selected", [curtext]); addToSelection([curtext], true); } @@ -3921,11 +3921,11 @@ // No content, so delete canvas.deleteSelectedElements(); } - + $(textinput).blur(); - + curtext = false; - + // if(svgedit.browser.supportsEditableText()) { // curtext.removeAttribute('editable'); // } @@ -3946,47 +3946,47 @@ // curtext.select(); // return; // } - + if(!curtext.parentNode) { // Result of the ffClone, need to get correct element curtext = selectedElements[0]; selectorManager.requestSelector(curtext).showGrips(false); } - + var str = curtext.textContent; var len = str.length; - + var xform = curtext.getAttribute('transform'); textbb = svgedit.utilities.getBBox(curtext); - + matrix = xform?getMatrix(curtext):null; chardata = Array(len); textinput.focus(); - + $(curtext).unbind('dblclick', selectWord).dblclick(selectWord); - + if(!len) { var end = {x: textbb.x + (textbb.width/2), width: 0}; } - + for(var i=0; i<len; i++) { var start = curtext.getStartPositionOfChar(i); var end = curtext.getEndPositionOfChar(i); - + if(!svgedit.browser.supportsGoodTextCharPos()) { var offset = canvas.contentW * current_zoom; start.x -= offset; end.x -= offset; - + start.x /= current_zoom; end.x /= current_zoom; } - + // Get a "bbox" equivalent for each character. Uses the // bbox data of the actual text for y, height purposes - + // TODO: Decide if y, width and height are actually necessary chardata[i] = { x: start.x, @@ -3995,7 +3995,7 @@ height: textbb.height }; } - + // Add a last bbox for cursor at end of text chardata.push({ x: end.x, @@ -4010,11 +4010,11 @@ // Group: Path edit functions // Functions relating to editing path elements var pathActions = canvas.pathActions = function() { - + var subpath = false; var current_path; var newPoint, firstCtrl; - + function resetD(p) { p.setAttribute("d", pathActions.convertPath(p)); } @@ -4050,9 +4050,9 @@ } // TODO: Correct this: pathActions.canDeleteNodes = true; - + pathActions.closed_subpath = this.subpathIsClosed(this.selected_pts[0]); - + call("selected", grips); } @@ -4062,7 +4062,7 @@ stretchy = null; this.lastCtrlPoint = [0, 0]; - + // This function converts a polyline (created by the fh_path tool) into // a path element and coverts every three line segments into a single bezier // curve in an attempt to smooth out the free-hand @@ -4071,13 +4071,13 @@ var N = points.numberOfItems; if (N >= 4) { // loop through every 3 points and convert to a cubic bezier curve segment - // - // NOTE: this is cheating, it means that every 3 points has the potential to + // + // NOTE: this is cheating, it means that every 3 points has the potential to // be a corner instead of treating each point in an equal manner. In general, // this technique does not look that good. - // + // // I am open to better ideas! - // + // // Reading: // - http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm // - http://www.codeproject.com/KB/graphics/BezierSpline.aspx?msg=2956963 @@ -4090,7 +4090,7 @@ var ct1 = points.getItem(i); var ct2 = points.getItem(i+1); var end = points.getItem(i+2); - + // if the previous segment had a control point, we want to smooth out // the control points on both sides if (prevCtlPt) { @@ -4103,9 +4103,9 @@ ct1 = newpts[1]; } } - + d.push([ct1.x,ct1.y,ct2.x,ct2.y,end.x,end.y].join(',')); - + curpos = end; prevCtlPt = ct2; } @@ -4137,12 +4137,12 @@ if(current_mode === "path") { mouse_x = start_x; mouse_y = start_y; - + var x = mouse_x/current_zoom, y = mouse_y/current_zoom, stretchy = getElem("path_stretch_line"); - newPoint = [x, y]; - + newPoint = [x, y]; + if(curConfig.gridSnapping){ x = snapToGrid(x); y = snapToGrid(y); @@ -4163,9 +4163,9 @@ stretchy.setAttribute("display", "inline"); this.stretchy = stretchy; - + var keep = null; - + // if pts array is empty, create path element with M at current point if (!drawn_path) { d_attr = "M" + x + "," + y + " "; @@ -4200,15 +4200,15 @@ break; } } - + // get path element that we are in the process of creating var id = getId(); - + // Remove previous path object if previously created svgedit.path.removePath_(id); - + var newpath = getElem(id); - + var len = seglist.numberOfItems; // if we clicked on an existing point, then we are done this path, commit it // (i,i+1) are the x,y that were clicked on @@ -4224,7 +4224,7 @@ var abs_y = seglist.getItem(0).y; var grip_x = svgedit.path.first_grip ? svgedit.path.first_grip[0]/current_zoom : seglist.getItem(0).x; var grip_y = svgedit.path.first_grip ? svgedit.path.first_grip[1]/current_zoom : seglist.getItem(0).y; - + var s_seg = stretchy.pathSegList.getItem(1); if(s_seg.pathSegType === 4) { @@ -4247,7 +4247,7 @@ return keep; } $(stretchy).remove(); - + // this will signal to commit the path element = newpath; drawn_path = null; @@ -4257,7 +4257,7 @@ if(svgedit.path.path.matrix) { remapElement(newpath, {}, svgedit.path.path.matrix.inverse()); } - + var new_d = newpath.getAttribute("d"); var orig_d = $(svgedit.path.path.elem).attr("d"); $(svgedit.path.path.elem).attr("d", orig_d + new_d); @@ -4286,7 +4286,7 @@ var lastx = last.x, lasty = last.y; if(evt.shiftKey) { var xya = snapToAngle(lastx,lasty,x,y); x=xya.x; y=xya.y; } - + // Use the segment defined by stretchy var s_seg = stretchy.pathSegList.getItem(1); if(s_seg.pathSegType === 4) { @@ -4301,12 +4301,12 @@ s_seg.y2 / current_zoom ); } - + drawn_path.pathSegList.appendItem(newseg); - + x *= current_zoom; y *= current_zoom; - + // update everything to the latest point stretchy.setAttribute('d', ['M', x, y, x, y].join(' ')); var pointGrip1 = svgedit.path.addCtrlGrip('1c1'); @@ -4337,20 +4337,20 @@ } return; } - + // TODO: Make sure current_path isn't null at this point if(!svgedit.path.path) return; - + svgedit.path.path.storeD(); - + var id = evt.target.id; if (id.substr(0,14) == "pathpointgrip_") { // Select this point var cur_pt = svgedit.path.path.cur_pt = parseInt(id.substr(14)); svgedit.path.path.dragging = [start_x, start_y]; var seg = svgedit.path.path.segs[cur_pt]; - - // only clear selection if shift is not pressed (otherwise, add + + // only clear selection if shift is not pressed (otherwise, add // node to selection) if (!evt.shiftKey) { if(svgedit.path.path.selected_pts.length <= 1 || !seg.selected) { @@ -4364,7 +4364,7 @@ } } else if(id.indexOf("ctrlpointgrip_") == 0) { svgedit.path.path.dragging = [start_x, start_y]; - + var parts = id.split('_')[1].split('c'); var cur_pt = parts[0]-0; var ctrl_num = parts[1]-0; @@ -4467,7 +4467,7 @@ if(!drawn_path) return; var seglist = drawn_path.pathSegList; var index = seglist.numberOfItems - 1; - var pointGrip1 = svgedit.path.addCtrlGrip('1c1'); + var pointGrip1 = svgedit.path.addCtrlGrip('1c1'); var pointGrip2 = svgedit.path.addCtrlGrip('0c2'); if(newPoint) { @@ -4484,20 +4484,20 @@ var pt_x = newPoint[0]; var pt_y = newPoint[1]; - + // set curve var seg = seglist.getItem(index); var cur_x = mouse_x / current_zoom; var cur_y = mouse_y / current_zoom; var alt_x = (is_linked) ? (pt_x + (pt_x - cur_x)) : current_pointGrip2_x; var alt_y = (is_linked) ? (pt_y + (pt_y - cur_y)) : current_pointGrip2_y; - - + + pointGrip2.setAttribute('cx', alt_x * current_zoom); pointGrip2.setAttribute('cy', alt_y * current_zoom); pointGrip2.setAttribute('display', 'inline'); - - + + var ctrlLine = svgedit.path.getCtrlLine(1); var ctrlLine2 = svgedit.path.getCtrlLine(2); assignAttributes(ctrlLine, { @@ -4507,7 +4507,7 @@ y2: pt_y * current_zoom, display: 'inline' }); - + assignAttributes(ctrlLine2, { x1: alt_x * current_zoom, @@ -4522,11 +4522,11 @@ firstCtrl = [mouse_x, mouse_y]; } else { var last_x, last_y; - + var last = seglist.getItem(index - 1); var last_x = last.x; var last_y = last.y - + if(last.pathSegType === 6) { last_x += (last_x - last.x2); last_y += (last_y - last.y2); @@ -4552,7 +4552,7 @@ if(prev.pathSegType === 6) { var prev_x = this.lastCtrlPoint[0]/current_zoom || prev.x + (prev.x - prev.x2); var prev_y = this.lastCtrlPoint[1]/current_zoom || prev.y + (prev.y - prev.y2); - svgedit.path.replacePathSeg(6, 1, [mouse_x, mouse_y, prev_x * current_zoom, prev_y * current_zoom, lastgripx, lastgripy], stretchy); + svgedit.path.replacePathSeg(6, 1, [mouse_x, mouse_y, prev_x * current_zoom, prev_y * current_zoom, lastgripx, lastgripy], stretchy); } else if(firstCtrl) { svgedit.path.replacePathSeg(6, 1, [mouse_x, mouse_y, firstCtrl[0], firstCtrl[1], mouse_x, mouse_y], stretchy); } else { @@ -4592,7 +4592,7 @@ if(!seg.next && !seg.prev) return; var item = seg.item; var rbb = rubberBox.getBBox(); - + var pt = svgedit.path.getGripPt(seg); var pt_bb = { x: pt.x, @@ -4600,7 +4600,7 @@ width: 0, height: 0 }; - + var sel = svgedit.math.rectsIntersect(rbb, pt_bb); this.select(sel); @@ -4609,7 +4609,7 @@ }); } - }, + }, mouseUp: function(evt, element, mouse_x, mouse_y) { var lastpointgrip = getElem('ctrlpointgrip_1c1'); var firstpointgrip = getElem('ctrlpointgrip_0c2'); @@ -4639,34 +4639,34 @@ element: element } } - + // Edit mode - + if (svgedit.path.path.dragging) { var last_pt = svgedit.path.path.cur_pt; svgedit.path.path.dragging = false; svgedit.path.path.dragctrl = false; svgedit.path.path.update(); - - + + if(hasMoved) { svgedit.path.path.endChanges("Move path point(s)"); - } - + } + if(!evt.shiftKey && !hasMoved) { svgedit.path.path.selectPt(last_pt); - } + } } else if(rubberBox && rubberBox.getAttribute('display') != 'none') { // Done with multi-node-select rubberBox.setAttribute("display", "none"); - + if(rubberBox.getAttribute('width') <= 2 && rubberBox.getAttribute('height') <= 2) { pathActions.toSelectMode(evt.target); } - - // else, move back to select mode + + // else, move back to select mode } else { pathActions.toSelectMode(evt.target); } @@ -4686,12 +4686,12 @@ svgedit.path.path.show(false); current_path = false; clearSelection(); - + if(svgedit.path.path.matrix) { // Rotated, so may need to re-calculate the center svgedit.path.recalcRotatedPath(); } - + if(selPath) { call("selected", [elem]); addToSelection([elem], true); @@ -4715,14 +4715,14 @@ } // going into pathedit mode else { current_path = target; - } + } }, reorient: function() { var elem = selectedElements[0]; if(!elem) return; var angle = getRotationAngle(elem); if(angle == 0) return; - + var batchCmd = new BatchCommand("Reorient path"); var changes = { d: elem.getAttribute('d'), @@ -4731,18 +4731,18 @@ batchCmd.addSubCommand(new ChangeElementCommand(elem, changes)); clearSelection(); this.resetOrientation(elem); - + addCommandToHistory(batchCmd); // Set matrix to null - svgedit.path.getPath_(elem).show(false).matrix = null; + svgedit.path.getPath_(elem).show(false).matrix = null; this.clear(); - + addToSelection([elem], true); call("changed", selectedElements); }, - + clear: function(remove) { current_path = null; if (drawn_path) { @@ -4764,11 +4764,11 @@ tlist.clear(); path.removeAttribute("transform"); var segList = path.pathSegList; - + // Opera/win/non-EN throws an error here. // TODO: Find out why! // Presumed fixed in Opera 10.5, so commented out for now - + // try { var len = segList.numberOfItems; // } catch(err) { @@ -4794,7 +4794,7 @@ }); svgedit.path.replacePathSeg(type, i, pts, path); } - + reorientGrads(path, m); @@ -4814,16 +4814,16 @@ y: seg.item.y, type: seg.type }; - }, + }, linkControlPoints: function(linkPoints) { svgedit.path.setLinkControlPoints(linkPoints); }, clonePathNode: function() { svgedit.path.path.storeD(); - + var sel_pts = svgedit.path.path.selected_pts; var segs = svgedit.path.path.segs; - + var i = sel_pts.length; var nums = []; @@ -4833,7 +4833,7 @@ nums.push(pt + i); nums.push(pt + i + 1); } - + svgedit.path.path.init().addPtsToSelection(nums); svgedit.path.path.endChanges("Clone path node(s)"); @@ -4842,14 +4842,14 @@ var sel_pts = svgedit.path.path.selected_pts; // Only allow one selected node for now if(sel_pts.length !== 1) return; - + var elem = svgedit.path.path.elem; var list = elem.pathSegList; var len = list.numberOfItems; var index = sel_pts[0]; - + var open_pt = null; var start_item = null; @@ -4869,7 +4869,7 @@ return false; } }); - + if(open_pt == null) { // Single path, so close last seg open_pt = svgedit.path.path.segs.length - 1; @@ -4877,10 +4877,10 @@ if(open_pt !== false) { // Close this path - + // Create a line going to the previous "M" var newseg = elem.createSVGPathSegLinetoAbs(start_item.x, start_item.y); - + var closer = elem.createSVGPathSegClosePath(); if(open_pt == svgedit.path.path.segs.length) { list.appendItem(newseg); @@ -4889,30 +4889,30 @@ svgedit.path.insertItemBefore(elem, closer, open_pt); svgedit.path.insertItemBefore(elem, newseg, open_pt); } - + svgedit.path.path.init().selectPt(open_pt+1); return; } - - + + // M 1,1 L 2,2 L 3,3 L 1,1 z // open at 2,2 // M 2,2 L 3,3 L 1,1 - - // M 1,1 L 2,2 L 1,1 z M 4,4 L 5,5 L6,6 L 5,5 z - // M 1,1 L 2,2 L 1,1 z [M 4,4] L 5,5 L(M)6,6 L 5,5 z - + + // M 1,1 L 2,2 L 1,1 z M 4,4 L 5,5 L6,6 L 5,5 z + // M 1,1 L 2,2 L 1,1 z [M 4,4] L 5,5 L(M)6,6 L 5,5 z + var seg = svgedit.path.path.segs[index]; - + if(seg.mate) { list.removeItem(index); // Removes last "L" list.removeItem(index); // Removes the "Z" svgedit.path.path.init().selectPt(index - 1); return; } - + var last_m, z_seg; - + // Find this sub-path's closing point and remove for(var i=0; i<list.numberOfItems; i++) { var item = list.getItem(i); @@ -4931,26 +4931,26 @@ break; } } - + var num = (index - last_m) - 1; - + while(num--) { svgedit.path.insertItemBefore(elem, list.getItem(last_m), z_seg); } - + var pt = list.getItem(last_m); - + // Make this point the new "M" svgedit.path.replacePathSeg(2, last_m, [pt.x, pt.y]); - + var i = index - + svgedit.path.path.init().selectPt(0); }, deletePathNode: function() { if(!pathActions.canDeleteNodes) return; svgedit.path.path.storeD(); - + var sel_pts = svgedit.path.path.selected_pts; var i = sel_pts.length; @@ -4958,12 +4958,12 @@ var pt = sel_pts[i]; svgedit.path.path.deleteSeg(pt); } - + // Cleanup var cleanup = function() { var segList = svgedit.path.path.elem.pathSegList; var len = segList.numberOfItems; - + var remItems = function(pos, count) { while(count--) { segList.removeItem(pos); @@ -4971,7 +4971,7 @@ } if(len <= 1) return true; - + while(len--) { var item = segList.getItem(len); if(item.pathSegType === 1) { @@ -4990,12 +4990,12 @@ } else if(item.pathSegType === 2) { if(len > 0) { var prev_type = segList.getItem(len-1).pathSegType; - // Path has M M + // Path has M M if(prev_type === 2) { remItems(len-1, 1); cleanup(); break; - // Entire path ends with Z M + // Entire path ends with Z M } else if(prev_type === 1 && segList.numberOfItems-1 === len) { remItems(len, 1); cleanup(); @@ -5003,23 +5003,23 @@ } } } - } + } return false; } - + cleanup(); - + // Completely delete a path with 1 or 0 segments if(svgedit.path.path.elem.pathSegList.numberOfItems <= 1) { canvas.setMode("select") canvas.deleteSelectedElements(); return; } - + svgedit.path.path.init(); - + svgedit.path.path.clearSelection(); - + // TODO: Find right way to select point now // path.selectPt(sel_pt); if(window.opera) { // Opera repaints incorrectly @@ -5034,14 +5034,14 @@ moveNode: function(attr, newValue) { var sel_pts = svgedit.path.path.selected_pts; if(!sel_pts.length) return; - + svgedit.path.path.storeD(); - + // Get first selected point var seg = svgedit.path.path.segs[sel_pts[0]]; var diff = {x:0, y:0}; diff[attr] = newValue - seg.item[attr]; - + seg.move(diff.x, diff.y); svgedit.path.path.endChanges("Move path point"); }, @@ -5057,7 +5057,7 @@ if(item.pathSegType === 2) { last_m = item; } - + if(item.pathSegType === 1) { var prev = segList.getItem(i-1); if(prev.x != last_m.x || prev.y != last_m.y) { @@ -5068,7 +5068,7 @@ pathActions.fixEnd(elem); break; } - + } } if(svgedit.browser.isWebkit()) resetD(elem); @@ -5080,7 +5080,7 @@ var curx = 0, cury = 0; var d = ""; var last_m = null; - + for (var i = 0; i < len; ++i) { var seg = segList.getItem(i); // if these properties are not in the segment, set them to zero @@ -5090,10 +5090,10 @@ y1 = seg.y1 || 0, x2 = seg.x2 || 0, y2 = seg.y2 || 0; - + var type = seg.pathSegType; var letter = pathMap[type]['to'+(toRel?'Lower':'Upper')+'Case'](); - + var addToD = function(pnts, more, last) { var str = ''; var more = more?' '+more.join(' '):''; @@ -5103,7 +5103,7 @@ }); d += letter + pnts.join(' ') + more + last; } - + switch (type) { case 1: // z,Z closepath (Z/z) d += "z"; @@ -5143,12 +5143,12 @@ y -= cury; case 5: // relative line (l) case 3: // relative move (m) - // If the last segment was a "z", this must be relative to + // If the last segment was a "z", this must be relative to if(last_m && segList.getItem(i-1).pathSegType === 1 && !toRel) { curx = last_m[0]; cury = last_m[1]; } - + case 19: // relative smooth quad (t) if(toRel) { curx += x; @@ -5160,7 +5160,7 @@ cury = y; } if(type === 3) last_m = [curx, cury]; - + addToD([[x,y]]); break; case 6: // absolute cubic (C) @@ -5181,7 +5181,7 @@ case 8: // absolute quad (Q) x -= curx; x1 -= curx; y -= cury; y1 -= cury; - case 9: // relative quad (q) + case 9: // relative quad (q) if(toRel) { curx += x; cury += y; @@ -5241,23 +5241,23 @@ // Function: removeUnusedDefElems // Looks at DOM elements inside the <defs> to see if they are referred to, // removes them from the DOM if they are not. -// +// // Returns: // The amount of elements that were removed var removeUnusedDefElems = this.removeUnusedDefElems = function() { var defs = svgcontent.getElementsByTagNameNS(svgns, "defs"); if(!defs || !defs.length) return 0; - + // if(!defs.firstChild) return; - + var defelem_uses = [], numRemoved = 0; var attrs = ['fill', 'stroke', 'filter', 'marker-start', 'marker-mid', 'marker-end']; var alen = attrs.length; - + var all_els = svgcontent.getElementsByTagNameNS(svgns, '*'); var all_len = all_els.length; - + for(var i=0; i<all_len; i++) { var el = all_els[i]; for(var j = 0; j < alen; j++) { @@ -5268,14 +5268,14 @@ } } } - + // gradients can refer to other gradients var href = getHref(el); if (href && href.indexOf('#') === 0) { defelem_uses.push(href.substr(1)); } }; - + var defelems = $(defs).find("linearGradient, radialGradient, filter, marker, svg, symbol"); defelem_ids = [], i = defelems.length; @@ -5294,34 +5294,34 @@ } // Function: svgCanvasToString -// Main function to set up the SVG content for output +// Main function to set up the SVG content for output // -// Returns: +// Returns: // String containing the SVG image for output this.svgCanvasToString = function() { // keep calling it until there are none to remove while (removeUnusedDefElems() > 0) {}; - + pathActions.clear(true); - + // Keep SVG-Edit comment on top $.each(svgcontent.childNodes, function(i, node) { if(i && node.nodeType === 8 && node.data.indexOf('Created with') >= 0) { svgcontent.insertBefore(node, svgcontent.firstChild); } }); - + // Move out of in-group editing mode if(current_group) { leaveContext(); selectOnly([current_group]); } - + //hide grid, otherwise shows a black canvas $('#canvasGrid').attr('display', 'none'); - + var naked_svgs = []; - + // Unwrap gsvg if it has no special attributes (only id and style) $(svgcontent).find('g:data(gsvg)').each(function() { var attrs = this.attributes; @@ -5339,25 +5339,25 @@ } }); var output = this.svgToString(svgcontent, 0); - + // Rewrap gsvg if(naked_svgs.length) { $(naked_svgs).each(function() { groupSvgElem(this); }); } - + return output; }; // Function: svgToString // Sub function ran on each SVG element to convert it to a string as desired -// -// Parameters: +// +// Parameters: // elem - The SVG element to convert // indent - Integer with the amount of spaces to indent this tag // -// Returns: +// Returns: // String with the given element as an SVG tag this.svgToString = function(elem, indent) { var out = new Array(), toXml = svgedit.utilities.toXml; @@ -5370,13 +5370,13 @@ attr, i, childs = elem.childNodes; - + for (var i=0; i<indent; i++) out.push(" "); out.push("<"); out.push(elem.nodeName); if(elem.id === 'svgcontent') { // Process root element separately var res = getResolution(); - + var vb = ""; // TODO: Allow this by dividing all values by current baseVal // Note that this also means we should properly deal with this on import @@ -5385,20 +5385,20 @@ // var unit_m = svgedit.units.getTypeMap()[unit]; // res.w = svgedit.units.shortFloat(res.w / unit_m) // res.h = svgedit.units.shortFloat(res.h / unit_m) -// vb = ' viewBox="' + [0, 0, res.w, res.h].join(' ') + '"'; +// vb = ' viewBox="' + [0, 0, res.w, res.h].join(' ') + '"'; // res.w += unit; // res.h += unit; // } - + if(unit !== "px") { res.w = svgedit.units.convertUnit(res.w, unit) + unit; res.h = svgedit.units.convertUnit(res.h, unit) + unit; } - + out.push(' width="' + res.w + '" height="' + res.h + '"' + vb + ' xmlns="'+svgns+'"'); - + var nsuris = {}; - + // Check elements for namespaces, add if found $(elem).find('*').andSelf().each(function() { var el = this; @@ -5410,22 +5410,22 @@ } }); }); - + var i = attrs.length; var attr_names = ['width','height','xmlns','x','y','viewBox','id','overflow']; while (i--) { attr = attrs.item(i); var attrVal = toXml(attr.nodeValue); - + // Namespaces have already been dealt with, so skip if(attr.nodeName.indexOf('xmlns:') === 0) continue; // only serialize attributes we don't use internally - if (attrVal != "" && attr_names.indexOf(attr.localName) == -1) + if (attrVal != "" && attr_names.indexOf(attr.localName) == -1) { if(!attr.namespaceURI || nsMap[attr.namespaceURI]) { - out.push(' '); + out.push(' '); out.push(attr.nodeName); out.push("=\""); out.push(attrVal); out.push("\""); } @@ -5434,7 +5434,7 @@ } else { // Skip empty defs if(elem.nodeName === 'defs' && !elem.firstChild) return; - + var moz_attrs = ['-moz-math-font-style', '_moz-math-font-style']; for (var i=attrs.length-1; i>=0; i--) { attr = attrs.item(i); @@ -5444,25 +5444,25 @@ if (attrVal != "") { if(attrVal.indexOf('pointer-events') === 0) continue; if(attr.localName === "class" && attrVal.indexOf('se_') === 0) continue; - out.push(" "); + out.push(" "); if(attr.localName === 'd') attrVal = pathActions.convertPath(elem, true); if(!isNaN(attrVal)) { attrVal = svgedit.units.shortFloat(attrVal); } else if(unit_re.test(attrVal)) { attrVal = svgedit.units.shortFloat(attrVal) + unit; } - - // Embed images when saving + + // Embed images when saving if(save_options.apply - && elem.nodeName === 'image' + && elem.nodeName === 'image' && attr.localName === 'href' && save_options.images - && save_options.images === 'embed') + && save_options.images === 'embed') { var img = encodableImages[attrVal]; if(img) attrVal = img; } - + // map various namespaces to our fixed namespace prefixes // (the default xmlns attribute itself does not get a prefix) if(!attr.namespaceURI || attr.namespaceURI == svgns || nsMap[attr.namespaceURI]) { @@ -5477,7 +5477,7 @@ out.push(">"); indent++; var bOneLine = false; - + for (var i=0; i<childs.length; i++) { var child = childs.item(i); @@ -5525,7 +5525,7 @@ // Function: embedImage // Converts a given image file to a data URL when possible, then runs a given callback // -// Parameters: +// Parameters: // val - String with the path/URL of the image // callback - Optional function to run when image data is found, supplies the // result (data URL or false) as first parameter. @@ -5567,7 +5567,7 @@ // This function also includes the XML prolog. Clients of the SvgCanvas bind their save // function to the 'saved' event. // -// Returns: +// Returns: // Nothing this.save = function(opts) { // remove the selected outline before serializing @@ -5575,7 +5575,7 @@ // Update save options if provided if(opts) $.extend(save_options, opts); save_options.apply = true; - + // no need for doctype, see http://jwatt.org/svg/authoring/#doctype-declaration var str = this.svgCanvasToString(); if (svgedit.browser.supportsBlobs()) { @@ -5589,15 +5589,15 @@ }; // Function: rasterExport -// Generates a PNG Data URL based on the current image, then calls "exported" +// Generates a PNG Data URL based on the current image, then calls "exported" // with an object including the string and any issues found this.rasterExport = function() { // remove the selected outline before serializing clearSelection(); - - // Check for known CanVG issues + + // Check for known CanVG issues var issues = []; - + // Selector and notice var issue_list = { 'feGaussianBlur': uiStrings.exportNoBlur, @@ -5605,12 +5605,12 @@ '[stroke-dasharray]': uiStrings.exportNoDashArray }; var content = $(svgcontent); - + // Add font/text check if Canvas Text API is not implemented if(!("font" in $('<canvas>')[0].getContext('2d'))) { issue_list['text'] = uiStrings.exportNoText; } - + $.each(issue_list, function(sel, descr) { if(content.find(sel).length) { issues.push(descr); @@ -5634,7 +5634,7 @@ // Function: randomizeIds // This function determines whether to use a nonce in the prefix, when // generating IDs for future documents in SVG-Edit. -// +// // Parameters: // an opional boolean, which, if true, adds a nonce to the prefix. Thus // svgCanvas.randomizeIds() <==> svgCanvas.randomizeIds(true) @@ -5662,11 +5662,11 @@ // // <marker id='se_marker_end_svg_7'/> // <polyline id='svg_7' se:connector='svg_1 svg_6' marker-end='url(#se_marker_end_svg_7)'/> - // + // // Problem #1: if svg_1 gets renamed, we do not update the polyline's se:connector attribute // Problem #2: if the polyline svg_7 gets renamed, we do not update the marker id nor the polyline's marker-end attribute var ref_elems = ["filter", "linearGradient", "pattern", "radialGradient", "symbol", "textPath", "use"]; - + svgedit.utilities.walkTree(g, function(n) { // if it's an element node if (n.nodeType == 1) { @@ -5679,7 +5679,7 @@ } ids[n.id]["elem"] = n; } - + // now search for all attributes on this element that might refer // to other elements $.each(ref_attrs,function(i,attr) { @@ -5697,7 +5697,7 @@ } } }); - + // check xlink:href now var href = svgedit.utilities.getHref(n); // TODO: what if an <image> or <a> element refers to an element internally? @@ -5711,20 +5711,20 @@ } ids[refid]["hrefs"].push(n); } - } + } } }); - + // in ids, we now have a map of ids, elements and attributes, let's re-identify for (var oldid in ids) { if (!oldid) continue; var elem = ids[oldid]["elem"]; if (elem) { var newid = getNextId(); - + // assign element its new id elem.id = newid; - + // remap all url() attributes var attrs = ids[oldid]["attrs"]; var j = attrs.length; @@ -5732,7 +5732,7 @@ var attr = attrs[j]; attr.ownerElement.setAttribute(attr.name, "url(#" + newid + ")"); } - + // remap all href attributes var hreffers = ids[oldid]["hrefs"]; var k = hreffers.length; @@ -5748,11 +5748,11 @@ // Assigns reference data for each use element var setUseData = this.setUseData = function(parent) { var elems = $(parent); - + if(parent.tagName !== 'use') { elems = elems.find('use'); } - + elems.each(function() { var id = getHref(this).substr(1); var ref_elem = getElem(id); @@ -5774,38 +5774,38 @@ return (this.tagName.indexOf('Gradient') >= 0); }); } - + elems.each(function() { var grad = this; if($(grad).attr('gradientUnits') === 'userSpaceOnUse') { // TODO: Support more than one element with this ref by duplicating parent grad var elems = $(svgcontent).find('[fill="url(#' + grad.id + ')"],[stroke="url(#' + grad.id + ')"]'); if(!elems.length) return; - + // get object's bounding box var bb = svgedit.utilities.getBBox(elems[0]); - + // This will occur if the element is inside a <defs> or a <symbol>, // in which we shouldn't need to convert anyway. if(!bb) return; - + if(grad.tagName === 'linearGradient') { var g_coords = $(grad).attr(['x1', 'y1', 'x2', 'y2']); - + // If has transform, convert var tlist = grad.gradientTransform.baseVal; if(tlist && tlist.numberOfItems > 0) { var m = transformListToTransform(tlist).matrix; var pt1 = transformPoint(g_coords.x1, g_coords.y1, m); var pt2 = transformPoint(g_coords.x2, g_coords.y2, m); - + g_coords.x1 = pt1.x; g_coords.y1 = pt1.y; g_coords.x2 = pt2.x; g_coords.y2 = pt2.y; grad.removeAttribute('gradientTransform'); } - + $(grad).attr({ x1: (g_coords.x1 - bb.x) / bb.width, y1: (g_coords.y1 - bb.y) / bb.height, @@ -5814,26 +5814,26 @@ }); grad.removeAttribute('gradientUnits'); } else { - // Note: radialGradient elements cannot be easily converted + // Note: radialGradient elements cannot be easily converted // because userSpaceOnUse will keep circular gradients, while // objectBoundingBox will x/y scale the gradient according to - // its bbox. - + // its bbox. + // For now we'll do nothing, though we should probably have - // the gradient be updated as the element is moved, as + // the gradient be updated as the element is moved, as // inkscape/illustrator do. - + // var g_coords = $(grad).attr(['cx', 'cy', 'r']); -// +// // $(grad).attr({ // cx: (g_coords.cx - bb.x) / bb.width, // cy: (g_coords.cy - bb.y) / bb.height, // r: g_coords.r // }); -// +// // grad.removeAttribute('gradientUnits'); } - + } }); @@ -5846,19 +5846,19 @@ elem = selectedElements[0]; } var $elem = $(elem); - + var batchCmd = new BatchCommand(); - + var ts; - + if($elem.data('gsvg')) { // Use the gsvg as the new group var svg = elem.firstChild; var pt = $(svg).attr(['x', 'y']); - + $(elem.firstChild.firstChild).unwrap(); $(elem).removeData('gsvg'); - + var tlist = getTransformList(elem); var xform = svgroot.createSVGTransform(); xform.setTranslate(pt.x, pt.y); @@ -5867,61 +5867,61 @@ call("selected", [elem]); } else if($elem.data('symbol')) { elem = $elem.data('symbol'); - + ts = $elem.attr('transform'); var pos = $elem.attr(['x','y']); var vb = elem.getAttribute('viewBox'); - + if(vb) { var nums = vb.split(' '); pos.x -= +nums[0]; pos.y -= +nums[1]; } - + // Not ideal, but works ts += " translate(" + (pos.x || 0) + "," + (pos.y || 0) + ")"; - + var prev = $elem.prev(); - + // Remove <use> element batchCmd.addSubCommand(new RemoveElementCommand($elem[0], $elem[0].nextSibling, $elem[0].parentNode)); $elem.remove(); - + // See if other elements reference this symbol var has_more = $(svgcontent).find('use:data(symbol)').length; - + var g = svgdoc.createElementNS(svgns, "g"); var childs = elem.childNodes; - + for(var i = 0; i < childs.length; i++) { g.appendChild(childs[i].cloneNode(true)); } - + // Duplicate the gradients for Gecko, since they weren't included in the <symbol> if(svgedit.browser.isGecko()) { var dupeGrads = $(findDefs()).children('linearGradient,radialGradient,pattern').clone(); $(g).append(dupeGrads); } - + if (ts) { g.setAttribute("transform", ts); } - + var parent = elem.parentNode; - + uniquifyElems(g); - + // Put the dupe gradients back into <defs> (after uniquifying them) if(svgedit.browser.isGecko()) { $(findDefs()).append( $(g).find('linearGradient,radialGradient,pattern') ); } - + // now give the g itself a new id g.id = getNextId(); - + prev.after(g); - + if(parent) { if(!has_more) { // remove symbol/svg element @@ -5931,39 +5931,39 @@ } batchCmd.addSubCommand(new InsertElementCommand(g)); } - + setUseData(g); - + if(svgedit.browser.isGecko()) { convertGradients(findDefs()); } else { convertGradients(g); } - + // recalculate dimensions on the top-level children so that unnecessary transforms // are removed svgedit.utilities.walkTreePost(g, function(n){try{recalculateDimensions(n)}catch(e){console.log(e)}}); - + // Give ID for any visible element missing one $(g).find(visElems).each(function() { if(!this.id) this.id = getNextId(); }); - + selectOnly([g]); - + var cm = pushGroupProperties(g, true); if(cm) { batchCmd.addSubCommand(cm); } addCommandToHistory(batchCmd); - + } else { console.log('Unexpected element to ungroup:', elem); } } -// +// // Function: setSvgString // This function sets the current drawing as the input SVG XML. // @@ -5985,7 +5985,7 @@ var nextSibling = svgcontent.nextSibling; var oldzoom = svgroot.removeChild(svgcontent); batchCmd.addSubCommand(new RemoveElementCommand(oldzoom, nextSibling, svgroot)); - + // set new svg document // If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode() if(svgdoc.adoptNode) { @@ -5994,12 +5994,12 @@ else { svgcontent = svgdoc.importNode(newDoc.documentElement, true); } - + svgroot.appendChild(svgcontent); var content = $(svgcontent); - + canvas.current_drawing_ = new svgedit.draw.Drawing(svgcontent, idprefix); - + // retrieve or set the nonce var nonce = getCurrentDrawing().getNonce(); if (nonce) { @@ -6007,7 +6007,7 @@ } else { call("unsetnonce"); } - + // change image href vals if possible content.find('image').each(function() { var image = this; @@ -6026,14 +6026,14 @@ // Add to encodableImages if it loads canvas.embedImage(val); }); - + // Wrap child SVGs in group elements content.find('svg').each(function() { // Skip if it's in a <defs> if($(this).closest('defs').length) return; - + uniquifyElems(this); - + // Check if it already has a gsvg group var pa = this.parentNode; if(pa.childNodes.length === 1 && pa.nodeName === 'g') { @@ -6043,29 +6043,29 @@ groupSvgElem(this); } }); - + // Put all paint elems in defs - + content.find('linearGradient, radialGradient, pattern').appendTo(findDefs()); - + // Set ref element for <use> elements - + // TODO: This should also be done if the object is re-added through "redo" setUseData(content); - + convertGradients(content[0]); - + // recalculate dimensions on the top-level children so that unnecessary transforms // are removed svgedit.utilities.walkTreePost(svgcontent, function(n){try{recalculateDimensions(n)}catch(e){console.log(e)}}); - + var attrs = { id: 'svgcontent', overflow: curConfig.show_outside_canvas?'visible':'hidden' }; - + var percs = false; - + // determine proper size if (content.attr("viewBox")) { var vb = content.attr("viewBox").split(' '); @@ -6077,9 +6077,9 @@ $.each(['width', 'height'], function(i, dim) { // Set to 100 if not given var val = content.attr(dim); - + if(!val) val = '100%'; - + if((val+'').substr(-1) === "%") { // Use user units if percentage given percs = true; @@ -6088,31 +6088,31 @@ } }); } - + // identify layers identifyLayers(); - + // Give ID for any visible layer children missing one content.children().find(visElems).each(function() { if(!this.id) this.id = getNextId(); }); - + // Percentage width/height, so let's base it on visible elements if(percs) { var bb = getStrokedBBox(); attrs.width = bb.width + bb.x; attrs.height = bb.height + bb.y; } - - // Just in case negative numbers are given or + + // Just in case negative numbers are given or // result from the percs calculation if(attrs.width <= 0) attrs.width = 200; if(attrs.height <= 0) attrs.height = 200; - + content.attr(attrs); this.contentW = attrs['width']; this.contentH = attrs['height']; - + $("#canvas_width").val(this.contentW) $("#canvas_height").val(this.contentH) var background = $("#canvas_background") @@ -6131,16 +6131,16 @@ // update root to the correct size var changes = content.attr(["width", "height"]); batchCmd.addSubCommand(new ChangeElementCommand(svgroot, changes)); - + // reset zoom current_zoom = 1; - + // reset transform lists svgedit.transformlist.resetListMap(); clearSelection(); svgedit.path.clearData(); svgroot.appendChild(selectorManager.selectorParentGroup); - + addCommandToHistory(batchCmd); call("changed", [svgcontent]); } catch(e) { @@ -6165,7 +6165,7 @@ opts = { alpha: opac }; opts[refElem.tagName] = refElem; - } + } else if (color.indexOf("#") === 0) { opts = { alpha: opac, @@ -6190,19 +6190,19 @@ // // Returns: // This function returns false if the import was unsuccessful, true otherwise. -// TODO: +// TODO: // * properly handle if namespace is introduced by imported content (must add to svgcontent // and update all prefixes in the imported node) // * properly handle recalculating dimensions, recalculateDimensions() doesn't handle -// arbitrary transform lists, but makes some assumptions about how the transform list +// arbitrary transform lists, but makes some assumptions about how the transform list // was obtained -// * import should happen in top-left of current zoomed viewport +// * import should happen in top-left of current zoomed viewport this.importSvgString = function(xmlString) { try { // Get unique ID var uid = svgedit.utilities.encode64(xmlString.length + xmlString).substr(0,32); - + var useExisting = false; // Look for symbol and make sure symbol exists in image @@ -6211,18 +6211,18 @@ useExisting = true; } } - + var batchCmd = new BatchCommand("Import SVG"); - + if(useExisting) { var symbol = import_ids[uid].symbol; var ts = import_ids[uid].xform; } else { // convert string into XML document var newDoc = svgedit.utilities.text2xml(xmlString); - + this.prepareSvg(newDoc); - + // import new svg document into our document var svg; // If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode() @@ -6232,9 +6232,9 @@ else { svg = svgdoc.importNode(newDoc.documentElement, true); } - + uniquifyElems(svg); - + var innerw = convertToNum('width', svg.getAttribute("width")), innerh = convertToNum('height', svg.getAttribute("height")), innervb = svg.getAttribute("viewBox"), @@ -6242,32 +6242,32 @@ vb = innervb ? innervb.split(" ") : [0,0,innerw,innerh]; for (var j = 0; j < 4; ++j) vb[j] = +(vb[j]); - + // TODO: properly handle preserveAspectRatio var canvasw = +svgcontent.getAttribute("width"), canvash = +svgcontent.getAttribute("height"); // imported content should be 1/3 of the canvas on its largest dimension - + if (innerh > innerw) { var ts = "scale(" + (canvash/3)/vb[3] + ")"; } else { var ts = "scale(" + (canvash/3)/vb[2] + ")"; } - + // Hack to make recalculateDimensions understand how to scale ts = "translate(0) " + ts + " translate(0)"; - + var symbol = svgdoc.createElementNS(svgns, "symbol"); var defs = findDefs(); - + if(svgedit.browser.isGecko()) { // Move all gradients into root for Firefox, workaround for this bug: // https://bugzilla.mozilla.org/show_bug.cgi?id=353575 // TODO: Make this properly undo-able. $(svg).find('linearGradient, radialGradient, pattern').appendTo(defs); } - + while (svg.firstChild) { var first = svg.firstChild; symbol.appendChild(first); @@ -6278,31 +6278,31 @@ symbol.setAttribute(attr.nodeName, attr.nodeValue); } symbol.id = getNextId(); - + // Store data import_ids[uid] = { symbol: symbol, xform: ts } - + findDefs().appendChild(symbol); batchCmd.addSubCommand(new InsertElementCommand(symbol)); } - - + + var use_el = svgdoc.createElementNS(svgns, "use"); use_el.id = getNextId(); setHref(use_el, "#" + symbol.id); - + (current_group || getCurrentDrawing().getCurrentLayer()).appendChild(use_el); batchCmd.addSubCommand(new InsertElementCommand(use_el)); clearSelection(); - + use_el.setAttribute("transform", ts); recalculateDimensions(use_el); $(use_el).data('symbol', symbol).data('ref', symbol); addToSelection([use_el]); - + // TODO: Find way to add this in a recalculateDimensions-parsable way // if (vb[0] != 0 || vb[1] != 0) // ts = "translate(" + (-vb[0]) + "," + (-vb[1]) + ") " + ts; @@ -6330,7 +6330,7 @@ }; // Function: createLayer -// Creates a new top-level layer in the drawing with the given name, sets the current layer +// Creates a new top-level layer in the drawing with the given name, sets the current layer // to it, and then clears the selection This function then calls the 'changed' handler. // This is an undoable action. // @@ -6366,7 +6366,7 @@ if(ch.localName == 'title') continue; new_layer.appendChild(copyElem(ch)); } - + clearSelection(); identifyLayers(); @@ -6377,7 +6377,7 @@ }; // Function: deleteCurrentLayer -// Deletes the current layer from the drawing and then clears the selection. This function +// Deletes the current layer from the drawing and then clears the selection. This function // then calls the 'changed' handler. This is an undoable action. this.deleteCurrentLayer = function() { var current_layer = getCurrentDrawing().getCurrentLayer(); @@ -6414,11 +6414,11 @@ }; // Function: renameCurrentLayer -// Renames the current layer. If the layer name is not valid (i.e. unique), then this function +// Renames the current layer. If the layer name is not valid (i.e. unique), then this function // does nothing and returns false, otherwise it returns true. This is an undo-able action. -// +// // Parameters: -// newname - the new name you want to give the current layer. This name must be unique +// newname - the new name you want to give the current layer. This name must be unique // among all layer names. // // Returns: @@ -6437,14 +6437,14 @@ } var oldname = drawing.getLayerName(i); drawing.all_layers[i][0] = svgedit.utilities.toXml(newname); - + // now change the underlying title element contents var len = oldLayer.childNodes.length; for (var i = 0; i < len; ++i) { var child = oldLayer.childNodes.item(i); // found the <title> element, now append all the if (child && child.tagName == "title") { - // wipe out old name + // wipe out old name while (child.firstChild) { child.removeChild(child.firstChild); } child.textContent = newname; @@ -6461,14 +6461,14 @@ }; // Function: setCurrentLayerPosition -// Changes the position of the current layer to the new value. If the new index is not valid, +// Changes the position of the current layer to the new value. If the new index is not valid, // this function does nothing and returns false, otherwise it returns true. This is an // undo-able action. // // Parameters: // newpos - The zero-based index of the new position of the layer. This should be between // 0 and (number of layers - 1) -// +// // Returns: // true if the current layer position was changed, false otherwise. this.setCurrentLayerPosition = function(newpos) { @@ -6479,7 +6479,7 @@ } // some unknown error condition (current_layer not in all_layers) if (oldpos == drawing.getNumLayers()) { return false; } - + if (oldpos != newpos) { // if our new position is below us, we need to insert before the node after newpos var refLayer = null; @@ -6495,19 +6495,19 @@ } svgcontent.insertBefore(drawing.current_layer, refLayer); addCommandToHistory(new MoveElementCommand(drawing.current_layer, oldNextSibling, svgcontent)); - + identifyLayers(); canvas.setCurrentLayer(drawing.getLayerName(newpos)); - + return true; } } - + return false; }; // Function: setLayerVisibility -// Sets the visibility of the layer. If the layer name is not valid, this function return +// Sets the visibility of the layer. If the layer name is not valid, this function return // false, otherwise it returns true. This is an undo-able action. // // Parameters: @@ -6526,17 +6526,17 @@ } else { return false; } - + if (layer == drawing.getCurrentLayer()) { clearSelection(); pathActions.clear(); } -// call("changed", [selected]); +// call("changed", [selected]); return true; }; // Function: moveSelectedToLayer -// Moves the selected elements to layername. If the name is not a valid layer name, then false +// Moves the selected elements to layername. If the name is not a valid layer name, then false // is returned. Otherwise it returns true. This is an undo-able action. // // Parameters: @@ -6555,9 +6555,9 @@ } } if (!layer) return false; - + var batchCmd = new BatchCommand("Move Elements to Layer"); - + // loop for each selected element and move it var selElems = selectedElements; var i = selElems.length; @@ -6570,9 +6570,9 @@ layer.appendChild(elem); batchCmd.addSubCommand(new MoveElementCommand(elem, oldNextSibling, oldLayer)); } - + addCommandToHistory(batchCmd); - + return true; }; @@ -6598,19 +6598,19 @@ prev.appendChild(ch); batchCmd.addSubCommand(new MoveElementCommand(ch, oldNextSibling, drawing.current_layer)); } - + // Remove current layer svgcontent.removeChild(drawing.current_layer); - + if(!skipHistory) { clearSelection(); identifyLayers(); call("changed", [svgcontent]); - + addCommandToHistory(batchCmd); } - + drawing.current_layer = prev; return batchCmd; } @@ -6622,7 +6622,7 @@ while($(svgcontent).children('g').length > 1) { batchCmd.addSubCommand(canvas.mergeLayer(true)); } - + clearSelection(); identifyLayers(); call("changed", [svgcontent]); @@ -6637,7 +6637,7 @@ if(len) { for(var i = 0; i < len; i++) { var elem = disabled_elems[i]; - + var orig = elData(elem, 'orig_opac'); if(orig !== 1) { elem.setAttribute('opacity', orig); @@ -6663,7 +6663,7 @@ // Edit inside this group current_group = elem; - + // Disable other elements $(elem).parentsUntil('#svgcontent').andSelf().siblings().each(function() { var opac = this.getAttribute('opacity') || 1; @@ -6695,7 +6695,7 @@ // create empty first layer canvas.createLayer("Layer 1"); - + // clear the undo stack canvas.undoMgr.resetUndoStack(); @@ -6729,10 +6729,10 @@ var getResolution = this.getResolution = function() { // var vb = svgcontent.getAttribute("viewBox").split(' '); // return {'w':vb[2], 'h':vb[3], 'zoom': current_zoom}; - + var width = svgcontent.getAttribute("width")/current_zoom; var height = svgcontent.getAttribute("height")/current_zoom; - + return { 'w': width, 'h': height, @@ -6789,11 +6789,11 @@ this.setGroupTitle = function(val) { var elem = selectedElements[0]; elem = $(elem).data('gsvg') || elem; - + var ts = $(elem).children('title'); - + var batchCmd = new BatchCommand("Set Label"); - + if(!val.length) { // Remove title element var tsNextSibling = ts.nextSibling; @@ -6829,9 +6829,9 @@ // newtitle - String with the new title this.setDocumentTitle = function(newtitle) { var childs = svgcontent.childNodes, doc_title = false, old_title = ''; - + var batchCmd = new BatchCommand("Change Image Title"); - + for (var i=0; i<childs.length; i++) { if(childs[i].nodeName == 'title') { doc_title = childs[i]; @@ -6842,8 +6842,8 @@ if(!doc_title) { doc_title = svgdoc.createElementNS(svgns, "title"); svgcontent.insertBefore(doc_title, svgcontent.firstChild); - } - + } + if(newtitle.length) { doc_title.textContent = newtitle; } else { @@ -6869,13 +6869,13 @@ // Function: setResolution // Changes the document's dimensions to the given size // -// Parameters: -// x - Number with the width of the new dimensions in user units. +// Parameters: +// x - Number with the width of the new dimensions in user units. // Can also be the string "fit" to indicate "fit to content" -// y - Number with the height of the new dimensions in user units. +// y - Number with the height of the new dimensions in user units. // // Returns: -// Boolean to indicate if resolution change was succesful. +// Boolean to indicate if resolution change was succesful. // It will fail on "fit to content" option with no content to fit to. this.setResolution = function(x, y) { var res = getResolution(); @@ -6885,7 +6885,7 @@ if(x == 'fit') { // Get bounding box var bbox = getStrokedBBox(); - + if(bbox) { batchCmd = new BatchCommand("Fit Canvas to Content"); var visEls = getVisibleElements(); @@ -6895,11 +6895,11 @@ dx.push(bbox.x*-1); dy.push(bbox.y*-1); }); - + var cmd = canvas.moveSelectedElements(dx, dy, true); batchCmd.addSubCommand(cmd); clearSelection(); - + x = Math.round(bbox.width); y = Math.round(bbox.height); } else { @@ -6913,17 +6913,17 @@ x = convertToNum('width', x); y = convertToNum('height', y); - + svgcontent.setAttribute('width', x); svgcontent.setAttribute('height', y); - + this.contentW = x; this.contentH = y; batchCmd.addSubCommand(new ChangeElementCommand(svgcontent, {"width":w, "height":h})); svgcontent.setAttribute("viewBox", [0, 0, x/current_zoom, y/current_zoom].join(' ')); batchCmd.addSubCommand(new ChangeElementCommand(svgcontent, {"viewBox": ["0 0", w, h].join(' ')})); - + addCommandToHistory(batchCmd); background = document.getElementById("canvas_background"); if (background) { @@ -6946,9 +6946,9 @@ // Function: setBBoxZoom // Sets the zoom level on the canvas-side based on the given value -// +// // Parameters: -// val - Bounding box object to zoom to or string indicating zoom option +// val - Bounding box object to zoom to or string indicating zoom option // editor_w - Integer with the editor's workarea box's width // editor_h - Integer with the editor's workarea box's height this.setBBoxZoom = function(val, editor_w, editor_h) { @@ -6957,12 +6957,12 @@ var calcZoom = function(bb) { if(!bb) return false; var w_zoom = Math.round((editor_w / bb.width)*100 * spacer)/100; - var h_zoom = Math.round((editor_h / bb.height)*100 * spacer)/100; + var h_zoom = Math.round((editor_h / bb.height)*100 * spacer)/100; var zoomlevel = Math.min(w_zoom,h_zoom); canvas.setZoom(zoomlevel); return {'zoom': zoomlevel, 'bbox': bb}; } - + if(typeof val == 'object') { bb = val; if(bb.width == 0 || bb.height == 0) { @@ -7025,7 +7025,7 @@ // Parameters: // name - String with the new mode to change to this.setMode = function(name) { - + pathActions.clear(); textActions.clear(); $("#workarea").attr("class", name); @@ -7043,7 +7043,7 @@ // Function: setColor // Change the current stroke/fill color/gradient value -// +// // Parameters: // type - String indicating fill or stroke // val - The value to set the stroke attribute to @@ -7073,7 +7073,7 @@ if (!preventUndo) { changeSelectedAttribute(type, val, elems); call("changed", elems); - } else + } else changeSelectedAttributeNoUndo(type, val, elems); } } @@ -7147,22 +7147,22 @@ if (grad.getAttribute('x1') != og.getAttribute('x1') || grad.getAttribute('y1') != og.getAttribute('y1') || grad.getAttribute('x2') != og.getAttribute('x2') || - grad.getAttribute('y2') != og.getAttribute('y2')) + grad.getAttribute('y2') != og.getAttribute('y2')) { continue; } } else { var grad_attrs = $(grad).attr(rad_attrs); var og_attrs = $(og).attr(rad_attrs); - + var diff = false; $.each(rad_attrs, function(i, attr) { if(grad_attrs[attr] != og_attrs[attr]) diff = true; }); - + if(diff) continue; } - + // else could be a duplicate, iterate through stops var stops = grad.getElementsByTagNameNS(svgns, "stop"); var ostops = og.getElementsByTagNameNS(svgns, "stop"); @@ -7178,7 +7178,7 @@ if (stop.getAttribute('offset') != ostop.getAttribute('offset') || stop.getAttribute('stop-opacity') != ostop.getAttribute('stop-opacity') || - stop.getAttribute('stop-color') != ostop.getAttribute('stop-color')) + stop.getAttribute('stop-color') != ostop.getAttribute('stop-color')) { break; } @@ -7204,28 +7204,28 @@ var y1 = grad.getAttribute('y1') || 0; var x2 = grad.getAttribute('x2') || 1; var y2 = grad.getAttribute('y2') || 0; - + // Convert to USOU points x1 = (bb.width * x1) + bb.x; y1 = (bb.height * y1) + bb.y; x2 = (bb.width * x2) + bb.x; y2 = (bb.height * y2) + bb.y; - + // Transform those points var pt1 = transformPoint(x1, y1, m); var pt2 = transformPoint(x2, y2, m); - + // Convert back to BB points var g_coords = {}; - + g_coords.x1 = (pt1.x - bb.x) / bb.width; g_coords.y1 = (pt1.y - bb.y) / bb.height; g_coords.x2 = (pt2.x - bb.x) / bb.width; g_coords.y2 = (pt2.y - bb.y) / bb.height; - + var newgrad = grad.cloneNode(true); $(newgrad).attr(g_coords); - + newgrad.id = getNextId(); findDefs().appendChild(newgrad); elem.setAttribute(type, 'url(#' + newgrad.id + ')'); @@ -7237,7 +7237,7 @@ // Function: setPaint // Set a color/gradient to a fill/stroke // -// Parameters: +// Parameters: // type - String with "fill" or "stroke" // paint - The jGraduate paint object to apply this.setPaint = function(type, paint) { @@ -7248,13 +7248,13 @@ cur_properties[type + '_paint'] = p; switch ( p.type ) { case "solidColor": - + if (p.solidColor != "none" && p.solidColor != "#none") { this.setColor(type, "#"+p.solidColor) } else { this.setColor(type, "none"); - var selector = (type == "fill") ? "#fill_color rect" : "#stroke_color rect" + var selector = (type == "fill") ? "#fill_color rect" : "#stroke_color rect" document.querySelector(selector).setAttribute('fill', 'none'); } break; @@ -7273,7 +7273,7 @@ // // make a copy // var p = new $.jGraduate.Paint(p); // this.setStrokeOpacity(p.alpha/100); -// +// // // now set the current paint object // cur_properties.stroke_paint = p; // switch ( p.type ) { @@ -7283,17 +7283,17 @@ // case "linearGradient" // case "radialGradient" // canvas.strokeGrad = p[p.type]; -// setGradient(type); +// setGradient(type); // default: // // console.log("none!"); // } // }; -// +// // this.setFillPaint = function(p, addGrad) { // // make a copy // var p = new $.jGraduate.Paint(p); // this.setFillOpacity(p.alpha/100, true); -// +// // // now set the current paint object // cur_properties.fill_paint = p; // if (p.type == "solidColor") { @@ -7301,11 +7301,11 @@ // } // else if(p.type == "linearGradient") { // canvas.fillGrad = p.linearGradient; -// if(addGrad) setGradient(); +// if(addGrad) setGradient(); // } // else if(p.type == "radialGradient") { // canvas.fillGrad = p.radialGradient; -// if(addGrad) setGradient(); +// if(addGrad) setGradient(); // } // else { // // console.log("none!"); @@ -7330,7 +7330,7 @@ return; } cur_properties.stroke_width = val; - + var elems = []; var i = selectedElements.length; while (i--) { @@ -7338,10 +7338,10 @@ if (elem) { if (elem.tagName == "g") svgedit.utilities.walkTree(elem, function(e){if(e.nodeName!="g") elems.push(e);}); - else + else elems.push(elem); } - } + } if (elems.length > 0) { changeSelectedAttribute("stroke-width", val, elems); call("changed", selectedElements); @@ -7363,10 +7363,10 @@ if (elem) { if (elem.tagName == "g") svgedit.utilities.walkTree(elem, function(e){if(e.nodeName!="g") elems.push(e);}); - else + else elems.push(elem); } - } + } if (elems.length > 0) { changeSelectedAttribute(attr, val, elems); call("changed", selectedElements); @@ -7427,7 +7427,7 @@ this.getBlur = function(elem) { var val = 0; // var elem = selectedElements[0]; - + if(elem) { var filter_url = elem.getAttribute('filter'); if(filter_url) { @@ -7444,7 +7444,7 @@ var cur_command = null; var filter = null; var filterHidden = false; - + // Function: setBlurNoUndo // Sets the stdDeviation blur value on the selected element without being undoable // @@ -7473,12 +7473,12 @@ canvas.setBlurOffsets(filter, val); } } - + function finishChange() { var bCmd = canvas.undoMgr.finishUndoableChange(); cur_command.addSubCommand(bCmd); addCommandToHistory(cur_command); - cur_command = null; + cur_command = null; filter = null; } @@ -7509,7 +7509,7 @@ } } - // Function: setBlur + // Function: setBlur // Adds/updates the blur filter to the selected element // // Parameters: @@ -7520,16 +7520,16 @@ finishChange(); return; } - + // Looks for associated blur, creates one if not found var elem = selectedElements[0]; var elem_id = elem.id; filter = getElem(elem_id + '_blur'); - + val -= 0; - + var batchCmd = new BatchCommand(); - + // Blur found! if(filter) { if(val === 0) { @@ -7543,33 +7543,33 @@ "stdDeviation": val } }); - + filter = addSvgElementFromJson({ "element": "filter", "attr": { "id": elem_id + '_blur' } }); - + filter.appendChild(newblur); findDefs().appendChild(filter); - + batchCmd.addSubCommand(new InsertElementCommand(filter)); } var changes = {filter: elem.getAttribute('filter')}; - + if(val === 0) { elem.removeAttribute("filter"); batchCmd.addSubCommand(new ChangeElementCommand(elem, changes)); return; } else { changeSelectedAttribute("filter", 'url(#' + elem_id + '_blur)'); - + batchCmd.addSubCommand(new ChangeElementCommand(elem, changes)); - + canvas.setBlurOffsets(filter, val); } - + cur_command = batchCmd; canvas.undoMgr.beginUndoableChange("stdDeviation", [filter?filter.firstChild:null]); if(complete) { @@ -7710,18 +7710,18 @@ // Function: setImageURL // Sets the new image URL for the selected image element. Updates its size if // a new URL is given -// +// // Parameters: // val - String with the image URL/path this.setImageURL = function(val) { var elem = selectedElements[0]; if(!elem) return; - + var attrs = $(elem).attr(['width', 'height']); var setsize = (!attrs.width || !attrs.height); var cur_href = getHref(elem); - + // Do nothing if no URL change or size change if(cur_href !== val) { setsize = true; @@ -7737,14 +7737,14 @@ if(setsize) { $(new Image()).load(function() { var changes = $(elem).attr(['width', 'height']); - + $(elem).attr({ width: this.width, height: this.height }); - + selectorManager.requestSelector(elem).resize(); - + batchCmd.addSubCommand(new ChangeElementCommand(elem, changes)); addCommandToHistory(batchCmd); call("changed", [elem]); @@ -7756,7 +7756,7 @@ // Function: setLinkURL // Sets the new link URL for the selected anchor element. -// +// // Parameters: // val - String with the link URL/path this.setLinkURL = function(val) { @@ -7771,11 +7771,11 @@ return; } } - + var cur_href = getHref(elem); - + if(cur_href === val) return; - + var batchCmd = new BatchCommand("Change Link URL"); setHref(elem, val); @@ -7789,14 +7789,14 @@ // Function elementAreSame // Checks if all the selected Elements are the same type -// +// // Parameters: // None this.elementsAreSame = function(elements) { if (!elements.length || elements[0] == null) return null else { - var isSameElement = function(el) { + var isSameElement = function(el) { if (el && selectedElements[0]) return (el.nodeName == selectedElements[0].nodeName); else return null; @@ -7808,7 +7808,7 @@ // Function: setRectRadius // Sets the rx & ry values to the selected rect element to change its corner radius -// +// // Parameters: // val - The new radius this.setRectRadius = function(val) { @@ -7830,7 +7830,7 @@ // Wraps the selected element(s) in an anchor element or converts group to one this.makeHyperlink = function(url) { canvas.groupSelectedElements('a', url); - + // TODO: If element is a single "g", convert to "a" // if(selectedElements.length > 1 && selectedElements[1]) { @@ -7844,7 +7844,7 @@ // Group: Element manipulation // Function: setSegType -// Sets the new segment type to the selected segment(s). +// Sets the new segment type to the selected segment(s). // // Parameters: // new_type - Integer with the new segment type @@ -7857,7 +7857,7 @@ // Function: convertToPath // Convert selected element to a path, or get the BBox of an element-as-path // -// Parameters: +// Parameters: // elem - The DOM element to be converted // getBBox - Boolean on whether or not to only return the path's BBox // @@ -7872,11 +7872,11 @@ }); return; } - + if(!getBBox) { var batchCmd = new BatchCommand("Convert element to Path"); } - + var attrs = getBBox?{}:{ "fill": cur_shape.fill, "fill-opacity": cur_shape.fill_opacity, @@ -7889,7 +7889,7 @@ "opacity": cur_shape.opacity, "visibility":"hidden" }; - + // any attribute on the element not covered by the above // TODO: make this list global so that we can properly maintain it // TODO: what about @transform, @clip-rule, @fill-rule, etc? @@ -7898,17 +7898,17 @@ attrs[this] = elem.getAttribute(this); } }); - + var path = addSvgElementFromJson({ "element": "path", "attr": attrs }); - + var eltrans = elem.getAttribute("transform"); if(eltrans) { path.setAttribute("transform",eltrans); } - + var id = elem.id; var parent = elem.parentNode; if(elem.nextSibling) { @@ -7916,9 +7916,9 @@ } else { parent.appendChild(path); } - + var d = ''; - + var joinSegs = function(segs) { $.each(segs, function(j, seg) { var l = seg[0], pts = seg[1]; @@ -7940,7 +7940,7 @@ if(elem.tagName == 'circle') { rx = ry = $(elem).attr('r'); } - + joinSegs([ ['M',[(cx-rx),(cy)]], ['C',[(cx-rx),(cy-ry/num), (cx-rx/num),(cy-ry), (cx),(cy-ry)]], @@ -7997,14 +7997,14 @@ path.parentNode.removeChild(path); break; } - + if(d) { path.setAttribute('d',d); } - + if(!getBBox) { // Replace the current element with the converted one - + // Reorient if it has a matrix if(eltrans) { var tlist = getTransformList(path); @@ -8012,7 +8012,7 @@ pathActions.resetOrientation(path); } } - + var nextSibling = elem.nextSibling; batchCmd.addSubCommand(new RemoveElementCommand(elem, nextSibling, parent)); batchCmd.addSubCommand(new InsertElementCommand(path)); @@ -8022,9 +8022,9 @@ path.setAttribute('id', id); path.removeAttribute("visibility"); addToSelection([path], true); - + addCommandToHistory(batchCmd); - + } else { // Get the correct BBox of the new path, then discard it pathActions.resetOrientation(path); @@ -8042,8 +8042,8 @@ // Function: changeSelectedAttributeNoUndo // This function makes the changes to the elements. It does not add the change -// to the history stack. -// +// to the history stack. +// // Parameters: // attr - String with the attribute name // newValue - String or number with the new attribute value @@ -8099,7 +8099,7 @@ },0); } // if this element was rotated, and we changed the position of this element - // we need to update the rotational transform attribute + // we need to update the rotational transform attribute var angle = getRotationAngle(elem); if (angle != 0 && attr != "transform") { var tlist = getTransformList(elem); @@ -8130,7 +8130,7 @@ // If you want to change all selectedElements, ignore the elems argument. // If you want to change only a subset of selectedElements, then send the // subset to this function in the elems argument. -// +// // Parameters: // attr - String with the attribute name // newValue - String or number with the new attribute value @@ -8143,13 +8143,13 @@ changeSelectedAttributeNoUndo(attr, val, elems); var batchCmd = canvas.undoMgr.finishUndoableChange(); - if (!batchCmd.isEmpty()) { + if (!batchCmd.isEmpty()) { addCommandToHistory(batchCmd); } }; // Function: deleteSelectedElements -// Removes all selected elements from the DOM and adds the change to the +// Removes all selected elements from the DOM and adds the change to the // history stack this.deleteSelectedElements = function() { var batchCmd = new BatchCommand("Delete Elements"); @@ -8161,19 +8161,19 @@ var parent = selected.parentNode; var t = selected; - + // this will unselect the element and remove the selectedOutline selectorManager.releaseSelector(t); - + // Remove the path if present. svgedit.path.removePath_(t.id); - + // Get the parent if it's a single-child anchor if(parent.tagName === 'a' && parent.childNodes.length === 1) { t = parent; parent = parent.parentNode; } - + var nextSibling = t.nextSibling; var elem = parent.removeChild(t); selectedCopy.push(selected); //for the copy @@ -8186,7 +8186,7 @@ }; // Function: cutSelectedElements -// Removes all selected elements from the DOM and adds the change to the +// Removes all selected elements from the DOM and adds the change to the // history stack. Remembers removed elements on the clipboard // TODO: Combine similar code with deleteSelectedElements @@ -8216,7 +8216,7 @@ if (!batchCmd.isEmpty()) addCommandToHistory(batchCmd); call("changed", selectedCopy); clearSelection(); - + canvas.clipBoard = selectedCopy; }; @@ -8230,10 +8230,10 @@ var cb = canvas.clipBoard; var len = cb.length; if(!len) return; - + var pasted = []; var batchCmd = new BatchCommand('Paste elements'); - + // Move elements to lastClickPoint while (len--) { @@ -8249,9 +8249,9 @@ } svgCanvas.clearSelection(); setTimeout(function(){selectOnly(pasted)},100); - - + + addCommandToHistory(batchCmd); call("changed", pasted); } @@ -8259,12 +8259,12 @@ // Function: groupSelectedElements // Wraps all the selected elements in a group (g) element -// Parameters: +// Parameters: // type - type of element to group into, defaults to <g> this.groupSelectedElements = function(type) { if(!type) type = 'g'; var cmd_str = ''; - + switch ( type ) { case "a": cmd_str = "Make hyperlink"; @@ -8278,9 +8278,9 @@ cmd_str = "Group Elements"; break; } - + var batchCmd = new BatchCommand(cmd_str); - + // create and insert the group element var g = addSvgElementFromJson({ "element": type, @@ -8292,24 +8292,24 @@ setHref(g, url); } batchCmd.addSubCommand(new InsertElementCommand(g)); - + // now move all children into the group var i = selectedElements.length; while (i--) { var elem = selectedElements[i]; if (elem == null) continue; - + if (elem.parentNode.tagName === 'a' && elem.parentNode.childNodes.length === 1) { elem = elem.parentNode; } - + var oldNextSibling = elem.nextSibling; var oldParent = elem.parentNode; g.appendChild(elem); - batchCmd.addSubCommand(new MoveElementCommand(elem, oldNextSibling, oldParent)); + batchCmd.addSubCommand(new MoveElementCommand(elem, oldNextSibling, oldParent)); } if (!batchCmd.isEmpty()) addCommandToHistory(batchCmd); - + // update selection selectOnly([g], true); }; @@ -8326,27 +8326,27 @@ var glist = getTransformList(g); var m = transformListToTransform(glist).matrix; - + var batchCmd = new BatchCommand("Push group properties"); // TODO: get all fill/stroke properties from the group that we are about to destroy - // "fill", "fill-opacity", "fill-rule", "stroke", "stroke-dasharray", "stroke-dashoffset", - // "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", + // "fill", "fill-opacity", "fill-rule", "stroke", "stroke-dasharray", "stroke-dashoffset", + // "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", // "stroke-width" // and then for each child, if they do not have the attribute (or the value is 'inherit') // then set the child's attribute - + var i = 0; var gangle = getRotationAngle(g); - + var gattrs = $(g).attr(['filter', 'opacity']); var gfilter, gblur; - + for(var i = 0; i < len; i++) { var elem = children[i]; - + if(elem.nodeType !== 1) continue; - + if(gattrs.opacity !== null && gattrs.opacity !== 1) { var c_opac = elem.getAttribute('opacity') || 1; var new_opac = Math.round((elem.getAttribute('opacity') || 1) * gattrs.opacity * 100)/100; @@ -8363,7 +8363,7 @@ } else if(cblur === 0) { cblur = gblur; } - + // If child has no current filter, get group's filter or clone it. if(!orig_cblur) { // Set group's filter to use first child's ID @@ -8379,28 +8379,28 @@ } // Change this in future for different filters - var suffix = (gfilter.firstChild.tagName === 'feGaussianBlur')?'blur':'filter'; + var suffix = (gfilter.firstChild.tagName === 'feGaussianBlur')?'blur':'filter'; gfilter.id = elem.id + '_' + suffix; changeSelectedAttribute('filter', 'url(#' + gfilter.id + ')', [elem]); - - // Update blur value + + // Update blur value if(cblur) { changeSelectedAttribute('stdDeviation', cblur, [gfilter.firstChild]); canvas.setBlurOffsets(gfilter, cblur); } } - + var chtlist = getTransformList(elem); // Don't process gradient transforms if(~elem.tagName.indexOf('Gradient')) chtlist = null; - + // Hopefully not a problem to add this. Necessary for elements like <desc/> if(!chtlist) continue; - + // Apparently <defs> can get get a transformlist, but we don't want it to have one! if(elem.tagName === 'defs') continue; - + if (glist.numberOfItems) { // TODO: if the group's transform is just a rotate, we can always transfer the // rotate() down to the children (collapsing consecutive rotates and factoring @@ -8408,43 +8408,43 @@ if (gangle && glist.numberOfItems == 1) { // [Rg] [Rc] [Mc] // we want [Tr] [Rc2] [Mc] where: - // - [Rc2] is at the child's current center but has the + // - [Rc2] is at the child's current center but has the // sum of the group and child's rotation angles - // - [Tr] is the equivalent translation that this child + // - [Tr] is the equivalent translation that this child // undergoes if the group wasn't there - + // [Tr] = [Rg] [Rc] [Rc2_inv] - + // get group's rotation matrix (Rg) var rgm = glist.getItem(0).matrix; - + // get child's rotation matrix (Rc) var rcm = svgroot.createSVGMatrix(); var cangle = getRotationAngle(elem); if (cangle) { rcm = chtlist.getItem(0).matrix; } - + // get child's old center of rotation var cbox = svgedit.utilities.getBBox(elem); var ceqm = transformListToTransform(chtlist).matrix; var coldc = transformPoint(cbox.x+cbox.width/2, cbox.y+cbox.height/2,ceqm); - + // sum group and child's angles var sangle = gangle + cangle; - + // get child's rotation at the old center (Rc2_inv) var r2 = svgroot.createSVGTransform(); r2.setRotate(sangle, coldc.x, coldc.y); - + // calculate equivalent translate var trm = matrixMultiply(rgm, rcm, r2.matrix.inverse()); - + // set up tlist if (cangle) { chtlist.removeItem(0); } - + if (sangle) { if(chtlist.numberOfItems) { chtlist.insertItemBefore(r2, 0); @@ -8464,9 +8464,9 @@ } } else { // more complicated than just a rotate - + // transfer the group's transform down to each child and then - // call recalculateDimensions() + // call recalculateDimensions() var oldxform = elem.getAttribute("transform"); var changes = {}; changes["transform"] = oldxform ? oldxform : ""; @@ -8486,16 +8486,16 @@ } } - + // remove transform and make it undo-able if (xform) { var changes = {}; changes["transform"] = xform; g.setAttribute("transform", ""); - g.removeAttribute("transform"); + g.removeAttribute("transform"); batchCmd.addSubCommand(new ChangeElementCommand(g, changes)); } - + if (undoable && !batchCmd.isEmpty()) { return batchCmd; } @@ -8523,25 +8523,25 @@ if(parents_a.length) { g = parents_a[0]; } - + // Look for parent "a" if (g.tagName === "g" || g.tagName === "a") { - + var batchCmd = new BatchCommand("Ungroup Elements"); var cmd = pushGroupProperties(g, true); if(cmd) batchCmd.addSubCommand(cmd); - + var parent = g.parentNode; var anchor = g.nextSibling; var children = new Array(g.childNodes.length); - + var i = 0; - + while (g.firstChild) { var elem = g.firstChild; var oldNextSibling = elem.nextSibling; var oldParent = elem.parentNode; - + // Remove child title elements if(elem.tagName === 'title') { var nextSibling = elem.nextSibling; @@ -8549,21 +8549,21 @@ oldParent.removeChild(elem); continue; } - + children[i++] = elem = parent.insertBefore(elem, anchor); batchCmd.addSubCommand(new MoveElementCommand(elem, oldNextSibling, oldParent)); } - // remove the group from the selection + // remove the group from the selection clearSelection(); - + // delete the group element (but make undo-able) var gNextSibling = g.nextSibling; g = parent.removeChild(g); batchCmd.addSubCommand(new RemoveElementCommand(g, gNextSibling, parent)); if (!batchCmd.isEmpty()) addCommandToHistory(batchCmd); - + // update selection addToSelection(children); } @@ -8591,7 +8591,7 @@ }; // Function: moveToBottomSelectedElement -// Repositions the selected element to the top in the DOM to appear under +// Repositions the selected element to the top in the DOM to appear under // other elements this.moveToBottomSelectedElement = function() { var selected = selectedElements.filter(Boolean).reverse(); @@ -8624,7 +8624,7 @@ // Moves the select element up or down the stack, based on the visibly // intersecting elements // -// Parameters: +// Parameters: // dir - String that's either 'Up' or 'Down' this.moveUpDownSelected = function(dir) { var selected = selectedElements.filter(Boolean); @@ -8648,7 +8648,7 @@ return false; }); if(!closest) return; - + var t = selected; var oldParent = t.parentNode; var oldNextSibling = t.nextSibling; @@ -8664,7 +8664,7 @@ }; // Function: moveSelectedElements -// Moves selected elements on the X/Y axis +// Moves selected elements on the X/Y axis // // Parameters: // dx - Float with the distance to move on the x-axis @@ -8688,14 +8688,14 @@ if (selected != null) { // if (i==0) // selectedBBoxes[0] = svgedit.utilities.getBBox(selected); - + // var b = {}; // for(var j in selectedBBoxes[i]) b[j] = selectedBBoxes[i][j]; // selectedBBoxes[i] = b; - + var xform = svgroot.createSVGTransform(); var tlist = getTransformList(selected); - + // dx and dy could be arrays if (dx.constructor == Array) { // if (i==0) { @@ -8716,12 +8716,12 @@ } else { tlist.appendItem(xform); } - + var cmd = recalculateDimensions(selected); if (cmd) { batchCmd.addSubCommand(cmd); } - + selectorManager.requestSelector(selected).resize(); } } @@ -8734,7 +8734,7 @@ }; // Function: cloneSelectedElements -// Create deep DOM copies (clones) of all selected elements and move them slightly +// Create deep DOM copies (clones) of all selected elements and move them slightly // from their originals this.cloneSelectedElements = function(x,y, drag) { var batchCmd = new BatchCommand("Clone Elements"); @@ -8753,7 +8753,7 @@ clones = [] while (i--) { // clone each element and replace it within copiedElements - var elem = copiedElements[i] + var elem = copiedElements[i] var clone = copyElem(copiedElements[i]); var parent = (current_group || getCurrentDrawing().getCurrentLayer()) if (drag) { @@ -8769,7 +8769,7 @@ clones.push(clone) batchCmd.addSubCommand(new InsertElementCommand(clone)); } - + if (!batchCmd.isEmpty()) { addToSelection(copiedElements.reverse()); // Need to reverse for correct selection-adding if (!drag) this.moveSelectedElements(x,y,false); @@ -8783,7 +8783,7 @@ // // Parameters: // type - String with single character indicating the alignment type -// relative_to - String that must be one of the following: +// relative_to - String that must be one of the following: // "selected", "largest", "smallest", "page" this.alignSelectedElements = function(type, relative_to) { var bboxes = [], angles = []; @@ -8795,7 +8795,7 @@ if (selectedElements[i] == null) break; var elem = selectedElements[i]; bboxes[i] = getStrokedBBox([elem]); - + // now bbox is axis-aligned and handles rotation switch (relative_to) { case 'smallest': @@ -8874,13 +8874,13 @@ this.contentH = getResolution().h; // Function: updateCanvas -// Updates the editor canvas width/height/position after a zoom has occurred +// Updates the editor canvas width/height/position after a zoom has occurred // // Parameters: // w - Float with the new width // h - Float with the new height // -// Returns: +// Returns: // Object with the following values: // * x - The canvas' new x coordinate // * y - The canvas' new y coordinate @@ -8904,7 +8904,7 @@ 'y': y, "viewBox" : "0 0 " + this.contentW + " " + this.contentH }); - + assignAttributes(bg, { width: svgcontent.getAttribute('width'), height: svgcontent.getAttribute('height'), @@ -8919,9 +8919,9 @@ 'height': '100%' }); } - + selectorManager.selectorParentGroup.setAttribute("transform","translate(" + x + "," + y + ")"); - + return {x:x, y:y, old_x:old_x, old_y:old_y, d_x:x - old_x, d_y:y - old_y}; } @@ -8976,12 +8976,12 @@ num = 0; } else if(num < 0) { num = all_elems.length-1; - } + } elem = all_elems[num]; break; - } + } } - } + } selectOnly([elem], true); call("selected", selectedElements); } @@ -8989,7 +8989,7 @@ this.clear(); -// DEPRECATED: getPrivateMethods +// DEPRECATED: getPrivateMethods // Since all methods are/should be public somehow, this function should be removed // Being able to access private methods publicly seems wrong somehow, diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgtransformlist.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgtransformlist.js index 4980537..914bc2c 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgtransformlist.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgtransformlist.js @@ -57,12 +57,12 @@ // ************************************************************************************** -// SVGTransformList implementation for Webkit +// SVGTransformList implementation for Webkit // These methods do not currently raise any exceptions. // These methods also do not check that transforms are being inserted. This is basically // implementing as much of SVGTransformList that we need to get the job done. // -// interface SVGEditTransformList { +// interface SVGEditTransformList { // attribute unsigned long numberOfItems; // void clear ( ) // SVGTransform initialize ( in SVGTransform newItem ) @@ -93,7 +93,7 @@ // Transform attribute parser var str = this._elem.getAttribute("transform"); if(!str) return; - + // TODO: Add skew support in future var re = /\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/; var arr = []; @@ -119,7 +119,7 @@ var xform = svgroot.createSVGTransform(); var fname = 'set' + name.charAt(0).toUpperCase() + name.slice(1); var values = name=='matrix'?[mtx]:val_arr; - + if (name == 'scale' && values.length == 1) { values.push(values[0]); } else if (name == 'translate' && values.length == 1) { @@ -153,26 +153,26 @@ } } }; - + this.numberOfItems = 0; - this.clear = function() { + this.clear = function() { this.numberOfItems = 0; this._xforms = []; }; - + this.initialize = function(newItem) { this.numberOfItems = 1; this._removeFromOtherLists(newItem); this._xforms = [newItem]; }; - + this.getItem = function(index) { if (index < this.numberOfItems && index >= 0) { return this._xforms[index]; } throw {code: 1}; // DOMException with code=INDEX_SIZE_ERR }; - + this.insertItemBefore = function(newItem, index) { var retValue = null; if (index >= 0) { @@ -198,7 +198,7 @@ } return retValue; }; - + this.replaceItem = function(newItem, index) { var retValue = null; if (index < this.numberOfItems && index >= 0) { @@ -209,7 +209,7 @@ } return retValue; }; - + this.removeItem = function(index) { if (index < this.numberOfItems && index >= 0) { var retValue = this._xforms[index]; @@ -228,7 +228,7 @@ throw {code: 1}; // DOMException with code=INDEX_SIZE_ERR } }; - + this.appendItem = function(newItem) { this._removeFromOtherLists(newItem); this._xforms.push(newItem); @@ -288,4 +288,4 @@ }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgutils.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgutils.js index b297494..7ef4982 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgutils.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/svgutils.js @@ -58,15 +58,15 @@ svgedit.utilities.toXml = function(str) { return $('<p/>').text(str).html(); }; - + // Function: svgedit.utilities.fromXml -// Converts XML entities in a string to single characters. +// Converts XML entities in a string to single characters. // Example: "&" becomes "&" // // Parameters: // str - The string to be converted // -// Returns: +// Returns: // The converted string svgedit.utilities.fromXml = function(str) { return $('<p/>').html(str).text(); @@ -168,7 +168,7 @@ // else if (c > 127) { // if (c < 2048){ // output += String.fromCharCode((c >> 6) | 192); -// } +// } // else { // output += String.fromCharCode((c >> 12) | 224) + String.fromCharCode((c >> 6) & 63 | 128); // } @@ -178,7 +178,7 @@ // return output; // }, -// Function: svgedit.utilities.convertToXMLReferences +// Function: svgedit.utilities.convertToXMLReferences // Converts a string to use XML references svgedit.utilities.convertToXMLReferences = function(input) { var output = ''; @@ -205,8 +205,8 @@ try{ var dXML = (window.DOMParser)?new DOMParser():new ActiveXObject("Microsoft.XMLDOM"); dXML.async = false; - } catch(e){ - throw new Error("XML Parser could not be instantiated"); + } catch(e){ + throw new Error("XML Parser could not be instantiated"); }; try{ if(dXML.loadXML) out = (dXML.loadXML(sXML))?dXML:false; @@ -218,10 +218,10 @@ // Function: svgedit.utilities.bboxToObj // Converts a SVGRect into an object. -// +// // Parameters: // bbox - a SVGRect -// +// // Returns: // An object with properties names x, y, width, height. svgedit.utilities.bboxToObj = function(bbox) { @@ -267,7 +267,7 @@ }; // Function: svgedit.utilities.getUrlFromAttr -// Extracts the URL from the url(...) syntax of some attributes. +// Extracts the URL from the url(...) syntax of some attributes. // Three variants: // * <circle fill="url(someFile.svg#foo)" /> // * <circle fill="url('someFile.svg#foo')" /> @@ -275,11 +275,11 @@ // // Parameters: // attrVal - The attribute value as a string -// +// // Returns: // String with just the URL, like someFile.svg#foo svgedit.utilities.getUrlFromAttr = function(attrVal) { - if (attrVal) { + if (attrVal) { // url("#somegrad") if (attrVal.indexOf('url("') === 0) { return attrVal.substring(5,attrVal.indexOf('"',6)); @@ -332,7 +332,7 @@ // Get correct BBox for a path in Webkit // Converted from code found here: // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html -// +// // Parameters: // path - The path DOM element to get the BBox for // @@ -341,7 +341,7 @@ svgedit.utilities.getPathBBox = function(path) { var seglist = path.pathSegList; var tot = seglist.numberOfItems; - + var bounds = [[], []]; var start = seglist.getItem(0); var P0 = [start.x, start.y]; @@ -354,7 +354,7 @@ // Add actual points to limits bounds[0].push(P0[0]); bounds[1].push(P0[1]); - + if(seg.x1) { var P1 = [seg.x1, seg.y1], P2 = [seg.x2, seg.y2], @@ -363,7 +363,7 @@ for(var j=0; j < 2; j++) { var calc = function(t) { - return Math.pow(1-t,3) * P0[j] + return Math.pow(1-t,3) * P0[j] + 3 * Math.pow(1-t,2) * t * P1[j] + 3 * (1-t) * Math.pow(t,2) * P2[j] + Math.pow(t,3) * P3[j]; @@ -372,7 +372,7 @@ var b = 6 * P0[j] - 12 * P1[j] + 6 * P2[j]; var a = -3 * P0[j] + 9 * P1[j] - 9 * P2[j] + 3 * P3[j]; var c = 3 * P1[j] - 3 * P0[j]; - + if(a == 0) { if(b == 0) { continue; @@ -383,7 +383,7 @@ } continue; } - + var b2ac = Math.pow(b,2) - 4 * c * a; if(b2ac < 0) continue; var t1 = (-b + Math.sqrt(b2ac))/(2 * a); @@ -397,7 +397,7 @@ bounds[1].push(seg.y); } } - + var x = Math.min.apply(null, bounds[0]); var w = Math.max.apply(null, bounds[0]) - x; var y = Math.min.apply(null, bounds[1]); @@ -416,15 +416,15 @@ // Note that performance is currently terrible, so some way to improve would // be great. // -// Parameters: +// Parameters: // selected - Container or <use> DOM element function groupBBFix(selected) { if(svgedit.browser.supportsHVLineContainerBBox()) { - try { return selected.getBBox();} catch(e){} + try { return selected.getBBox();} catch(e){} } var ref = $.data(selected, 'ref'); var matched = null; - + if(ref) { var copy = $(ref).children().clone().attr('visibility', 'hidden'); $(svgroot_).append(copy); @@ -432,7 +432,7 @@ } else { matched = $(selected).find('line, path'); } - + var issue = false; if(matched.length) { matched.each(function() { @@ -467,7 +467,7 @@ if (elem.nodeType != 1) return null; var ret = null; var elname = selected.nodeName; - + switch ( elname ) { case 'text': if(selected.textContent === '') { @@ -494,7 +494,7 @@ if(elname === 'use') { ret = groupBBFix(selected, true); } - + if(elname === 'use') { if(!ret) ret = selected.getBBox(); //if(!svgedit.browser.isWebkit()) { @@ -506,8 +506,8 @@ // ret = bb; //} } else if(~visElems_arr.indexOf(elname)) { - try { ret = selected.getBBox();} - catch(e) { + try { ret = selected.getBBox();} + catch(e) { // Check if element is child of a foreignObject var fo = $(selected).closest("foreignObject"); if(fo.length) { @@ -522,7 +522,7 @@ } } } - + if(ret) { ret = svgedit.utilities.bboxToObj(ret); } @@ -570,7 +570,7 @@ // xpath lookup return domdoc_.evaluate( 'svg:svg[@id="svgroot"]//svg:*[@id="'+id+'"]', - domcontainer_, + domcontainer_, function() { return "http://www.w3.org/2000/svg"; }, 9, null).singleNodeValue; @@ -585,7 +585,7 @@ // Function: assignAttributes // Assigns multiple attributes to an element. // -// Parameters: +// Parameters: // node - DOM element to apply new attribute values to // attrs - Object with attribute keys/values // suspendLength - Optional integer of milliseconds to suspend redraw @@ -593,9 +593,9 @@ svgedit.utilities.assignAttributes = function(node, attrs, suspendLength, unitCheck) { for (var i in attrs) { - var ns = (i.substr(0,4) === "xml:" ? XMLNS : + var ns = (i.substr(0,4) === "xml:" ? XMLNS : i.substr(0,6) === "xlink:" ? XLINKNS : null); - + if(ns) { node.setAttributeNS(ns, i, attrs[i]); } else if(!unitCheck) { @@ -603,7 +603,7 @@ } else { svgedit.units.setUnitAttr(node, i, attrs[i]); } - + } }; @@ -626,15 +626,15 @@ 'rx':0, 'ry':0 } - + for(var attr in defaults) { var val = defaults[attr]; if(element.getAttribute(attr) == val) { element.removeAttribute(attr); } } - + }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/units.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/units.js index 32878ee..7c9eff5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/src/units.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/src/units.js @@ -99,7 +99,7 @@ // Function: svgedit.units.shortFloat // Rounds a given value to a float with number of digits defined in save_options // -// Parameters: +// Parameters: // val - The value as a String, Number or Array of two numbers to be rounded // // Returns: @@ -129,7 +129,7 @@ // Function: svgedit.units.setUnitAttr // Sets an element's attribute based on the unit in its current value. // -// Parameters: +// Parameters: // elem - DOM element to be changed // attr - String with the name of the attribute associated with the value // val - String with the attribute value to convert @@ -137,7 +137,7 @@ if(!isNaN(val)) { // New value is a number, so check currently used unit var old_val = elem.getAttribute(attr); - + // Enable this for alternate mode // if(old_val !== null && (isNaN(old_val) || elementContainer_.getBaseUnit() !== 'px')) { // // Old value was a number, so get unit, then convert @@ -161,7 +161,7 @@ // } // val = val / typeMap_[unit]; // } -// +// // val += unit; // } } @@ -204,7 +204,7 @@ }; // Function: svgedit.units.convertToNum -// Converts given values to numbers. Attributes must be supplied in +// Converts given values to numbers. Attributes must be supplied in // case a percentage is given // // Parameters: @@ -213,13 +213,13 @@ svgedit.units.convertToNum = function(attr, val) { // Return a number if that's what it already is if(!isNaN(val)) return val-0; - + if(val.substr(-1) === '%') { // Deal with percentage, depends on attribute var num = val.substr(0, val.length-1)/100; var width = elementContainer_.getWidth(); var height = elementContainer_.getHeight(); - + if(w_attrs.indexOf(attr) >= 0) { return num * width; } else if(h_attrs.indexOf(attr) >= 0) { @@ -238,7 +238,7 @@ // Function: svgedit.units.isValidUnit // Check if an attribute's value is in a valid format // -// Parameters: +// Parameters: // attr - String with the name of the attribute associated with the value // val - String with the attribute value to check svgedit.units.isValidUnit = function(attr, val, selectedElement) { @@ -273,9 +273,9 @@ } else { valid = true; } - + return valid; }; -})(); \ No newline at end of file +})(); diff --git a/web/public/SVGOrigin/Method-Draw-master/test/all_tests.html b/web/public/SVGOrigin/Method-Draw-master/test/all_tests.html index f2d1eef..053a4e5 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/all_tests.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/all_tests.html @@ -25,4 +25,4 @@ } }, 5000); </script> -</html> \ No newline at end of file +</html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/contextmenu_test.html b/web/public/SVGOrigin/Method-Draw-master/test/contextmenu_test.html index b7c2beb..ae7fe54 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/contextmenu_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/contextmenu_test.html @@ -1,7 +1,7 @@ <!DOCTYPE html> -<html> -<head> - <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> +<html> +<head> + <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> <script src='../editor/lib/jquery.js'></script> <script> // Mock for browser.js @@ -9,7 +9,7 @@ window.svgEditor = {ready:function(){}}; </script> <script type='text/javascript' src='../editor/lib/contextmenu.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // log function @@ -22,62 +22,62 @@ function tearDown(){ svgedit.contextmenu.resetCustomMenus(); } - + module('svgedit.contextmenu'); - + test('Test svgedit.contextmenu package', function() { expect(4); - + ok(svgedit.contextmenu,"contextmenu registered correctly"); ok(svgedit.contextmenu.add,"contextmenu.add registered correctly"); ok(svgedit.contextmenu.hasCustomHandler,"contextmenu hasCustomHandler registered correctly"); ok(svgedit.contextmenu.getCustomHandler,"contextmenu getCustomHandler registered correctly"); }); - + test('Test svgedit.contextmenu does not add invalid menu item', function() { expect(3); - + svgedit.contextmenu.add({id:"justanid"}); ok(!svgedit.contextmenu.hasCustomHandler("justanid"),"menu item with just an id is invalid"); - + svgedit.contextmenu.add({id:"idandlabel",label:"anicelabel"}); ok(!svgedit.contextmenu.hasCustomHandler("idandlabel"),"menu item with just an id and label is invalid"); - + svgedit.contextmenu.add({id:"idandlabel",label:"anicelabel",action:'notafunction'}); ok(!svgedit.contextmenu.hasCustomHandler("idandlabel"),"menu item with action that is not a function is invalid"); }); - + test('Test svgedit.contextmenu adds valid menu item', function() { expect(2); - + var validItem = {id:"valid",label:"anicelabel",action:function(){alert('testing')}}; svgedit.contextmenu.add(validItem); - + ok(svgedit.contextmenu.hasCustomHandler("valid"),"Valid menu item is added."); equals(svgedit.contextmenu.getCustomHandler("valid"),validItem.action,"Valid menu action is added."); tearDown(); }); - + test('Test svgedit.contextmenu rejects valid duplicate menu item id', function() { expect(1); - + var validItem1 = {id:"valid",label:"anicelabel",action:function(){alert('testing')}}; var validItem2 = {id:"valid",label:"anicelabel",action:function(){alert('testingtwice')}}; svgedit.contextmenu.add(validItem1); svgedit.contextmenu.add(validItem2); - + equals(svgedit.contextmenu.getCustomHandler("valid"),validItem1.action,"duplicate menu item is rejected."); tearDown(); }); - }); - </script> -</head> -<body> + }); + </script> +</head> +<body> <h1 id='qunit-header'>Unit Tests for contextmenu.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> <ol id='qunit-tests'> </ol> <div id='svgroot' style='visibility:hidden'></div> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/draw_test.html b/web/public/SVGOrigin/Method-Draw-master/test/draw_test.html index 258ac4b..005c90b 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/draw_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/draw_test.html @@ -6,7 +6,7 @@ <script type='text/javascript' src='../editor/src/browser.js'></script> <script type='text/javascript' src='../editor/src/svgutils.js'></script> <script type='text/javascript' src='../editor/src/draw.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // log function @@ -29,7 +29,7 @@ // Set up <svg> with nonce. var svg_n = document.createElementNS(SVGNS, 'svg'); svg_n.setAttributeNS(XMLNSNS, 'xmlns:se', SENS); - svg_n.setAttributeNS(SENS, 'se:nonce', NONCE); + svg_n.setAttributeNS(SENS, 'se:nonce', NONCE); var setupSvgWith3Layers = function(svgElem) { var layer1 = document.createElementNS(SVGNS, 'g'); @@ -50,24 +50,24 @@ layer3.appendChild(layer3_title); svgElem.appendChild(layer3); }; - + var cleanupSvg = function(svgElem) { while(svgElem.firstChild) {svgElem.removeChild(svgElem.firstChild);} }; test('Test draw module', function() { expect(4); - + ok(svgedit.draw); equals(typeof svgedit.draw, typeof {}); ok(svgedit.draw.Drawing); equals(typeof svgedit.draw.Drawing, typeof function(){}); }); - + test('Test document creation', function() { expect(3); - + try { var doc = new svgedit.draw.Drawing(); ok(false, 'Created drawing without a valid <svg> element'); @@ -93,19 +93,19 @@ doc = new svgedit.draw.Drawing(svg_n); equals(doc.getNonce(), NONCE); equals(doc.getSvgElem().getAttributeNS(SENS, 'nonce'), NONCE); - + doc.clearNonce(); ok(!doc.getNonce()); ok(!doc.getSvgElem().getAttributeNS(SENS, 'se:nonce')); - + doc.setNonce(NONCE); equals(doc.getNonce(), NONCE); equals(doc.getSvgElem().getAttributeNS(SENS, 'nonce'), NONCE); }); - + test('Test getId() and getNextId() without nonce', function() { expect(7); - + var elem2 = document.createElementNS(SVGNS, 'circle'); elem2.id = 'svg_2'; svg.appendChild(elem2); @@ -122,7 +122,7 @@ equals(doc.getNextId(), "svg_4"); equals(doc.getId(), "svg_4"); - + // clean out svg document cleanupSvg(svg); }); @@ -149,7 +149,7 @@ test('Test getId() and getNextId() with nonce', function() { expect(7); - + var prefix = "svg_" + NONCE; var elem2 = document.createElementNS(SVGNS, 'circle'); @@ -192,7 +192,7 @@ cleanupSvg(svg_n); }); - + test('Test releaseId()', function() { expect(6); @@ -205,14 +205,14 @@ ok(result); equals(doc.getNextId(), firstId); equals(doc.getNextId(), "svg_3"); - + ok(!doc.releaseId("bad-id")); ok(doc.releaseId(firstId)); ok(!doc.releaseId(firstId)); cleanupSvg(svg); }); - + test('Test getNumLayers', function() { expect(3); var drawing = new svgedit.draw.Drawing(svg); @@ -221,7 +221,7 @@ setupSvgWith3Layers(svg); drawing.identifyLayers(); - + equals(drawing.getNumLayers(), 3); cleanupSvg(svg); @@ -233,7 +233,7 @@ setupSvgWith3Layers(svg); var drawing = new svgedit.draw.Drawing(svg); drawing.identifyLayers(); - + equals(typeof drawing.hasLayer, typeof function() {}); ok(!drawing.hasLayer('invalid-layer')); @@ -243,12 +243,12 @@ cleanupSvg(svg); }); - + test('Test identifyLayers() with empty document', function() { expect(9); var drawing = new svgedit.draw.Drawing(svg); - + // By default, an empty document gets an empty group created. drawing.identifyLayers(); @@ -269,17 +269,17 @@ cleanupSvg(svg); }); - + test('Test identifyLayers() with some layers', function() { expect(5); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); equals(svg.childNodes.length, 3); - + drawing.identifyLayers(); - + equals(drawing.getNumLayers(), 3); equals(drawing.all_layers[0][1], svg.childNodes.item(0)); equals(drawing.all_layers[1][1], svg.childNodes.item(1)); @@ -290,19 +290,19 @@ test('Test identifyLayers() with some layers and orphans', function() { expect(10); - + setupSvgWith3Layers(svg); var orphan1 = document.createElementNS(SVGNS, 'rect'); var orphan2 = document.createElementNS(SVGNS, 'rect'); svg.appendChild(orphan1); svg.appendChild(orphan2); - + equals(svg.childNodes.length, 5); - + var drawing = new svgedit.draw.Drawing(svg); drawing.identifyLayers(); - + equals(drawing.getNumLayers(), 4); equals(drawing.all_layers[0][1], svg.childNodes.item(0)); equals(drawing.all_layers[1][1], svg.childNodes.item(1)); @@ -320,12 +320,12 @@ test('Test getLayerName()', function() { expect(4); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + equals(drawing.getNumLayers(), 3); equals(drawing.getLayerName(0), LAYER1); equals(drawing.getLayerName(1), LAYER2); @@ -336,7 +336,7 @@ test('Test getCurrentLayer()', function() { expect(4); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); @@ -349,14 +349,14 @@ test('Test setCurrentLayer() and getCurrentLayerName()', function() { expect(6); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); ok(drawing.setCurrentLayer); equals(typeof drawing.setCurrentLayer, typeof function(){}); - + drawing.setCurrentLayer(LAYER2); equals(drawing.getCurrentLayerName(LAYER2), LAYER2); equals(drawing.getCurrentLayer(), drawing.all_layers[1][1]); @@ -367,50 +367,50 @@ cleanupSvg(svg); }); - + test('Test createLayer()', function() { expect(6); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + ok(drawing.createLayer); equals(typeof drawing.createLayer, typeof function(){}); - + var NEW_LAYER_NAME = 'Layer A'; var layer_g = drawing.createLayer(NEW_LAYER_NAME); equals(4, drawing.getNumLayers()); equals(layer_g, drawing.getCurrentLayer()); equals(NEW_LAYER_NAME, drawing.getCurrentLayerName()); equals(NEW_LAYER_NAME, drawing.getLayerName(3)); - + cleanupSvg(svg); }); - + test('Test getLayerVisibility()', function() { expect(5); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + ok(drawing.getLayerVisibility); equals(typeof drawing.getLayerVisibility, typeof function(){}); ok(drawing.getLayerVisibility(LAYER1)); ok(drawing.getLayerVisibility(LAYER2)); ok(drawing.getLayerVisibility(LAYER3)); - + cleanupSvg(svg); }); test('Test setLayerVisibility()', function() { expect(6); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + ok(drawing.setLayerVisibility); equals(typeof drawing.setLayerVisibility, typeof function(){}); @@ -421,36 +421,36 @@ ok(!drawing.getLayerVisibility(LAYER1)); ok(drawing.getLayerVisibility(LAYER2)); ok(!drawing.getLayerVisibility(LAYER3)); - + drawing.setLayerVisibility(LAYER3, 'test-string'); - ok(!drawing.getLayerVisibility(LAYER3)); - + ok(!drawing.getLayerVisibility(LAYER3)); + cleanupSvg(svg); }); test('Test getLayerOpacity()', function() { expect(5); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + ok(drawing.getLayerOpacity); equals(typeof drawing.getLayerOpacity, typeof function(){}); ok(drawing.getLayerOpacity(LAYER1) == 1.0); ok(drawing.getLayerOpacity(LAYER2) == 1.0); ok(drawing.getLayerOpacity(LAYER3) == 1.0); - + cleanupSvg(svg); }); test('Test setLayerOpacity()', function() { expect(6); - + var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + ok(drawing.setLayerOpacity); equals(typeof drawing.setLayerOpacity, typeof function(){}); @@ -465,30 +465,30 @@ drawing.setLayerOpacity(LAYER3, 100); ok(drawing.getLayerOpacity(LAYER3) == 1.0); - + cleanupSvg(svg); }); - + test('Test deleteCurrentLayer()', function() { expect(6); var drawing = new svgedit.draw.Drawing(svg); setupSvgWith3Layers(svg); drawing.identifyLayers(); - + drawing.setCurrentLayer(LAYER2); var curLayer = drawing.getCurrentLayer(); equals(curLayer, drawing.all_layers[1][1]); var deletedLayer = drawing.deleteCurrentLayer(); - + equals(curLayer, deletedLayer); equals(2, drawing.getNumLayers()); equals(LAYER1, drawing.all_layers[0][0]); equals(LAYER3, drawing.all_layers[1][0]); equals(drawing.getCurrentLayer(), drawing.all_layers[1][1]); }); - + test('Test svgedit.draw.randomizeIds()', function() { expect(9); @@ -496,7 +496,7 @@ // if there is a nonce. var drawing = new svgedit.draw.Drawing(svg_n.cloneNode(true)); ok(!!drawing.getNonce()); - + drawing = new svgedit.draw.Drawing(svg.cloneNode(true)); ok(!drawing.getNonce()); @@ -519,15 +519,15 @@ drawing = new svgedit.draw.Drawing(svg.cloneNode(true)); ok(!drawing.getNonce()); - + drawing = new svgedit.draw.Drawing(svg_n.cloneNode(true)); ok(!drawing.getNonce()); }); }); </script> -</head> -<body> +</head> +<body> <h1 id='qunit-header'>Unit Tests for draw.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> @@ -535,5 +535,5 @@ </ol> <div id='anchor' style='visibility:hidden'> </div> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/history_test.html b/web/public/SVGOrigin/Method-Draw-master/test/history_test.html index 4fd29fe..e21f7f7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/history_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/history_test.html @@ -4,7 +4,7 @@ <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> <script src='../editor/lib/jquery.js'></script> <script type='text/javascript' src='../editor/src/history.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // TODO(codedread): Write tests for handling history events. @@ -54,7 +54,7 @@ test('Test svgedit.history package', function() { expect(13); - + ok(svgedit.history); ok(svgedit.history.MoveElementCommand); ok(svgedit.history.InsertElementCommand); @@ -69,11 +69,11 @@ equals(typeof svgedit.history.BatchCommand, typeof function(){}); equals(typeof svgedit.history.UndoManager, typeof function(){}); }); - + test('Test UndoManager methods', function() { expect(14); setUp(); - + ok(undoMgr); ok(undoMgr.addCommandToHistory); ok(undoMgr.getUndoStackSize); @@ -89,13 +89,13 @@ equals(typeof undoMgr.resetUndoStack, typeof function(){}); equals(typeof undoMgr.getNextUndoCommandText, typeof function(){}); equals(typeof undoMgr.getNextRedoCommandText, typeof function(){}); - + tearDown(); }); - + test('Test UndoManager.addCommandToHistory() function', function() { expect(3); - + setUp(); equals(undoMgr.getUndoStackSize(), 0); @@ -106,10 +106,10 @@ tearDown(); }); - + test('Test UndoManager.getUndoStackSize() and getRedoStackSize() functions', function() { expect(18); - + setUp(); undoMgr.addCommandToHistory(new MockCommand()); @@ -118,7 +118,7 @@ equals(undoMgr.getUndoStackSize(), 3); equals(undoMgr.getRedoStackSize(), 0); - + undoMgr.undo(); equals(undoMgr.getUndoStackSize(), 2); equals(undoMgr.getRedoStackSize(), 1); @@ -150,28 +150,28 @@ undoMgr.redo(); equals(undoMgr.getUndoStackSize(), 3); equals(undoMgr.getRedoStackSize(), 0); - + tearDown(); }); - + test('Test UndoManager.resetUndoStackSize() function', function() { expect(4); - + setUp(); undoMgr.addCommandToHistory(new MockCommand()); undoMgr.addCommandToHistory(new MockCommand()); undoMgr.addCommandToHistory(new MockCommand()); undoMgr.undo(); - + equals(undoMgr.getUndoStackSize(), 2); equals(undoMgr.getRedoStackSize(), 1); - + undoMgr.resetUndoStack(); equals(undoMgr.getUndoStackSize(), 0); equals(undoMgr.getRedoStackSize(), 0); - + tearDown(); }); @@ -277,7 +277,7 @@ undoMgr.undo(); undoMgr.undo(); equals(lastCalled, 'cmd2.unapply'); - + undoMgr.undo(); equals(lastCalled, 'cmd1.unapply'); lastCalled = null; @@ -287,7 +287,7 @@ undoMgr.redo(); equals(lastCalled, 'cmd1.apply'); - + undoMgr.redo(); equals(lastCalled, 'cmd2.apply'); @@ -513,7 +513,7 @@ var line = document.createElementNS(svgns,'line'); line.setAttributeNS(null, 'class', 'newClass'); change = new svgedit.history.ChangeElementCommand(line,{class:'oldClass'}); - + ok(change.unapply); ok(change.apply); equals(typeof change.unapply, typeof function(){}); @@ -524,7 +524,7 @@ change.apply(); equals(line.getAttributeNS(null, 'class'), 'newClass'); - + tearDown(); }); @@ -571,8 +571,8 @@ }); </script> -</head> -<body> +</head> +<body> <h1 id='qunit-header'>Unit Tests for history.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> @@ -587,5 +587,5 @@ <div id='div5'></div> </div> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/math_test.html b/web/public/SVGOrigin/Method-Draw-master/test/math_test.html index 60bad07..4008290 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/math_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/math_test.html @@ -21,7 +21,7 @@ test('Test svgedit.math package', function() { expect(7); - + ok(svgedit.math); ok(svgedit.math.transformPoint); ok(svgedit.math.isIdentity); @@ -42,19 +42,19 @@ var pt = transformPoint(100, 200, m); equals(pt.x, 100); equals(pt.y, 200); - + m.e = 300; m.f = 400; pt = transformPoint(100, 200, m); equals(pt.x, 400); equals(pt.y, 600); - + m.a = 0.5; m.b = 0.75; m.c = 1.25; m.d = 2; pt = transformPoint(100, 200, m); equals(pt.x, 100 * m.a + 200 * m.c + m.e); equals(pt.y, 100 * m.b + 200 * m.d + m.f); }); - + test('Test svgedit.math.isIdentity() function', function() { expect(2); @@ -95,20 +95,20 @@ I = mult(scale_up, scale_down, scale_down_more); ok(isIdentity(I), 'Expected identity matrix when scaling up and down'); - // test multiplication with its inverse + // test multiplication with its inverse I = mult(rot_there, rot_there.inverse()); ok(isIdentity(I), 'Expected identity matrix when multiplying a matrix by its inverse'); I = mult(rot_there.inverse(), rot_there); ok(isIdentity(I), 'Expected identity matrix when multiplying a matrix by its inverse'); }); - }); - </script> -</head> -<body> + }); + </script> +</head> +<body> <h1 id='qunit-header'>Unit Tests for math.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> <ol id='qunit-tests'> </ol> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/path_test.html b/web/public/SVGOrigin/Method-Draw-master/test/path_test.html index c9318c0..8568f78 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/path_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/path_test.html @@ -4,7 +4,7 @@ <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> <script type='text/javascript' src='../editor/lib/jquery.js'></script> <script type='text/javascript' src='../editor/src/path.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // log function @@ -16,8 +16,8 @@ }); </script> -</head> -<body> +</head> +<body> <h1 id='qunit-header'>Unit Tests for path.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> @@ -25,5 +25,5 @@ </ol> <div id='anchor' style='visibility:hidden'> </div> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.css b/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.css index d20ecb6..9592db0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.css +++ b/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.css @@ -27,7 +27,7 @@ font-size: 1.5em; line-height: 1em; font-weight: normal; - + border-radius: 15px 15px 0 0; -moz-border-radius: 15px 15px 0 0; -webkit-border-top-right-radius: 15px; @@ -83,11 +83,11 @@ padding: 0.5em; background-color: #fff; - + border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; - + box-shadow: inset 0px 2px 13px #999; -moz-box-shadow: inset 0px 2px 13px #999; -webkit-box-shadow: inset 0px 2px 13px #999; @@ -150,7 +150,7 @@ #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } #qunit-tests .pass .test-name { color: #366097; } - + #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } diff --git a/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.js b/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.js index 30e0395..e290006 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.js +++ b/web/public/SVGOrigin/Method-Draw-master/test/qunit/qunit.js @@ -1,6 +1,6 @@ /* * QUnit - A JavaScript Unit Testing Framework - * + * * http://docs.jquery.com/QUnit * * Copyright (c) 2011 John Resig, J枚rn Zaefferer @@ -77,7 +77,7 @@ // allow utility functions to access the current test environment // TODO why?? QUnit.current_testEnvironment = this.testEnvironment; - + try { if ( !config.pollution ) { saveGlobal(); @@ -123,7 +123,7 @@ if ( this.expected && this.expected != this.assertions.length ) { QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); } - + var good = 0, bad = 0, tests = id("qunit-tests"); @@ -159,12 +159,12 @@ var b = document.createElement("strong"); b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>"; - + addEvent(b, "click", function() { var next = b.nextSibling, display = next.style.display; next.style.display = display === "none" ? "block" : "none"; }); - + addEvent(b, "dblclick", function(e) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { @@ -205,7 +205,7 @@ total: this.assertions.length } ); }, - + queue: function() { var test = this; synchronize(function() { @@ -234,7 +234,7 @@ synchronize(run); }; } - + } var QUnit = { @@ -253,7 +253,7 @@ QUnit.test(testName, expected, callback, true); }, - + test: function(testName, expected, callback, async) { var name = '<span class="test-name">' + testName + '</span>', testEnvironmentArg; @@ -274,13 +274,13 @@ if ( !validTest(config.currentModule + ": " + testName) ) { return; } - + var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); test.module = config.currentModule; test.moduleTestEnvironment = config.currentModuleTestEnviroment; test.queue(); }, - + /** * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. */ @@ -325,7 +325,7 @@ notEqual: function(actual, expected, message) { QUnit.push(expected != actual, actual, expected, message); }, - + deepEqual: function(actual, expected, message) { QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); }, @@ -344,34 +344,34 @@ raises: function(block, expected, message) { var actual, ok = false; - + if (typeof expected === 'string') { message = expected; expected = null; } - + try { block(); } catch (e) { actual = e; } - + if (actual) { // we don't want to validate thrown error if (!expected) { ok = true; - // expected is a regexp + // expected is a regexp } else if (QUnit.objectType(expected) === "regexp") { ok = expected.test(actual); - // expected is a constructor + // expected is a constructor } else if (actual instanceof expected) { ok = true; - // expected is a validation function which returns true is validation passed + // expected is a validation function which returns true is validation passed } else if (expected.call({}, actual) === true) { ok = true; } } - + QUnit.ok(ok, message); }, @@ -400,7 +400,7 @@ process(); } }, - + stop: function(timeout) { config.semaphore++; config.blocking = true; @@ -449,10 +449,10 @@ i--; } } - + // restrict modules/tests by get parameters config.filters = GETParams; - + // Figure out if we're running the tests from a server or not QUnit.isLocal = !!(location.protocol === 'file:'); })(); @@ -502,10 +502,10 @@ result.parentNode.removeChild( result ); } }, - + /** * Resets the test setup. Useful for tests that modify the DOM. - * + * * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. */ reset: function() { @@ -518,7 +518,7 @@ } } }, - + /** * Trigger an event on an element. * @@ -538,12 +538,12 @@ elem.fireEvent("on"+type); } }, - + // Safe object type checking is: function( type, obj ) { return QUnit.objectType( obj ) == type; }, - + objectType: function( obj ) { if (typeof obj === "undefined") { return "undefined"; @@ -577,7 +577,7 @@ } return undefined; }, - + push: function(result, actual, expected, message) { var details = { result: result, @@ -585,7 +585,7 @@ actual: actual, expected: expected }; - + message = escapeHtml(message) || (result ? "okay" : "failed"); message = '<span class="test-message">' + message + "</span>"; expected = escapeHtml(QUnit.jsDump.parse(expected)); @@ -603,15 +603,15 @@ } } output += "</table>"; - + QUnit.log(details); - + config.current.assertions.push({ result: !!result, message: output }); }, - + // Logging callbacks; all receive a single argument with the listed properties // run test/logs.html for any related changes begin: function() {}, @@ -635,7 +635,7 @@ addEvent(window, "load", function() { QUnit.begin({}); - + // Initialize the config, saving the execution queue var oldconfig = extend({}, config); QUnit.init(); @@ -660,7 +660,7 @@ } } } - + var toolbar = id("qunit-testrunner-toolbar"); if ( toolbar ) { var filter = document.createElement("input"); @@ -732,7 +732,7 @@ banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); } - if ( tests ) { + if ( tests ) { var result = id("qunit-testresult"); if ( !result ) { @@ -747,7 +747,7 @@ QUnit.done( { failed: config.stats.bad, - passed: passed, + passed: passed, total: config.stats.all, runtime: runtime } ); @@ -760,7 +760,7 @@ if ( !i ) { return true; } - + while ( i-- ) { var filter = config.filters[i], not = filter.charAt(0) == '!'; @@ -844,7 +844,7 @@ function saveGlobal() { config.pollution = []; - + if ( config.noglobals ) { for ( var key in window ) { config.pollution.push( key ); @@ -855,7 +855,7 @@ function checkPollution( name ) { var old = config.pollution; saveGlobal(); - + var newGlobals = diff( old, config.pollution ); if ( newGlobals.length > 0 ) { ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); @@ -939,7 +939,7 @@ } } } - + var callbacks = function () { // for string, boolean, number and null @@ -993,13 +993,13 @@ // b could be an object literal here if ( ! (QUnit.objectType(b) === "array")) { return false; - } - + } + len = a.length; if (len !== b.length) { // safe and faster return false; } - + //track reference to avoid circular references parents.push(a); for (i = 0; i < len; i++) { @@ -1032,7 +1032,7 @@ callers.push(a.constructor); //track reference to avoid circular references parents.push(a); - + for (i in a) { // be strict: don't ensures hasOwnProperty and go deep loop = false; for(j=0;j<parents.length;j++){ @@ -1098,7 +1098,7 @@ return '"' + str.toString().replace(/"/g, '\\"') + '"'; }; function literal( o ) { - return o + ''; + return o + ''; }; function join( pre, arr, post ) { var s = jsDump.separator(), @@ -1111,21 +1111,21 @@ return [ pre, inner + arr, base + post ].join(s); }; function array( arr ) { - var i = arr.length, ret = Array(i); + var i = arr.length, ret = Array(i); this.up(); while ( i-- ) - ret[i] = this.parse( arr[i] ); + ret[i] = this.parse( arr[i] ); this.down(); return join( '[', ret, ']' ); }; - + var reName = /^function (\w+)/; - + var jsDump = { parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance var parser = this.parsers[ type || this.typeOf(obj) ]; - type = typeof parser; - + type = typeof parser; + return type == 'function' ? parser.call( this, obj ) : type == 'string' ? parser : this.parsers.error; @@ -1176,7 +1176,7 @@ this.parsers[name] = parser; }, // The next 3 are exposed so you can use them - quote:quote, + quote:quote, literal:literal, join:join, // @@ -1195,7 +1195,7 @@ if ( name ) ret += ' ' + name; ret += '('; - + ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); }, @@ -1213,10 +1213,10 @@ node:function( node ) { var open = QUnit.jsDump.HTML ? '<' : '<', close = QUnit.jsDump.HTML ? '>' : '>'; - + var tag = node.nodeName.toLowerCase(), ret = open + tag; - + for ( var a in QUnit.jsDump.DOMAttrs ) { var val = node[QUnit.jsDump.DOMAttrs[a]]; if ( val ) @@ -1226,8 +1226,8 @@ }, functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function var l = fn.length; - if ( !l ) return ''; - + if ( !l ) return ''; + var args = Array(l); while ( l-- ) args[l] = String.fromCharCode(97+l);//97 is 'a' @@ -1284,34 +1284,34 @@ * * More Info: * http://ejohn.org/projects/javascript-diff-algorithm/ - * + * * Usage: QUnit.diff(expected, actual) - * + * * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over" */ QUnit.diff = (function() { function diff(o, n){ var ns = new Object(); var os = new Object(); - + for (var i = 0; i < n.length; i++) { - if (ns[n[i]] == null) + if (ns[n[i]] == null) ns[n[i]] = { rows: new Array(), o: null }; ns[n[i]].rows.push(i); } - + for (var i = 0; i < o.length; i++) { - if (os[o[i]] == null) + if (os[o[i]] == null) os[o[i]] = { rows: new Array(), n: null }; os[o[i]].rows.push(i); } - + for (var i in ns) { if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { n[ns[i].rows[0]] = { @@ -1324,7 +1324,7 @@ }; } } - + for (var i = 0; i < n.length - 1; i++) { if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && n[i + 1] == o[n[i].row + 1]) { @@ -1338,7 +1338,7 @@ }; } } - + for (var i = n.length - 1; i > 0; i--) { if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && n[i - 1] == o[n[i].row - 1]) { @@ -1352,20 +1352,20 @@ }; } } - + return { o: o, n: n }; } - + return function(o, n){ o = o.replace(/\s+$/, ''); n = n.replace(/\s+$/, ''); var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); var str = ""; - + var oSpace = o.match(/\s+/g); if (oSpace == null) { oSpace = [" "]; @@ -1380,7 +1380,7 @@ else { nSpace.push(" "); } - + if (out.n.length == 0) { for (var i = 0; i < out.o.length; i++) { str += '<del>' + out.o[i] + oSpace[i] + "</del>"; @@ -1392,14 +1392,14 @@ str += '<del>' + out.o[n] + oSpace[n] + "</del>"; } } - + for (var i = 0; i < out.n.length; i++) { if (out.n[i].text == null) { str += '<ins>' + out.n[i] + nSpace[i] + "</ins>"; } else { var pre = ""; - + for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { pre += '<del>' + out.o[n] + oSpace[n] + "</del>"; } @@ -1407,7 +1407,7 @@ } } } - + return str; }; })(); diff --git a/web/public/SVGOrigin/Method-Draw-master/test/select_test.html b/web/public/SVGOrigin/Method-Draw-master/test/select_test.html index 388e8d4..70335e7 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/select_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/select_test.html @@ -69,7 +69,7 @@ setUp(); svgedit.select.init(mockConfig, mockFactory); } - + function tearDown() { while (sandbox.hasChildNodes()) { sandbox.removeChild(sandbox.firstChild); @@ -90,7 +90,7 @@ equals(typeof svgedit.select.init, typeof function(){}); equals(typeof svgedit.select.getSelectorManager, typeof function(){}); }); - + test('Test Selector DOM structure', function() { expect(26); @@ -140,15 +140,15 @@ tearDown(); }); - }); - </script> -</head> -<body> + }); + </script> +</head> +<body> <h1 id='qunit-header'>Unit Tests for select.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> <ol id='qunit-tests'> </ol> <div id='sandbox'></div> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/svgtransformlist_test.html b/web/public/SVGOrigin/Method-Draw-master/test/svgtransformlist_test.html index 149bacb..b4e5bf0 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/svgtransformlist_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/svgtransformlist_test.html @@ -1,7 +1,7 @@ <!DOCTYPE html> -<html> -<head> - <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> +<html> +<head> + <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> <script src='../editor/lib/jquery.js'></script> <script> // Mock for browser.js @@ -10,7 +10,7 @@ svgedit.browser.supportsNativeTransformLists = function() { return false;} </script> <script type='text/javascript' src='../editor/src/svgtransformlist.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // log function @@ -19,21 +19,21 @@ window.console.log(result +' :: '+ message); } }; - + var svgns = 'http://www.w3.org/2000/svg'; var svgroot = document.getElementById('svgroot'); var svgcontent, rect, circle; - + var NEAR_ZERO = 5e-6; // 0.000005, Firefox fails at higher levels of precision. function almostEquals(a, b, msg) { msg = msg || (a + ' did not equal ' + b); ok(Math.abs(a - b) < NEAR_ZERO, msg); } - + function checkOutOfBoundsException(obj, fn, arg1) { var caughtException = false; try { - obj[fn](arg1); + obj[fn](arg1); } catch(e) { if (e.code == 1) { @@ -50,7 +50,7 @@ circle = svgcontent.appendChild(document.createElementNS(svgns, 'circle')); circle.id = 'c'; } - + function tearDown() { svgedit.transformlist.resetListMap(); while (svgroot.hasChildNodes()) { @@ -62,7 +62,7 @@ test('Test svgedit.transformlist package', function() { expect(2); - + ok(svgedit.transformlist); ok(svgedit.transformlist.getTransformList); }); @@ -70,37 +70,37 @@ test('Test svgedit.transformlist.getTransformList() function', function() { expect(4); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); var cxform = svgedit.transformlist.getTransformList(circle); - + ok(rxform); ok(cxform); equals(typeof rxform, typeof {}); equals(typeof cxform, typeof {}); - + tearDown(); }); test('Test SVGTransformList.numberOfItems property', function() { expect(2); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); - + equals(typeof rxform.numberOfItems, typeof 0); equals(rxform.numberOfItems, 0); - + tearDown(); }); test('Test SVGTransformList.initialize()', function() { expect(6); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); var cxform = svgedit.transformlist.getTransformList(circle); - + var t = svgcontent.createSVGTransform(); ok(t); ok(rxform.initialize); @@ -115,21 +115,21 @@ // This also fails in Firefox native. // equals(rxform.numberOfItems, 0, 'Did not remove transform from list before initializing another transformlist'); equals(cxform.numberOfItems, 1); - + tearDown(); }); test('Test SVGTransformList.appendItem() and getItem()', function() { expect(12); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); var cxform = svgedit.transformlist.getTransformList(circle); - + var t1 = svgcontent.createSVGTransform(), t2 = svgcontent.createSVGTransform(), t3 = svgcontent.createSVGTransform(); - + ok(rxform.appendItem); ok(rxform.getItem); equals(typeof rxform.appendItem, typeof function(){}); @@ -138,7 +138,7 @@ rxform.appendItem(t1); rxform.appendItem(t2); rxform.appendItem(t3); - + equals(rxform.numberOfItems, 3); var rxf = rxform.getItem(0); equals(rxf, t1); @@ -147,7 +147,7 @@ checkOutOfBoundsException(rxform, 'getItem', -1); checkOutOfBoundsException(rxform, 'getItem', 3); - + cxform.appendItem(t1); // These also fail in Firefox native. // equals(rxform.numberOfItems, 2, 'Did not remove a transform from a list before appending it to a new transformlist'); @@ -156,52 +156,52 @@ equals(cxform.numberOfItems, 1); equals(cxform.getItem(0), t1); - + tearDown(); }); test('Test SVGTransformList.removeItem()', function() { expect(7); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); - + var t1 = svgcontent.createSVGTransform(), t2 = svgcontent.createSVGTransform(); ok(rxform.removeItem); equals(typeof rxform.removeItem, typeof function(){}); rxform.appendItem(t1); rxform.appendItem(t2); - + var removedTransform = rxform.removeItem(0); equals(rxform.numberOfItems, 1); equals(removedTransform, t1); equals(rxform.getItem(0), t2); - + checkOutOfBoundsException(rxform, 'removeItem', -1); checkOutOfBoundsException(rxform, 'removeItem', 1); - + tearDown(); }); test('Test SVGTransformList.replaceItem()', function() { expect(8); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); var cxform = svgedit.transformlist.getTransformList(circle); - + ok(rxform.replaceItem); equals(typeof rxform.replaceItem, typeof function(){}); var t1 = svgcontent.createSVGTransform(), t2 = svgcontent.createSVGTransform(), t3 = svgcontent.createSVGTransform(); - + rxform.appendItem(t1); rxform.appendItem(t2); cxform.appendItem(t3); - + var newItem = rxform.replaceItem(t3, 0); equals(rxform.numberOfItems, 2); equals(newItem, t3); @@ -209,7 +209,7 @@ equals(rxform.getItem(1), t2); // Fails in Firefox native // equals(cxform.numberOfItems, 0); - + // test replaceItem within a list rxform.appendItem(t1); rxform.replaceItem(t1, 0); @@ -217,28 +217,28 @@ // equals(rxform.numberOfItems, 2); equals(rxform.getItem(0), t1); equals(rxform.getItem(1), t2); - + tearDown(); }); test('Test SVGTransformList.insertItemBefore()', function() { expect(10); setUp(); - + var rxform = svgedit.transformlist.getTransformList(rect); var cxform = svgedit.transformlist.getTransformList(circle); - + ok(rxform.insertItemBefore); equals(typeof rxform.insertItemBefore, typeof function(){}); var t1 = svgcontent.createSVGTransform(), t2 = svgcontent.createSVGTransform(), t3 = svgcontent.createSVGTransform(); - + rxform.appendItem(t1); rxform.appendItem(t2); cxform.appendItem(t3); - + var newItem = rxform.insertItemBefore(t3, 0); equals(rxform.numberOfItems, 3); equals(newItem, t3); @@ -373,15 +373,15 @@ var t_ = svgcontent.createSVGMatrix(); t_.e = 100; t_.f = 200; - + var result = t_.multiply(r).multiply(t); - + almostEquals(m.e, result.e); almostEquals(m.f, result.f); tearDown(); }); - + test('Test SVGTransformList.init() for matrix(1, 2, 3, 4, 5, 6)', function() { expect(8); setUp(); @@ -404,15 +404,15 @@ tearDown(); }); - }); - </script> -</head> -<body> + }); + </script> +</head> +<body> <h1 id='qunit-header'>Unit Tests for svgtransformlist.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> <ol id='qunit-tests'> </ol> <div id='svgroot' style='visibility:hidden'></div> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/svgutils_test.html b/web/public/SVGOrigin/Method-Draw-master/test/svgutils_test.html index d5fe738..0e16baa 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/svgutils_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/svgutils_test.html @@ -7,7 +7,7 @@ <script type='text/javascript' src='../editor/src/browser.js'></script> <script type='text/javascript' src='../editor/src/svgtransformlist.js'></script> <script type='text/javascript' src='../editor/src/svgutils.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // log function @@ -24,7 +24,7 @@ test('Test svgedit.utilities package', function() { expect(3); - + ok(svgedit.utilities); ok(svgedit.utilities.toXml); equals(typeof svgedit.utilities.toXml, typeof function(){}); @@ -33,7 +33,7 @@ test('Test svgedit.utilities.toXml() function', function() { expect(6); var toXml = svgedit.utilities.toXml; - + equals(toXml('a'), 'a'); equals(toXml('ABC_'), 'ABC_'); equals(toXml('PB&J'), 'PB&J'); @@ -76,7 +76,7 @@ test('Test svgedit.utilities.convertToXMLReferences() function', function() { expect(1); - + var convert = svgedit.utilities.convertToXMLReferences; equals(convert('ABC'), 'ABC'); // equals(convert('脌BC'), 'ÀBC'); @@ -91,7 +91,7 @@ rect.y = 2; rect.width = 3; rect.height = 4; - + var obj = bboxToObj(rect); equals(typeof obj, typeof {}); equals(obj.x, 1); @@ -100,10 +100,10 @@ equals(obj.height, 4); }); - + test("Test getUrlFromAttr", function() { expect(4); - + equal(svgedit.utilities.getUrlFromAttr("url(#foo)"), "#foo"); equal(svgedit.utilities.getUrlFromAttr("url(somefile.svg#foo)"), "somefile.svg#foo"); equal(svgedit.utilities.getUrlFromAttr("url('#foo')"), "#foo"); @@ -121,14 +121,14 @@ ok(bb.y && !isNaN(bb.y)); }); - }); - </script> -</head> -<body> + }); + </script> +</head> +<body> <h1 id='qunit-header'>Unit Tests for svgutils.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> <ol id='qunit-tests'> </ol> -</body> +</body> </html> diff --git a/web/public/SVGOrigin/Method-Draw-master/test/units_test.html b/web/public/SVGOrigin/Method-Draw-master/test/units_test.html index 625ec55..046c658 100644 --- a/web/public/SVGOrigin/Method-Draw-master/test/units_test.html +++ b/web/public/SVGOrigin/Method-Draw-master/test/units_test.html @@ -4,7 +4,7 @@ <link rel='stylesheet' href='qunit/qunit.css' type='text/css'/> <script type='text/javascript' src='../editor/lib/jquery.js'></script> <script type='text/javascript' src='../editor/src/units.js'></script> - <script type='text/javascript' src='qunit/qunit.js'></script> + <script type='text/javascript' src='qunit/qunit.js'></script> <script type='text/javascript'> $(function() { // log function @@ -23,7 +23,7 @@ getElement:function(elementId){ return document.getElementById(elementId);} }); } - + test('Test svgedit.units package', function() { expect(2); ok(svgedit.units); @@ -34,7 +34,7 @@ expect(7); setUp(); - + ok(svgedit.units.shortFloat); equals(typeof svgedit.units.shortFloat, typeof function(){}); @@ -50,7 +50,7 @@ expect(18); setUp(); - + ok(svgedit.units.isValidUnit); equals(typeof svgedit.units.isValidUnit, typeof function(){}); @@ -76,8 +76,8 @@ }); }); </script> -</head> -<body> +</head> +<body> <h1 id='qunit-header'>Unit Tests for units.js</h1> <h2 id='qunit-banner'></h2> <h2 id='qunit-userAgent'></h2> @@ -91,5 +91,5 @@ </div> </div> -</body> +</body> </html> diff --git "a/web/public/\344\272\247\345\223\201\347\273\223\346\236\204\346\240\221\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/web/public/\344\272\247\345\223\201\347\273\223\346\236\204\346\240\221\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" index 1723768..558c7dd 100644 --- "a/web/public/\344\272\247\345\223\201\347\273\223\346\236\204\346\240\221\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" +++ "b/web/public/\344\272\247\345\223\201\347\273\223\346\236\204\346\240\221\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" Binary files differ diff --git "a/web/public/\350\257\204\345\256\232\346\225\260\346\215\256\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/web/public/\350\257\204\345\256\232\346\225\260\346\215\256\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" new file mode 100644 index 0000000..7f5ce81 --- /dev/null +++ "b/web/public/\350\257\204\345\256\232\346\225\260\346\215\256\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" Binary files differ diff --git a/web/src/views/modules/basicInfo/ProductModelTree.vue b/web/src/views/modules/basicInfo/ProductModelTree.vue index 7069d48..78ba240 100644 --- a/web/src/views/modules/basicInfo/ProductModelTree.vue +++ b/web/src/views/modules/basicInfo/ProductModelTree.vue @@ -88,7 +88,7 @@ } let res = await this.$http.get('/basicInfo/XhProductModel/tree', {params: params}) this.productList = res.data - if (this.basic === '3') { + if (this.basic === 3) { if (this.productList && this.productList[0].children) { this.defaultId = this.productList[0].children[0].id this.$nextTick(() => { diff --git a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue index 8812cec..ae2a56c 100644 --- a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue +++ b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue @@ -14,12 +14,12 @@ <zt-dict v-model="dataForm.productType" dict="product" @input="getDefaultImg" :disabled="disabled"></zt-dict> </zt-form-item> - <zt-form-item label="杩愯鐘舵�佸浘" prop="operatImg"> + <zt-form-item v-if="dataForm.productType==='1'" label="杩愯鐘舵�佸浘" prop="operatImg"> <el-input v-model="dataForm.operatImgName" @focus="selectPicture()"></el-input> <el-image v-if="dataForm.operatImg" :src="url+dataForm.operatImg" style="height: 50px;width: 50px"></el-image> </zt-form-item> <zt-form-item label="鎺掑簭" prop="sort"> - <el-input v-model="dataForm.sort" :readonly="readonly"></el-input> + <el-input v-model="dataForm.sort" readonly="false"></el-input> </zt-form-item> </el-form> <PictureSelect ref="pictureSelect" @setPicture="openAddWin"> diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue index 54bb502..5fba66b 100644 --- a/web/src/views/modules/basicInfo/XhProductModel.vue +++ b/web/src/views/modules/basicInfo/XhProductModel.vue @@ -12,7 +12,7 @@ <zt-table-wraper ref="tableObj" defaultNotQuery="true" query-url="/basicInfo/XhProductModel/page" delete-url="/basicInfo/XhProductModel/ " :paging='false' - v-slot="{ table }"> + v-slot="{ table }" @refreshMethod="refreshData('tree')"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> <el-form-item> <el-input v-model="dataForm.name" placeholder="璇疯緭鍏ュ悕绉�" clearable></el-input> @@ -30,6 +30,7 @@ row-key="id" @selection-change="table.selectionChangeHandle" :header-cell-style="{'text-align':'center'}"> + <el-table-column type="selection" width="40" align="center"/> <el-table-column prop="name" label="鍚嶇О"/> <el-table-column v-if="productType==='3'|| productType==='4'" prop="equipType" label="璁惧绫诲瀷"/> <zt-table-column-dict prop="productType" label="鑺傜偣绫诲瀷" dict="product"/> @@ -134,6 +135,8 @@ console.log(data.namePath,'data.namePath') if (data.productType !== '10') { this.$refs.tableObj.query() + }else{ + this.$alert("铏氬崟鍏冧笉鍙煡鐪�") } }, importData(row) { diff --git a/web/src/views/modules/taskReliability/PlanMake.vue b/web/src/views/modules/taskReliability/PlanMake.vue index b1ac542..b588cf6 100644 --- a/web/src/views/modules/taskReliability/PlanMake.vue +++ b/web/src/views/modules/taskReliability/PlanMake.vue @@ -5,7 +5,7 @@ </el-table-column> <el-table-column align="center" prop="specifiedValue" label="妫�楠屼笂闄�"> <template v-slot="{ row }"> - <el-input v-model="row.specifiedValue" style="width:100%" :disabled="row.tjlx==='涓嶉檺瀹氳瀹氬�兼煡璇�'"></el-input> + <el-input v-model="row.specifiedValue" style="width:100%" :disabled="row.tjlx==='涓嶉檺瀹氭楠屼笂闄愭煡璇�'"></el-input> </template> </el-table-column> <el-table-column align="center" prop="minAccepValue" label="妫�楠屼笅闄�"> @@ -86,7 +86,7 @@ showFailureTime: 10 }, { - tjlx: '涓嶉檺瀹氳瀹氬�兼煡璇�', + tjlx: '涓嶉檺瀹氭楠屼笂闄愭煡璇�', btnName: '鏌ヨ涓�', specifiedValue: null, minAccepValue: null, @@ -152,7 +152,7 @@ flag = false } } - if (row.tjlx === "涓嶉檺瀹氳瀹氬�兼煡璇�") { + if (row.tjlx === "涓嶉檺瀹氭楠屼笂闄愭煡璇�") { if (!row.showFailureTime || !row.minAccepValue || !row.productionRisk || !row.userRisk) { this.$tip.alert("鏈夋湭濉啓鐨勫��") flag = false @@ -163,7 +163,7 @@ } let res = await this.$http.get(`/TestScheme/TestScheme/condition`, {params: row}) this.dataList = res.data - if (row.tjlx === "涓嶉檺瀹氳瀹氬�兼煡璇�") { + if (row.tjlx === "涓嶉檺瀹氭楠屼笂闄愭煡璇�") { this.isShow = true } else { this.isShow = false diff --git a/web/src/views/modules/taskReliability/Task.vue b/web/src/views/modules/taskReliability/Task.vue index ad62c12..281a62c 100644 --- a/web/src/views/modules/taskReliability/Task.vue +++ b/web/src/views/modules/taskReliability/Task.vue @@ -3,7 +3,7 @@ <div style="margin: 10px 0"> <zt-select v-model="dataForm.productId" placeholder="璇烽�夋嫨浜у搧鑺傜偣" :datas="productList" @change="onProductSelected"/> </div> - <zt-table-wraper ref="tableObj" query-url="/taskReliability/Task/page" defaultNotQuery="true" :paging='false' + <zt-table-wraper @dataLoaded="dataLoaded" ref="tableObj" query-url="/taskReliability/Task/page" defaultNotQuery="true" :paging='false' delete-url="/taskReliability/Task/" v-slot="{ table }"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> @@ -103,14 +103,16 @@ console.log(data, ' onProductSelected(data)') this.dataForm.productId = data.id this.$refs.tableObj.query() - this.selectTask(data) + }, + dataLoaded(dataList) { + this.selectTask(dataList[0]) }, tableRowClassName( { row, rowIndex }) { - if (row.id == this.currentId) { + if (row.id === this.currentId) { return 'select-row'; } else { return 'not-select-row'; -- Gitblit v1.9.1