Commit graph

4997 commits

Author SHA1 Message Date
Jürg Lehni
5a9f3dfb27 Improve handling of local paths and CORS on Node.js 2016-04-05 12:11:54 -07:00
Jürg Lehni
093227be7e Fix leaked global variable. 2016-04-04 23:38:37 -07:00
Jürg Lehni
ae9ff56260 Improve check for local URLs in paper.resolvePath() 2016-04-04 23:30:53 -07:00
Jürg Lehni
7cf844886f Add support for relative (local) URLs on Node.js 2016-04-04 23:26:43 -07:00
Jürg Lehni
f4e4e7ab9c Switch to jsdom v8.3.0, now that it includes our node-canvas PR.
See https://github.com/tmpvar/jsdom/pull/1366
2016-04-04 17:55:43 -07:00
Jürg Lehni
20fc3b9f0f Optimize Curve.getArea() to use less operators.
As proposed by @iconexperience in https://github.com/paperjs/paper.js/issues/994#issuecomment-189946135, rearranged for mathematical symmetry.
Closes #994
2016-03-28 08:17:27 -07:00
Jürg Lehni
fc03e042f9 Some minor code and comment cleanup. 2016-03-28 07:59:55 -07:00
Jürg Lehni
e054b760ed Fix cases where toolPoint was null. 2016-03-27 21:41:22 -07:00
Jürg Lehni
1a0c15f177 Fix #1021: use Item#getStyle() to use correct parent style in CompoundPath bounds calculations. 2016-03-27 13:39:30 -07:00
Jürg Lehni
3b71de9544 Fix #980: Implement visual selection of item.position 2016-03-17 14:15:28 +01:00
Jürg Lehni
00b2102b6d More clean-up of selection handling refactoring. 2016-03-17 13:36:02 +01:00
Jürg Lehni
336bc1092e Replace Item#_boundsSelected with #_selectBounds
Plus some refactoring.
2016-03-17 13:09:02 +01:00
Jürg Lehni
f0edcd31b0 Fix #769: Implement Item#selection flags to separate selection from item and bounds. 2016-03-17 13:02:26 +01:00
Jürg Lehni
f7bb96e8b9 Fix #1000: Improve calculation of length of straight curves.
Support sub-ranges now too, through Curve.subdivide()
2016-03-17 11:24:20 +01:00
Jürg Lehni
6cd36f5460 Fix #1001: Convert absolute local gradient URLs back to relative ones. 2016-03-17 09:48:43 +01:00
Jürg Lehni
d93aca6b5c Refactor GradientStop: Improve handling of optionally defined color and rampPoint.
Relates to https://github.com/paperjs/paper.js/issues/1001#issuecomment-197557990
2016-03-17 09:38:42 +01:00
Jürg Lehni
0e658da104 SVG Import: Improve style inheritance in nested <defs> 2016-03-16 20:47:57 +01:00
Jürg Lehni
ca76c1d24f Fix #1009: Make sure all name lookup structures are kept in sync for layers too. 2016-03-16 09:56:10 +01:00
Jürg Lehni
84d2a2f908 SVG Import: Fix issues with viewBox. 2016-03-15 19:00:35 +01:00
Jürg Lehni
484d696df3 Fix #1008: Remove use of ActiveXObject in Http.request() 2016-03-14 19:40:46 +01:00
Jürg Lehni
da7d0d8f75 Implement Path#splitAt(offset)
Also make sure the deprecated Path#split(offset) works as it used to. Relates to #563
2016-03-14 18:59:09 +01:00
Jürg Lehni
af1c481523 Correctly handle trailing slashes in XML attribute namespaces.
See #984
2016-03-14 18:31:45 +01:00
Jürg Lehni
7dd110f5b2 Simplify Path#getArea()
Relates to #994
2016-02-26 17:49:44 +01:00
Jürg Lehni
1db419a87b Rename SegmentSelection related internal objects and properties.
Relates to #769, #980
2016-02-26 16:31:50 +01:00
Jürg Lehni
08bf7bfe60 Fix #995: Improve handling of event propagation on View and Item. 2016-02-26 15:13:49 +01:00
Jürg Lehni
69c34707e7 fix #994: Revert commit b5af47a7b1
Revert back to correct implementation of Path#getArea() and implement unit tests for it.
2016-02-26 12:58:50 +01:00
Jürg Lehni
9f90659fdb Fix #991: Make sure items get fully removed in removeChildren() 2016-02-23 11:59:59 +01:00
Jürg Lehni
50bd5bee6f SVG: Add comments explaining IE related changes in #984 2016-02-20 00:19:36 +01:00
Jürg Lehni
acb1e408d0 SVG Import: Fix namespacing issues introduced by #984 2016-02-19 23:30:54 +01:00
Jürg Lehni
b71e3a44d9 Fix #981: Make sure event.delta is always calculated correctly.
The first mousemove / mousedrag events wrongly received the delta from the last mouseup event.
2016-02-19 13:49:06 +01:00
aschmi
49104c5cf0 Add trailing slashes to svg related namespaces (xmlns, xlink) 2016-02-18 16:08:12 +01:00
aschmi
a4757b37de Extend mapping of attribute names to required namespaces 2016-02-18 16:07:56 +01:00
Jürg Lehni
b5c837bb87 Fix #982: Make sure self points to the global scope on Webpack. 2016-02-17 19:06:29 +01:00
Jürg Lehni
6df4602b2b Fix #977: Implement unit-tests. 2016-02-16 20:52:07 +01:00
Jürg Lehni
4081afb635 Fix #977: Apply hit-testing tolerance to fills in Shape. 2016-02-16 00:28:04 +01:00
Jürg Lehni
6975690824 SVG Export: Do not filter out empty paths. 2016-02-16 00:06:26 +01:00
Jürg Lehni
7f48486163 Merge pull request #976 from iconexperience/patch-2
Fix #974 - Keep empty clip mask in SVG export
2016-02-16 00:01:36 +01:00
Jürg Lehni
c35814f94f Node.js: Fix bug when using paper-core.js
And improve Node.js examples. Closes #975
2016-02-15 23:59:31 +01:00
Jürg Lehni
16a7baa967 SvgImport: Fix issues introduced in 6f4890c63c 2016-02-15 23:58:40 +01:00
Jan
b5b1aa57d7 Keep empty clip mask in SVG export
A path should be exported in SVG if it serves as a clip mask, otherwise all items in the clip group that were hidden by clipping in paper.js become visible in the SVG.
2016-02-15 15:29:19 +01:00
Jürg Lehni
3d330da4fc Fix failing unit tests. 2016-02-15 09:21:11 +01:00
Jürg Lehni
08e51b5ca4 Fix failing SVG unit test. 2016-02-15 08:42:59 +01:00
Jürg Lehni
6f4890c63c Implement new options to control bounding box in SVG Export
And use it to support SvgExport unit tests. Relates to #972
2016-02-15 00:13:38 +01:00
Jürg Lehni
21033f7850 Implement PathItem.create(pathData)
determining if the data describes a plain path or a compound-path with multiple sub-paths.
2016-02-14 23:16:22 +01:00
Jürg Lehni
9f9222f416 List all supported events in event methods on View. 2016-02-14 23:04:48 +01:00
Jürg Lehni
3c3c8d98b0 Document options.insert in #importSVG() 2016-02-14 22:54:33 +01:00
Jürg Lehni
dba4eb371d SvgImport: Implement options.insert to control insertion.
Also use settings.insertItems for faster import. Closes #763
2016-02-14 22:51:50 +01:00
Jürg Lehni
8d5c922c50 Simplify code from #971 and activate unit test for it again. 2016-02-14 22:15:55 +01:00
Jürg Lehni
4c72d9866f Merge pull request #971 from iconexperience/fix-issue-968
Fix for #968 - Improve handling of points on paths in getWinding()
2016-02-14 22:06:55 +01:00
Jürg Lehni
55e7689186 Fix regression introduced in 4e7fa2f04e 2016-02-14 21:55:26 +01:00