"twitter": [
"svg_js"
],
- "travis": true,
"issues": true,
"theme": "v1"
}
\ No newline at end of file
- added `precision()` method to round numeric element attributes -> __TODO!__
- added specs for `SVG.FX` -> __TODO!__
-# 2.3.7
+# 2.3.7 (14/01/2017)
- moved project to [svgdotjs](https://github.com/svgdotjs)
- made matrixify work with transformation chain separated by commas (#543)
- fixed `SVG.Matrix.skew()` (#545)
"name": "svg.js",
"repo": "svgdotjs/svg.js",
"description": "A lightweight library for manipulating and animating SVG",
- "version": "2.3.6",
+ "version": "2.3.7",
"keywords": ["svg"],
"author": "Wout Fierens <wout@mick-wout.com>",
"main": "dist/svg.js",
/*!
* svg.js - A lightweight library for manipulating and animating SVG.
* @version 2.3.6
-* http://www.svgjs.com
+* https://svgdotjs.github.io/
*
-* @copyright Wout Fierens <wout@mick-wout.com.com>
+* @copyright Wout Fierens <wout@mick-wout.com>
* @license MIT
*
-* BUILT: Sun Nov 13 2016 14:06:31 GMT+0100 (CET)
+* BUILT: Sat Jan 14 2017 05:53:26 GMT+0100 (CET)
*/;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
.pipe(size({ showFiles: true, gzip: true, title: 'Gzipped' }))\r
})\r
\r
-/**\r
- * rebuild documentation using documentup\r
- */\r
-\r
-gulp.task('docs', function() {\r
- fs.readFile('README.md', 'utf8', function (err, data) {\r
- request.post(\r
- 'http://documentup.com/compiled'\r
- , { form: { content: data, name: 'SVG.js', theme: 'v1' } }\r
- , function (error, response, body) {\r
- // Replace stylesheet\r
- body = body.replace('//documentup.com/stylesheets/themes/v1.css', 'svgjs.css')\r
-\r
- // Write file\r
- fs.writeFile('docs/index.html', body, function(err) {})\r
- }\r
- )\r
- })\r
-})\r
\r
-gulp.task('default', ['clean', 'unify', 'minify'])
\ No newline at end of file
+gulp.task('default', ['clean', 'unify', 'minify'])\r
"build": "gulp",
"build:test": "gulp unify",
"test": "karma start .config/karma.conf.js --single-run",
- "test:quick": "karma start .config/karma.quick.js",
- "docs": "gulp docs"
+ "test:quick": "karma start .config/karma.quick.js"
},
"devDependencies": {
"coveralls": "^2.11.15",
it('matches the size of the target element, including transformations', function() {
var box = rect.rbox()
expect(box.x).toBeCloseTo(60)
- expect(box.y).toBeCloseTo(281)
+ expect(box.y).toBeCloseTo(281, 0)
expect(box.cx).toBeCloseTo(110)
- expect(box.cy).toBeCloseTo(551)
+ expect(box.cy).toBeCloseTo(551, 0)
expect(box.width).toBe(100)
expect(box.height).toBe(540)
expect(box.w).toBe(100)
expect(box.h).toBe(540)
expect(box.x2).toBeCloseTo(160)
- expect(box.y2).toBeCloseTo(821)
+ expect(box.y2).toBeCloseTo(821, 0)
})
})
it('returns the correct rectangular box', function() {
var rect = draw.size(200, 150).viewbox(0, 0, 200, 150).rect(105, 210).move(2, 12)
var box = rect.rbox()
- expect(box.x).toBeCloseTo(2,0)
- expect(box.y).toBeCloseTo(12)
+ expect(box.x).toBeCloseTo(2, 0)
+ expect(box.y).toBeCloseTo(12, 0)
expect(box.cx).toBeCloseTo(54.5)
- expect(box.cy).toBeCloseTo(117)
+ expect(box.cy).toBeCloseTo(117, 0)
expect(box.width).toBe(105)
expect(box.height).toBe(210)
})
var rect = draw.size(200,150).viewbox(0,0,100,75).rect(105,210).move(2,12)
var box = rect.rbox()
expect(box.x).toBeCloseTo(4)
- expect(box.y).toBeCloseTo(24)
+ expect(box.y).toBeCloseTo(24, 0)
expect(box.cx).toBeCloseTo(56.5)
- expect(box.cy).toBeCloseTo(129)
+ expect(box.cy).toBeCloseTo(129, 0)
expect(box.width).toBe(105)
expect(box.height).toBe(210)
})
var box = set.bbox()
expect(box.x).toBeCloseTo(0)
- expect(box.y).toBeCloseTo(0)
+ expect(box.y).toBeCloseTo(0, 0)
expect(box.width).toBeCloseTo(300)
expect(box.height).toBeCloseTo(350)
})
it('sets the cx and cy position', function() {
text.center(321, 567)
var box = text.bbox()
- expect(+text.node.getAttribute('x') + box.width / 2).toBeCloseTo(321)
+ expect(+text.node.getAttribute('x') + box.width / 2).toBeCloseTo(321, 1)
expect(text.y() + box.height / 2).toBeCloseTo(567)
})
})