Commit graph

6370 commits

Author SHA1 Message Date
Jürg Lehni
8fb7c41537 Implement support for web-workers.
Relates to #634, closes #582
2016-02-02 17:30:38 +01:00
Jürg Lehni
74d188967c Fix accidentally leaked global variable. 2016-02-02 14:03:25 +01:00
Jürg Lehni
a71c364594 We cannot cache #strokeBounds when #strokeScaling is false.
Closes #697
2016-02-02 13:56:08 +01:00
Jürg Lehni
a02d7248c0 Move Path_Bounds tests to Item_Bounds.
And add a test for shape.strokeBounds without strokeScaling.
2016-02-02 13:55:36 +01:00
Jürg Lehni
21dce1a655 Implement tests for #697
One currently failing due to caching issues.
2016-02-02 13:28:06 +01:00
Jürg Lehni
340a1e2a5f Rename curve-time in API from 'parameter' to 'time'
And create separate versions of methods that receive curve-time arguments instead of offsets.

Curve#getNormalAt(time, true) -> #getNormalAtTime(true)
Curve#divide() -> #divideAt(offset) / #divideAtTime(time)
Curve#split() -> #splitAt(offset) / #splitAtTime(time)
Curve#getParameterAt(offset) -> #getTimeAt(offset)
Curve#getParameterOf(point) -> getTimeOf(point)
Curve#getPointAt(time, true) -> #getPointAtTime(time)
Curve#getTangentAt(time, true) -> #getTangenttTime(time)
Curve#getNormalAt(time, true) -> #getNormalAtTime(time)
Curve#getCurvatureAt(time, true) -> #getCurvatureAtTime(time)
CurveLocation#parameter -> #time
Path#split(offset/location) -> #splitAt(offset/location)

Closes #563
2016-02-02 11:59:53 +01:00
Jürg Lehni
45595b2b1d Fix unit test error on Node.js 2016-02-01 20:20:38 +01:00
Jürg Lehni
a12e99e387 Implement unit tests for SVG Importing, based on visual comparison.
For now, one test for #932
2016-02-01 20:15:37 +01:00
Jürg Lehni
8e25327b09 Fix wrongly copied attributes in Item#reduce()
Closes #932
2016-02-01 20:12:54 +01:00
Jürg Lehni
ad21b2b07a SVG: Pass the imported SVG date as the 2nd parameter to onLoad() 2016-02-01 20:09:43 +01:00
Jürg Lehni
b2f3b587ec Events: paper namespace may not be initialized when key evens are emitted. 2016-02-01 12:58:52 +01:00
Jürg Lehni
1c4ff31e6c SVG: Some renaming omitted in previous commit. 2016-02-01 12:52:50 +01:00
Jürg Lehni
af5984747f SVG: Rename 'SVG' prefix to 'Svg'
- To make it clear it's not browser-provided functionality
- To reflect how DomElement / DomEvent are already named, for the same reason
2016-02-01 12:50:22 +01:00
Jürg Lehni
519898357f SVG: Fix issue with invalid default stroke-width on IE.
Closes #467
2016-02-01 12:36:42 +01:00
Jürg Lehni
d68239a541 SVG: Introduce SVGNode object to handle SVG Elements. 2016-02-01 12:31:18 +01:00
Jürg Lehni
3d346d8045 Core: Do not serialize deprecated Style#font property.
Relates to #934
2016-02-01 12:19:12 +01:00
Jürg Lehni
50843d8f87 Node: Switch to jsdom v8.0.1 with patched-in image support.
And fix XMLSerializer#serializeToString() to work with it.
2016-01-31 22:47:57 +01:00
Jürg Lehni
bc2729683c Core: Renamed Symbol and PlacedSymbol classes and properties.
- Symbol -> SymbolDefinition
- PlacedSymbol -> SymbolItem
- Symbol#definition -> SymbolDefinition#item
- PlacedSymbol#symbol -> SymbolItem#definition
- Deprecate Project#symbols

Closes #770
2016-01-31 16:52:51 +01:00
Jürg Lehni
5cbc8ef775 Gulp: Simplify build options handling and remove gitty dependency. 2016-01-31 14:45:34 +01:00
Jürg Lehni
f4b6dc0914 Documentation: Update README to mention prebuilt versions. 2016-01-31 14:41:09 +01:00
Jürg Lehni
1a3a4be0b6 Gulp: Implement publish task. 2016-01-31 14:30:14 +01:00
Jürg Lehni
f803afa4b6 Exclude dist/ folder.
- We now build on NPM publish through Gulp.
- We offer prebuilt versions on the prebuilt/module and prebuilt/dist branches.
2016-01-31 13:04:23 +01:00
Jürg Lehni
834d2303a6 Travis CI: Implement automatic deployment of prebuilt versions on each commit, and caching of assets and NVM.
Builds are deployed to prebuilt/dist an prebuilt/module branches.
2016-01-31 12:43:38 +01:00
Jürg Lehni
90e1cf8f5e Canvas: Throw an error if a canvas cannot provide a 2D context. 2016-01-31 12:43:38 +01:00
Jürg Lehni
8c60931200 Tests: Update to gulp-qunits 2.0.1 2016-01-31 12:43:38 +01:00
Jürg Lehni
e232ebc443 Examples: Move away from using a symlink to be able to require('paper') from within examples.
- Node 5 / NPM 3 struggles with it
- It never worked on Windows
2016-01-31 12:43:38 +01:00
Jürg Lehni
e4ece39603 Gulp: Use gulp jshhint instead of npm run lint. 2016-01-31 12:43:38 +01:00
Jürg Lehni
f2a132f498 Tests: Don't use noGlobas in Node.js QUnit tests for now.
As it simply doesn't work yet.
2016-01-31 12:43:38 +01:00
Jürg Lehni
aa192d8388 Travis CI: More work at getting the right fonts installed for the tests to pass. 2016-01-31 12:43:38 +01:00
Jürg Lehni
567f286774 Tests: Switch to our own gulp-qunits module.
Since it handles PhantomJS as well as Node.js execution, and formats errors identically and quickly.
2016-01-31 12:43:38 +01:00
Jürg Lehni
e02e9f4643 Node: Improve DOMParser#parseFromString() polyfill for Node.js
And no need to move imported SVG nodes into document, since we don't have styling in Node.js
2016-01-31 12:43:38 +01:00
Jürg Lehni
662b974104 Tests: gulp test now performs both browser and nod based tests. 2016-01-31 12:43:38 +01:00
Jürg Lehni
e0429f44df Tests: Improve QUnit test logging and various cleanup on helpers. 2016-01-31 12:43:38 +01:00
Jürg Lehni
f7053689bc Travis CI: Activate test:node task again. 2016-01-31 12:43:38 +01:00
Jürg Lehni
c22911f43b Travis CI: Try installing msttcorefonts to solve the font-size issue in tests. 2016-01-31 12:43:32 +01:00
Jürg Lehni
1c1ff8c808 Travis CI: Try to fix failing test on Travis by specifying font. 2016-01-31 12:43:26 +01:00
Jürg Lehni
639bf07a47 Tests: Clean up Emitter tests. 2016-01-31 12:43:20 +01:00
Jürg Lehni
4c84c3dad5 Tests: Start getting QUnit tests to work on Node.js
Work in progress…
2016-01-31 12:43:20 +01:00
Jürg Lehni
0c1b4376d3 Core: Fix issue with RegExp detection if object is from another context. 2016-01-31 12:43:03 +01:00
Jürg Lehni
fadef949ff Node: Fix display of percentage in Node.js frames export. 2016-01-31 12:42:53 +01:00
Jürg Lehni
0455d39e33 Automatically determine correct padding for numbers in View#exportFrames() 2016-01-27 13:38:04 +01:00
Jürg Lehni
85d60e199e Get View#exportFrames() to work again on Node.js 2016-01-27 13:27:11 +01:00
Jürg Lehni
e7c4e3c990 Implement View#autoUpdate to control automatic updates.
Closes #921
2016-01-27 13:10:04 +01:00
Jürg Lehni
b56d18d6a4 Override DomEvent.requestAnimationFrame() in Node.js to avoid setInterval() timers 2016-01-27 13:02:50 +01:00
Jürg Lehni
414742459d Make sure PDF support actually works. 2016-01-27 12:51:26 +01:00
Jürg Lehni
1e649362bd Fix issue in View#exportImage() 2016-01-27 12:51:02 +01:00
Jürg Lehni
b40ff49523 Add explanation about View#_itemEvents.native. 2016-01-27 12:17:38 +01:00
Jürg Lehni
5fa0810ca3 Streamline View#_countItemEvent() code a bit. 2016-01-27 12:15:00 +01:00
Jürg Lehni
0cfa83fc32 Make item-level mousedrag events work again. 2016-01-27 12:11:59 +01:00
Jürg Lehni
d72db14c1f Switch to the paperjs.org version of rhill-voronoi-core.js 2016-01-27 11:56:26 +01:00