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
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
c3fff9fa83
Switch from new Base() to Base.set({}) where possible.
2016-02-13 23:10: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
6d5d1ce077
Introduce Base.filter(), to copy and filter object properties.
2016-02-12 19:58:32 +01:00
Jürg Lehni
55c5f42716
Part 1 of large refactoring of bounds handling.
2016-02-12 17:59:37 +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
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
Jürg Lehni
bd7f3554d8
Fix options handling in Item#clone() to keep backward compatibility.
2016-02-09 16:11:38 +01:00
Jürg Lehni
e179b08156
Implement Item#clone(options) with support for options.deep
...
Closes #941
2016-02-09 16:01:06 +01:00
Jürg Lehni
da216aa581
Improve handling of view updates and detection of invisible documents.
...
Switch to the new HTML5 Page Visibility API.
2016-02-09 09:59:19 +01:00
Jürg Lehni
7888d1d107
JSON: Prevent name: undefined
exports.
2016-02-03 09:46:40 +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
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
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
0c1b4376d3
Core: Fix issue with RegExp detection if object is from another context.
2016-01-31 12:43:03 +01:00
Jürg Lehni
d22104985d
Fix spelling mistake.
2016-01-27 11:51:54 +01:00
Jürg Lehni
3276616f53
Introduce Item._itemHandlers to remove code redundancy.
2016-01-27 11:38:14 +01:00
Jürg Lehni
0b991cefdd
Only mark an image as loaded if it actually has src set and is complete.
2016-01-27 10:45:39 +01:00
Jürg Lehni
8391543115
Further improve Raster documentation.
2016-01-27 10:39:03 +01:00
Jürg Lehni
9cf912090c
Implement Raster#_setImage() that doesn't trigger events.
...
For internal use / updates.
2016-01-27 10:33:01 +01:00
Jürg Lehni
26a64415a5
Document Raster#onLoad() and #onError()
2016-01-27 10:32:28 +01:00
Jürg Lehni
c5632d8a6a
Improve documentation for event handlers on View and Item.
2016-01-27 10:27:14 +01:00
Jürg Lehni
b71ffdbe71
Remove all direct calls to view.update() and favor of the new view.requestUpdate()
...
Pure window.requestAnimationFrame() smoothness, automatic updates even when working directly from JavaScript, and no more slow-downs from onLoad events!
Closes #830 , #925
2016-01-26 21:37:27 +01:00
Jürg Lehni
5e69de3bd1
Restructure event handling on Raster item.
...
- Trigger #onLoad() events from Raster#setImage() also
- Add support for Raster#onError() handler
Closes #849 and #924
2016-01-26 21:06:36 +01:00
Jürg Lehni
e1a51f858a
More work on unified version for browsers and node.
...
Relates to #739
2016-01-26 20:02:23 +01:00
Jürg Lehni
c479ec9272
Start with transition to unified version.
...
Relates to #739
2016-01-26 11:41:49 +01:00
Jürg Lehni
36e31eb250
Implement better handling of Raster#source and Raster#toDataURL() on Node.js
...
Closes #914
2016-01-22 17:05:50 +01:00
sapics
ecc36ec3cc
Remove unused variable in group._draw
2016-01-20 14:35:28 +09:00
sapics
9c4296eda0
Add stroke hit-test option for shape items
2016-01-18 10:04:53 +09:00
Jürg Lehni
4351ca310f
Fix hit-testing on Shape items and #strokeScaling.
...
Closes #697 .
2016-01-18 00:41:48 +01:00
Jürg Lehni
1ac8e46d55
Various fixes on handling of #strokeScaling and #strokeBounds calculations.
2016-01-17 23:57:56 +01:00
Jürg Lehni
ea7216d9fb
Improve _getStrokeMatrix() fix to correctly handle nested matrices.
2016-01-17 23:39:28 +01:00
Jürg Lehni
fd72ad0937
Correctly handle #strokeScaling in Path item hit-tests.
...
Hit-testing of Shape items with #strokeScaling still needs fixing too.
Relates to #697 .
2016-01-17 21:46:35 +01:00
Jürg Lehni
43a6c57cd6
Correctly handle #strokeScaling when calculating Path and Shape bounds.
...
Relates to #697
2016-01-17 20:27:25 +01:00
Jürg Lehni
40551fcacf
Make Matrix#orNullIfIdentity() private too, and fix error introduced by previous commit.
2016-01-17 19:34:54 +01:00
Jürg Lehni
d292e08ed2
Various renaming and introduction of additional methods in Matrix
...
- Rename Matrix#concatenate() to #append() and #preConcatenate() to #prepend().
- Over #invert() as alternative to #inverted(), directly modifying the matrix.
- Make Matrix#_shiftless() and internal function.
- Introduce versions that return copies instead, named #appended(). (previously #chain()) and #prepended().
- Rename internal Path#_getPenPadding() to #_getStrokePadding().
2016-01-17 19:30:47 +01:00
Jürg Lehni
36cb88de4d
Write documentation for Project#addLayer() and #insertLayer()
...
Closes #903
2016-01-16 16:51:47 +01:00
Jürg Lehni
3a3d46692b
Give view proper Matrix transformation functions, just like on Item.
...
Relates to #832
2016-01-16 15:10:28 +01:00
Jürg Lehni
2669d06642
Merge Item#_remove() and Layer#_remove().
...
And add Project#_changed(), so it can be called through #_getOwner().
2016-01-16 14:21:05 +01:00
Jürg Lehni
1e7faaa95f
Replace Project#addChild(), #insertChild() with #addLayer() and #insertLayer()
...
Also replace #_addToProject() with new #_insertItem() helper, and streamline all #_insertSibling() related methods.
Relates to #903
2016-01-16 13:56:01 +01:00
Jürg Lehni
16e42c68fd
Various minor documentation fixes (mainly capitalization).
2016-01-15 23:22:08 +01:00
Jürg Lehni
96c50abce2
Prevent exception when selecting not inserted segments.
2016-01-15 17:32:01 +01:00
Jürg Lehni
978aaf9f3b
Introduce Item flag to selectively activate on stroke-scaling on classes that support it.
...
Closes #721
2016-01-15 09:56:10 +01:00