Commit graph

6455 commits

Author SHA1 Message Date
Jürg Lehni
2025bd1a77 SvgImport: Implement onError() callback
Closes #969
2016-02-14 14:52:37 +01:00
Jürg Lehni
79d446136a Clean up PR #931
Closes #930
2016-02-14 14:15:17 +01:00
Jürg Lehni
9c9f40d05a Merge pull request #931 from sapics/path-arc
Fix path.arcTo error
2016-02-14 14:11:52 +01:00
Evgeniy Malyarov
add28666cf Update Path.js
fix getNearestPoint error on uninserted curves
; Conflicts:
;	src/path/Path.js
2016-02-14 14:03:54 +01:00
Evgeniy Malyarov
fb76065242 Update Curve.js
fix getNearestPoint error on uninserted curves
2016-02-14 14:03:00 +01:00
Jürg Lehni
e6f43da22b Fix various issues with scaling of shadows.
Supports browser-zoom, HiDPI canvas and view zoom.
Closes #831
2016-02-14 13:49:40 +01:00
Jürg Lehni
fa6c1f47b4 Hit-Test: Pass viewMatrix as argument instead of in options object. 2016-02-14 13:34:35 +01:00
Jürg Lehni
9c9f43d2c9 Implement failing test for #968 2016-02-14 12:44:03 +01:00
Jürg Lehni
4a947317fb Implement #hitTestAll() on Item and Project
Along with unit tests and documentation.
Closes #536
2016-02-14 12:39:35 +01:00
Jürg Lehni
3ee46ffc5c Matrix: Switch to a better implementation of #decompose()
This now also correctly handles skewing in SVG export.
2016-02-14 10:59:57 +01:00
Jürg Lehni
e35a55fe66 Flip Matrix properties #b and#c
Their definition was reversed from almost all other Matrix implementations I've encountered.
2016-02-14 10:53:10 +01:00
Jürg Lehni
40d0fca9d0 Fix issue with item bounds permanently collapsing to 0 when applying non-invertible transformations.
We have to keep a backup of the last invertible state around.
Fixes #558 rather elegantly.
2016-02-14 10:44:41 +01:00
Jürg Lehni
dbd7a90e23 Better detect code that requires a tool object.
Closes #967
2016-02-14 01:45:16 +01:00
Jürg Lehni
27197bd156 Docs: Fix warning about isFlatEnough() 2016-02-13 23:32:29 +01:00
Jürg Lehni
0a6efe10f5 Give Tool a paperscript example.
Closes #967
2016-02-13 23:31:54 +01:00
Jürg Lehni
c3fff9fa83 Switch from new Base() to Base.set({}) where possible. 2016-02-13 23:10:09 +01:00
Jürg Lehni
009761d13c Boolean: Only compare segments when determining if paths are identitcal. 2016-02-13 22:58:42 +01:00
Jürg Lehni
3348fb736f Boolean: Implement proper handling of fully overlapping (identical) paths and sub-paths.
Closes #923, closes #958
2016-02-13 22:41:09 +01:00
Jürg Lehni
0a196daa21 Clean-up previous commit. 2016-02-12 21:23:47 +01:00
Jürg Lehni
c6bcf4351a Implement consistent checks for fill / stroke / shadow styles in test functions on Style class.
And use them in Item#_setStyles()
2016-02-12 21:22:30 +01:00
Jürg Lehni
e38829eb96 Support drawing shadows with no shadowBlur.
Closes #955
2016-02-12 21:05:05 +01:00
Jürg Lehni
84a75e375a Remove unnecessary edge-case handling in CurveLocation#isCrossing()
Closes #951, closes #959
2016-02-12 20:52:19 +01:00
Jürg Lehni
e2bc83af5d Add test for #960 and improve fix a bit.
Closes #960
2016-02-12 20:19:40 +01:00
Jürg Lehni
7c24fc916f Merge pull request #962 from iconexperience/fix-issue-960
Fix for #960 - Shortcut Curve.evaluate() for t === 1
2016-02-12 20:10:21 +01:00
Jürg Lehni
80c8aae5bc Implement unit tests for Item#getItems() with overlapping / inside properties.
Relates to #961
2016-02-12 20:09:41 +01:00
Jürg Lehni
6d5d1ce077 Introduce Base.filter(), to copy and filter object properties. 2016-02-12 19:58:32 +01:00
Jürg Lehni
5ec5c265ac Travis CI: Switch to g++ 4.8 to see if this solves strange new building issues. 2016-02-12 19:14:27 +01:00
Jürg Lehni
06d6b5195b Do not cancel mousedrag events on stopPropagation()
Use preventDefault() instead.
Closes #952
2016-02-12 19:01:34 +01:00
Jürg Lehni
12f829c107 Part 2 of large refactoring of bounds handling. 2016-02-12 18:54:06 +01:00
Jürg Lehni
892e56793d Update straps.js 2016-02-12 18:20:40 +01:00
Jürg Lehni
55c5f42716 Part 1 of large refactoring of bounds handling. 2016-02-12 17:59:37 +01:00
iconexperience
aa1f2196c9 Shortcut Curve.evaluate() for t === 1 to avoid imprecision. 2016-02-12 14:41:21 +01:00
Jürg Lehni
cb79232e12 Travis CI: Use Arial in all tests. 2016-02-11 12:58:06 +01:00
Jürg Lehni
c0b39c4b8f Tests: Implement additional tests for SvgImport. 2016-02-11 12:51:48 +01:00
Jürg Lehni
6797d2eb11 Respect clip-items in Group#_getBounds()
Closes #956
2016-02-11 12:51:04 +01:00
Jürg Lehni
68c4541844 SvgImport: Always create a clip-item when viewBox is specified. 2016-02-11 12:50:08 +01:00
Jürg Lehni
e38a33fd64 SVGImport: Inherit default styles on Node.js too. 2016-02-11 11:20:32 +01:00
Jürg Lehni
df57c4adb9 SVGImport: Improve consistency of style handling. 2016-02-11 11:06:09 +01:00
Jürg Lehni
8542eb62b4 Gulp: Add test:browser task, to solve CORS issues on Chrome. 2016-02-11 10:05:21 +01:00
Jürg Lehni
d9e09b9d20 SVGImport: Further improve handling of gradients
- Respect radial setting when reusing graident definition
- Clean-up percentage handling
2016-02-10 18:23:56 +01:00
Jürg Lehni
c1b7366249 Improve fix for #650
Add support for multiple use of same gradient.
2016-02-10 18:13:13 +01:00
Jürg Lehni
fce126959d SVGImport: Implement support for gradientUnits="objectBoundingBox"
Relates to #650, but still needs unit tests.
2016-02-10 17:46:39 +01:00
Jürg Lehni
98fc51319f Remove unnecessary double-spaces. 2016-02-10 16:15:35 +01:00
Jürg Lehni
56d5b3b323 SVGImport: Implement support for dimensions in percentage.
Closes #954
2016-02-10 16:14:51 +01:00
Jürg Lehni
adc5b86d2e SVGExport: Remove unnecessary calls to Point#transform() in exportGradient() 2016-02-10 15:34:22 +01:00
Jürg Lehni
9e8fcee8cd Change implementation of PathItem#flatten(flatness)
- flatness parameter specifies maximum allowed error instead of maximum allowed distance between point
- Parts that are already flat are not further flattened
- Corners are preserved

Closes #618
2016-02-10 14:58:40 +01:00
Jürg Lehni
ed4347714b Remove duplicate unit tests. 2016-02-10 13:26:40 +01:00
Jürg Lehni
00d2e2a5bb Some CurveLocation cleanup.
- Remove UID as there is no need anymore
- Rename some private properties
2016-02-10 12:36:39 +01:00
Jürg Lehni
0ae232e4ab Implement support for clip-masks in hit-testing.
Closes #671
2016-02-09 17:02:03 +01:00
Jürg Lehni
740c94e367 Implement Item#_hitTestChildren()
As suggested by @iconexperience in #671
2016-02-09 16:52:55 +01:00