Merge pull request #56 from pshihn/path-scientific-parsing

removed a faulty regex that was causing scientific notation parsing to fail.
This commit is contained in:
Preet
2018-04-15 19:24:29 -07:00
committed by GitHub
6 changed files with 6 additions and 6 deletions

2
dist/rough.js vendored
View File

@@ -854,7 +854,7 @@ class RoughRenderer {
}
svgPath(path, o) {
path = (path || '').replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
path = (path || '').replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
let p = new RoughPath(path);
if (o.simplification) {
let fitter = new PathFitter(p.linearPoints, p.closed);

2
dist/rough.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/rough.umd.js vendored
View File

@@ -857,7 +857,7 @@ class RoughRenderer {
}
svgPath(path, o) {
path = (path || '').replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
path = (path || '').replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
let p = new RoughPath(path);
if (o.simplification) {
let fitter = new PathFitter(p.linearPoints, p.closed);

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "roughjs",
"version": "2.1.1",
"version": "2.1.2",
"description": "Create graphics using HTML Canvas or SVG with a hand-drawn, sketchy, appearance.",
"main": "dist/rough.umd.js",
"jsnext:main": "src/index.js",

View File

@@ -208,7 +208,7 @@ export class RoughRenderer {
}
svgPath(path, o) {
path = (path || '').replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
path = (path || '').replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
let p = new RoughPath(path);
if (o.simplification) {
let fitter = new PathFitter(p.linearPoints, p.closed);