From ae14cedc7f6fa5b729fe5c30fe3bbdded72b5dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 2 Mar 2013 08:11:29 -0800 Subject: [PATCH 1/2] Remove SVG constants, as we don't use them anymore. --- src/constants.js | 1 - src/svg/constants.js | 41 ----------------------------------------- 2 files changed, 42 deletions(-) delete mode 100644 src/svg/constants.js diff --git a/src/constants.js b/src/constants.js index 165def66..51e5e364 100644 --- a/src/constants.js +++ b/src/constants.js @@ -13,4 +13,3 @@ /*#*/ include('item/ChangeFlag.js'); /*#*/ include('path/SelectionState.js'); /*#*/ include('util/Numerical.js'); - /*#*/ include('svg/constants.js'); diff --git a/src/svg/constants.js b/src/svg/constants.js deleted file mode 100644 index d5de337f..00000000 --- a/src/svg/constants.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Paper.js - The Swiss Army Knife of Vector Graphics Scripting. - * http://paperjs.org/ - * - * Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey - * http://lehni.org/ & http://jonathanpuckey.com/ - * - * Distributed under the MIT license. See LICENSE file for details. - * - * All rights reserved. - */ - -/** - * To shrink code, we automatically replace the long SVGPathSeg constants with - * their actual numeric values on preprocessing time, using prepro statements. - * To do so, we need their values defined, which happens here. - */ - -// http://dxr.mozilla.org/mozilla-central/dom/interfaces/svg/nsIDOMSVGPathSeg.idl.html -var SVGPathSeg = { - PATHSEG_UNKNOWN: 0, - PATHSEG_CLOSEPATH: 1, - PATHSEG_MOVETO_ABS: 2, - PATHSEG_MOVETO_REL: 3, - PATHSEG_LINETO_ABS: 4, - PATHSEG_LINETO_REL: 5, - PATHSEG_CURVETO_CUBIC_ABS: 6, - PATHSEG_CURVETO_CUBIC_REL: 7, - PATHSEG_CURVETO_QUADRATIC_ABS: 8, - PATHSEG_CURVETO_QUADRATIC_REL: 9, - PATHSEG_ARC_ABS: 10, - PATHSEG_ARC_REL: 11, - PATHSEG_LINETO_HORIZONTAL_ABS: 12, - PATHSEG_LINETO_HORIZONTAL_REL: 13, - PATHSEG_LINETO_VERTICAL_ABS: 14, - PATHSEG_LINETO_VERTICAL_REL: 15, - PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: 16, - PATHSEG_CURVETO_CUBIC_SMOOTH_REL: 17, - PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: 18, - PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: 19 -}; From 1bfafee0ca7aaa95b08d12a4a943f0065431fec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 2 Mar 2013 08:14:17 -0800 Subject: [PATCH 2/2] Use a default precision of three digits for exporting path data. --- src/path/Path.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path/Path.js b/src/path/Path.js index a7b2595c..4b2a64b0 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -183,7 +183,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ var segments = this._segments, style = this._style, format = Format.point, - precision = arguments[0], + precision = arguments[0] || 3, parts = []; // TODO: Add support for H/V and/or relative commands, where appropriate