Commit graph

3522 commits

Author SHA1 Message Date
Jürg Lehni
57227b9ff6 Fix newly introduce bug in Callback#fire() 2013-11-28 15:48:28 +01:00
Jürg Lehni
ed8de613c4 Improve error handling of PaperScripts on Firefox. 2013-11-27 19:07:02 +01:00
Jürg Lehni
ff538870e0 Fix error lineNumbers in PaperScript code for Firefox and Chrome. 2013-11-27 16:41:39 +01:00
Jürg Lehni
e87bf817de Do not use Base.each() loops where it's not necessary. 2013-11-27 16:02:24 +01:00
Jürg Lehni
18db7c0d56 Fix issue with items with frame events never being removed from _frameItems list. 2013-11-27 12:38:56 +01:00
Jürg Lehni
cbefaf0dd1 Fix handling of internally cached _angle in Point.
Closes #344.
2013-11-27 00:03:03 +01:00
Jürg Lehni
ca3993fe8e Solve variable scoping issue differently by using Base.each() to provide a local closure scope. 2013-11-26 23:46:53 +01:00
Jürg Lehni
c18a5e6ffb Remove Node.js specific bug-fix by msand again, since code won't be executed on Node anymore. 2013-11-26 23:41:24 +01:00
Jürg Lehni
f224bb3e86 Merge github.com:msand/paper.js into msand-master 2013-11-26 23:38:40 +01:00
Jürg Lehni
5beb0f17ed Fix hit-testing on paths with a matrix that is not the identity. 2013-11-26 23:13:11 +01:00
Jürg Lehni
97d94e8401 Allow Path#transformContent to be set to false too. 2013-11-26 23:12:55 +01:00
Jürg Lehni
f3832e0780 Implement setters for Matrix#translation, #rotation and #scaling.
Propagating the changes down to the owning Item too.
2013-11-26 19:28:18 +01:00
Jürg Lehni
b96f9ff57b Rearrange method sequence in Item. 2013-11-26 19:27:09 +01:00
Jürg Lehni
56f25e8742 Implement change propagation in matrices. 2013-11-26 19:03:58 +01:00
Jürg Lehni
8e44049f42 Clean up smooth() code. 2013-11-26 17:32:52 +01:00
Jürg Lehni
78e4f3e1b2 Fix recently introduced issue with Node.js 2013-11-26 17:32:41 +01:00
Jürg Lehni
adac126e6c Rename Ast -> AST 2013-11-25 19:34:39 +01:00
Jürg Lehni
d079e179ac Fix Path#arcBy(to, boolean) 2013-11-25 01:04:51 +01:00
Jürg Lehni
02f46b7ac2 Prevent issues with repeated PaperScript execution on same canvas and HiDPI related scaling. 2013-11-24 23:08:08 +01:00
Jürg Lehni
da9e1f8de7 Define Project#isEmpty() 2013-11-24 22:53:41 +01:00
hkrish
d64df44a78 Correct tolrance check (±EPSILON) in numerical solving methods. 2013-11-24 21:40:22 +01:00
Jürg Lehni
ea62b570f3 Handle _dontFire for all component types. 2013-11-24 16:43:07 +01:00
msand
22a918190d Fix indent. 2013-11-24 17:36:35 +02:00
msand
3b22f185ce Fix to make sure that attribute methods exists before calling. Check of hidpi attribute in canvas was crashing in Node.js, as the getAttribute method is undefined in node-canvas. 2013-11-24 17:26:09 +02:00
Jürg Lehni
af4410953f Various clean-ups regarding the handling of activeLayer, JSON deserialization, DOM insertion and and layer reusing.
JSON deserialization does no longer insert items into DOM twice now, and should therefore be faster.
2013-11-24 16:25:13 +01:00
msand
900cea3123 Fix async loading of PaperScript to use correct scope. 2013-11-24 17:19:45 +02:00
Jürg Lehni
42ec121c0a Optimize Base#merge() to not use Base#each() 2013-11-24 15:03:51 +01:00
hkrish
274f1a4b55 Sort sub-paths before 'reorienting' during boolean calculations 2013-11-24 13:32:01 +01:00
Jürg Lehni
f7a473a598 Make sure color objects are passed to change events also on color components. 2013-11-24 00:53:12 +01:00
Jürg Lehni
8f66f8ac61 Add support for color components. 2013-11-24 00:46:04 +01:00
Jürg Lehni
d56e5552b0 Handle RGB alpha correctly. 2013-11-24 00:29:13 +01:00
Jürg Lehni
b8b02417a0 Implement proper parsing of rgb / rgba CSS strings. 2013-11-24 00:23:32 +01:00
Jürg Lehni
847529eca7 Add support for hex output to Color#toCSS() 2013-11-23 23:51:59 +01:00
Jürg Lehni
baa022237c Expose Palette#components and #values. 2013-11-23 23:00:19 +01:00
Jürg Lehni
8f4b70a7d3 Minor clean up. 2013-11-14 14:42:28 +01:00
hkrish
492e78df7d Handle intersection special case, when two curves' start and end points overlap 2013-11-11 21:20:32 +01:00
Jürg Lehni
1f98d72c5b Switch HiDPI on by default.
Allow deactivation by setting the hidpi attribute to "off" on the canvas.
2013-11-06 15:32:08 +01:00
Jürg Lehni
5439f6ba45 We need to take pixel ratio into account when directly blitting blend-modes onto canvas. 2013-11-06 13:11:54 +01:00
Jürg Lehni
1049214126 Remove ctx.currentPath caching again, since it has the current affine transformation factored in and is thus useless to us. 2013-11-06 12:53:10 +01:00
Jürg Lehni
8d7fc43de2 Implement proper support for HiDPI screens.
For performance reason optional for now, activated by setting the hidpi attribute on the canvas element.
2013-11-06 11:54:05 +01:00
Jürg Lehni
b514d04f58 Export Http so the separate PaperScript scope can reach it. 2013-11-06 02:22:24 +01:00
Jürg Lehni
5630b7e415 Implement caching of drawn Canvas Path objects for better performance.
Already supported on recent Chrome and Safari.
2013-11-04 11:46:20 +01:00
Jürg Lehni
d6be004ee6 Setting a matrix on an item with #transformContent = true should immediately apply it. 2013-11-04 11:43:17 +01:00
Jürg Lehni
73fe0899ae Improve exception when passing an invalid canvas. 2013-11-04 11:42:41 +01:00
Jürg Lehni
67d969ba56 Fix issue with displaying Stats. 2013-11-04 11:42:25 +01:00
Jürg Lehni
dba5a8a9e7 Deactivate Hi-DPI support for now. 2013-11-03 13:29:13 +01:00
Jürg Lehni
893f8fb2cc Fix issues with importing full SVG documents where default styles would not be detected. 2013-11-03 13:20:51 +01:00
Jürg Lehni
1301aea47d Fix issues with importing Ghostscript Tiger. 2013-11-03 12:52:00 +01:00
Jürg Lehni
4320ef76ff Merge #document handling code into importGroup() 2013-11-03 12:36:43 +01:00
Jürg Lehni
7430c3f159 Fix #document importing for all browsers.
Safari doesn't know document.children...
2013-11-03 12:30:49 +01:00
Jürg Lehni
c5262e02bd Make importing SVG documents work for documents with doctypes and comments in the beginning. 2013-11-03 12:23:20 +01:00
Jürg Lehni
1637a31ad7 Allow #importSVG() to import from File objects too. 2013-11-03 12:10:19 +01:00
Jürg Lehni
20253e58a7 Avoid multiple onLoad calls when remote SVG cannot be loaded. 2013-11-03 00:00:46 +01:00
Jürg Lehni
af1c6830e0 Small variable name change. 2013-11-02 21:26:32 +01:00
Jürg Lehni
056dcceacc Implement #importSVG() from external URL. 2013-11-02 21:17:11 +01:00
Jürg Lehni
b8ab0f36f9 Remove unused local variable and comment. 2013-11-02 20:37:23 +01:00
Jürg Lehni
c797f2f0ad Keep the native animation loop running as long as there are unprocessed callbacks. 2013-11-02 20:26:06 +01:00
Jürg Lehni
a6c175c82c Improve DomEvent.requestAnimationFrame() code to only handle canvases that are actually visible. 2013-11-02 20:10:35 +01:00
Jürg Lehni
7e660b05e3 Avoid using the wrong PaperScope in keyboard events. 2013-11-02 14:36:44 +01:00
Jürg Lehni
4f32cc2eea No need for RegExp group in match statement. 2013-11-02 13:25:03 +01:00
Jürg Lehni
7b1f118aed Use same command sequence as in switch statement. 2013-11-02 09:45:11 +01:00
Jürg Lehni
97a29e6ada Improve SVG path data parser. 2013-11-02 09:30:40 +01:00
Jürg Lehni
c99d13178b Consider a Point or Size null if one of the components is null. 2013-11-01 19:25:41 +01:00
Jürg Lehni
4b97d3a6e0 Make sure that the default SVG settings are not lost on import. 2013-11-01 19:00:37 +01:00
Jürg Lehni
9b75362f3e Always respect options.asString 2013-11-01 18:27:20 +01:00
Jürg Lehni
29c00584be Fix SVG parsing issues with multiple concatenated coordinate values
e.g. "1.5.5", is to be read as "1.5" and ".5"
2013-11-01 17:56:16 +01:00
Jürg Lehni
ac862f9bc4 Some minor code clean up and variable renaming. 2013-11-01 17:55:06 +01:00
Jürg Lehni
132f54d362 Define Item#clear() as an alias for Item#removeChildren(), or Path#removeSegments() for paths. 2013-11-01 17:52:27 +01:00
Jürg Lehni
df80eb2f23 Define PaperScope#paper as a reference to the local scope.
And use it to fix Raster JSON example.
2013-11-01 11:46:31 +01:00
Jürg Lehni
c76dae5b06 Implement a new strategy for importing JSON, where it is imported into the item itself, not its children list, if the class match. 2013-11-01 11:26:11 +01:00
Jürg Lehni
70ae7486e9 Clean up white-space. 2013-10-31 12:17:34 +01:00
Jürg Lehni
2a9fe48cc9 Add options.matchShapes support to #exportSVG and improve documentation of various import / export functions. 2013-10-30 16:18:59 +01:00
Jürg Lehni
5d7c7a2409 Improve documentation of #hitTest() 2013-10-30 16:18:15 +01:00
Jürg Lehni
dc732da8d8 Clean up documentation for event handler functions on View and Tool. 2013-10-30 15:38:08 +01:00
Jürg Lehni
0ded3ae0ba Implement PathItem#cubicCurveBy() and #quadraticCurveBy()
Closes #284.
2013-10-30 01:43:55 +01:00
Jürg Lehni
71a7781bdd Fix comment. 2013-10-30 01:27:07 +01:00
Jürg Lehni
cabe253dea Remove unused argument. 2013-10-30 01:26:05 +01:00
Jürg Lehni
2a88042315 Handle importing of SVG gradients for shapes, and drawing of canvas gradients correctly.
Closes #312.
2013-10-30 01:25:13 +01:00
Jürg Lehni
4869376c41 Fix issue with cloning gradient colors. 2013-10-30 00:41:14 +01:00
Jürg Lehni
eecf68b7c3 Clear ctx.shadowColor after ctx.fill() to avoid application to both fill and stroke.
Closes #314.
2013-10-30 00:00:04 +01:00
Jürg Lehni
db882748b1 Fix documentation of Point#angle.
Closes #320.
2013-10-29 23:37:05 +01:00
Jürg Lehni
dec7efc939 Remove unused variable center. 2013-10-29 22:02:29 +01:00
Jürg Lehni
6335393541 Remove unused function argument. 2013-10-29 22:01:49 +01:00
Jürg Lehni
f211c20e77 Make Palette code optional and only include id in paper-full.js 2013-10-29 21:56:00 +01:00
Jürg Lehni
4042d4fc2c Only fire change events if values actually change. 2013-10-29 21:52:42 +01:00
Jürg Lehni
54a24d97b1 Fix typo. 2013-10-29 21:34:51 +01:00
Jürg Lehni
a3ec26dace Improve handling of change events in Palette. 2013-10-29 21:34:12 +01:00
Jürg Lehni
4e34a27da4 Some more work on comments. 2013-10-29 21:20:19 +01:00
Jürg Lehni
1871e2f7c4 Improve comments. 2013-10-29 21:18:09 +01:00
Jürg Lehni
fd96447ac1 Share ellipse reading code between Shape.Ellipse and Path.Ellipse. 2013-10-29 21:15:28 +01:00
Jürg Lehni
aca9968164 Simplify Shape#_contains() code. 2013-10-29 21:09:11 +01:00
Jürg Lehni
4333334014 Simplify Shape#hitTest() code. 2013-10-29 21:06:58 +01:00
Jürg Lehni
6fba727600 Add DOCS comments. 2013-10-29 21:00:24 +01:00
Jürg Lehni
f8d960d834 option.tolerance should always be defined in _hitTest() 2013-10-29 21:00:17 +01:00
Jürg Lehni
ae4ddaeae5 Implement correct hit-tests for rounded rectangle Shape items. 2013-10-29 20:58:30 +01:00
Jürg Lehni
c43752dc3e Use #hasFill() and #hasStroke() more broadly and avoid drawing strokes when strokeWidth is set to 0. 2013-10-29 20:05:39 +01:00
Jürg Lehni
94623f6d3f Keep radius and size in sync in Path.Rectangle. 2013-10-29 19:42:33 +01:00
Jürg Lehni
b86b66d43d Improve documentation. 2013-10-29 19:25:10 +01:00
Jürg Lehni
7f8d9d9e90 Support options.tolerance in Shape#hitTest() 2013-10-29 19:17:42 +01:00
Jürg Lehni
9d60662a28 Check for the occurrence of 'radius' rather than 'center' when deciding to read a center / radius pair for ellipses. 2013-10-29 18:53:55 +01:00
Jürg Lehni
c3aed5277d Use center and radius in all ellipse code, rather than bounding rect.
Simplifies things.
2013-10-29 18:10:30 +01:00
Jürg Lehni
fc9cad009f Implement CompoundPath#_getWindings() and move #_contains() code for both Path and CompoundPath to PathItem. 2013-10-29 17:57:25 +01:00
Jürg Lehni
04286bc1e0 Fix issue with param.trackTransforms
We can only pop() if we push()
2013-10-29 17:56:43 +01:00
Jürg Lehni
b2188be567 Make sure _globalMatrix is not set to false values in Item#rasterize(). 2013-10-29 17:37:45 +01:00
Jürg Lehni
c765e26a08 Implement SVGImport options support.
For now only options.expandShapes, which expands 	Shape items to Path items.
2013-10-29 16:47:02 +01:00
Jürg Lehni
d649b1bb21 Define insert argument for Path#toShape() and Shape#toPath() 2013-10-29 16:45:50 +01:00
Jürg Lehni
77b142bec4 Allow the SVGExport code to assume that the option object is always defined. 2013-10-29 16:41:16 +01:00
Jürg Lehni
dc3bd30ee3 Rename some variables and clean up code a bit more. 2013-10-29 16:19:39 +01:00
Jürg Lehni
de01ef1c21 Clean up code from previous merge. 2013-10-29 16:09:35 +01:00
Jürg Lehni
ef972949c8 Merge branch 'refs/heads/intersect-fix'
Conflicts:
	src/path/Curve.js
2013-10-29 16:06:02 +01:00
hkrish
ac04029f6e Curve-line intersection fix 2013-10-29 15:52:46 +01:00
Jürg Lehni
63e4bd5db2 Do not use the point of the rotated curve to evaluate the parameter of the line.
Use the non-rotated curve instead.
2013-10-29 15:46:20 +01:00
Jürg Lehni
f20e8240cd Use new range feature of solveCubic() 2013-10-29 15:44:42 +01:00
Jürg Lehni
979428b6dc Merge branch 'refs/heads/intersect-fix'
Conflicts:
	src/path/Curve.js
2013-10-29 15:15:59 +01:00
Jürg Lehni
fb27f92ede Clean up intersection-fix code. 2013-10-29 10:16:20 +01:00
Jürg Lehni
8ae1105236 Merge branch 'refs/heads/intersection-fix' 2013-10-29 10:03:26 +01:00
Jürg Lehni
5a462f42b7 Improve some comments / docs. 2013-10-29 09:42:59 +01:00
Jürg Lehni
c579433b3d Fix bug in Raster.onLoad()
It was executing in wrong scope on websites with multiple scopes.
2013-10-29 09:42:58 +01:00
Jürg Lehni
160fe25cd1 Improve documentation of #importSVG() methods. 2013-10-29 09:42:58 +01:00
hkrish
bec1a91812 Calculate correct parameter for Curve-Line intersections 2013-10-29 00:10:20 +01:00
Jonathan Puckey
61ecf44140 Fix spelling mistake in CanvasView#initialize. Closes #316. 2013-10-25 17:15:54 +02:00
Jürg Lehni
b4850b572a Improve variable naming. 2013-10-20 01:57:11 +02:00
Jürg Lehni
cc201655af Fix comment. 2013-10-20 01:54:53 +02:00
Jürg Lehni
e6ef5e7e17 Fix hit-test for compound paths again. 2013-10-20 01:54:20 +02:00
Jürg Lehni
ddeacb1763 More code clean up. 2013-10-20 01:41:31 +02:00
Jürg Lehni
caa50236dd Simplify winding algorithm by reusing orientation check. 2013-10-20 01:24:07 +02:00
Jürg Lehni
7c4518e4d0 Clean up some variable names. 2013-10-20 00:59:12 +02:00
Jürg Lehni
b4651a18c6 Implement #getItem() on Project and Item, similar to #getItems() but returning only the first match. 2013-10-19 13:02:53 +02:00
Jürg Lehni
1a645a1adb Implement function callbacks for item matching. 2013-10-19 12:38:36 +02:00
Jürg Lehni
4fb6a5d949 Implement #getItems(match) on Project and Item as a simple and efficient query interface. 2013-10-19 12:27:13 +02:00
Jürg Lehni
49a8ea24af No need for Object.getPrototypeOf().
Simply point _filtering directly at the original object.
2013-10-19 12:08:04 +02:00
Jürg Lehni
d59ed6d7c0 Implement a way to use fast _filtered inheritance trick and still use #hasOwnProperty() checks in Base#_set() 2013-10-19 12:05:53 +02:00
Jürg Lehni
0b7e128426 Only rely on _drawCount for drawing related things, and caching where it allows.
Project#selectedItems was out of sync until the next draw loop.
2013-10-18 21:52:22 +02:00
Jürg Lehni
5db6db3b76 Improve selection serialization to JSON and fix issue in deserialization. 2013-10-18 21:12:25 +02:00
Jürg Lehni
782f5c8f7e Fix issue with reading selected segment points from JSON when there are no handles.
The segment short form was misunderstood by the constructor.
2013-10-18 20:58:06 +02:00
Jürg Lehni
f7c21144a1 Improve handling of strokes in Path#hitTest().
Have it match stroke locations when option.stroke is set even when the path has no stroke.
2013-10-18 20:27:47 +02:00
Jürg Lehni
b91c8f93f8 Remove Curve. _getEdgeSum() again, and inline code in Path.isClockwise() 2013-10-18 19:51:54 +02:00
Jürg Lehni
1fc9f882ca Fix a minor bug in CompoundPath#contains(), improve comments and clean up code. 2013-10-18 19:49:05 +02:00
Jürg Lehni
304ecbc3be Define compoundChildren hitTest option to get matching children instead of parent. 2013-10-18 15:40:41 +02:00
Jürg Lehni
f8106ae18f Improve code handling special winding cases. 2013-10-18 15:20:32 +02:00
Jürg Lehni
75a209c002 Handle more special cases in winding algorithm. 2013-10-18 15:15:54 +02:00
Jürg Lehni
5d0fd8f970 Implement Style#windingRule and use it in Path#contains(). 2013-10-18 14:54:13 +02:00
Jürg Lehni
4f27be8f12 Include new, improved point in path algorithm based on winding number.
It's also possible to switch to using the canvas's native isPointInPath() through options.nativeContains
2013-10-18 14:22:59 +02:00
Jürg Lehni
eae526f38c Update Numerical.solveQuadratic() / solveCubic() to optionally filter results to be in a given range. 2013-10-18 13:52:01 +02:00
Jürg Lehni
523b9ea592 Fix syntax error. 2013-10-18 11:50:36 +02:00
Jürg Lehni
89704243b1 Simplify Numerical.solveQuadratic() 2013-10-18 11:48:23 +02:00
Jürg Lehni
a07538b205 Use same tolerance in Curve.isLinear() as in Curve#isLinear(). 2013-10-17 20:19:34 +02:00
Jürg Lehni
085fa3e1c6 Set named arguments at the end, since some depend on geometry to be defined (e.g. #clockwise). 2013-10-17 14:03:05 +02:00
Jürg Lehni
73d2c34088 Implement item-level #equals() method and clean up other equals methods. 2013-10-17 13:08:54 +02:00
Jürg Lehni
9976033655 Implement serialization of selection. 2013-10-17 12:04:11 +02:00
Jürg Lehni
3958d35f28 Change behavior of Path#fullySelected.
Setting it on empty paths does the same as Path#selected.
2013-10-17 12:03:46 +02:00
Jürg Lehni
c2a34d9f1f Implement an easier approach in serialization to handle the default value of leading. 2013-10-17 11:53:34 +02:00
Jürg Lehni
1eb6b49e8a Allow serialization values to mark themselves as _default.
Solves unnecessarily serialized leading values.
2013-10-17 11:47:46 +02:00
Jürg Lehni
efe8bab129 Revert previous Style change. 2013-10-17 11:40:44 +02:00
Jürg Lehni
2324fbc565 Define correct style default for leading. 2013-10-17 11:14:34 +02:00
Jürg Lehni
922f224cbd Finally remove the _gradientMatrix hack. 2013-10-16 23:47:21 +02:00
Jürg Lehni
9956a6ff51 Implement Shape#toPath(), analogue to Path#toShape().
This way is much simpler though.
2013-10-16 23:44:50 +02:00
Jürg Lehni
51cf1cfec6 Clean up Path#toShape(). 2013-10-16 23:35:50 +02:00
Jürg Lehni
772f8175e4 Remove path to shape guess-work from SVGExport. 2013-10-16 23:21:29 +02:00
Jürg Lehni
c4c7a37993 Implement Path#toShape(), Segment#isColinear(), Segment#isOrthogonal() and Segment#isArc(). 2013-10-16 23:10:03 +02:00
Jürg Lehni
751dfe52ea SVG: Define additional orthogonal check when determining shape type.
Closes #283.
2013-10-16 17:06:29 +02:00
Jürg Lehni
be5a73a61d SVG: Implement support for Shape. 2013-10-16 16:47:00 +02:00
Jürg Lehni
8ab6c61b0d Rename Shape#type to Shape#shape, to avoid clash with Item#type. 2013-10-16 16:46:22 +02:00
Jürg Lehni
3c0d1f26db Replace accidental semi-colon. 2013-10-16 16:14:37 +02:00
Jürg Lehni
953bba4c7b SVG: Use Shape instead of Path constructors for primitive shapes. 2013-10-16 16:12:46 +02:00
Jürg Lehni
392cef3961 Add missing colon. 2013-10-16 16:11:08 +02:00
Jürg Lehni
b581c84d8b Move CompoundPath#reduce() to Item#reduce(). 2013-10-16 16:10:28 +02:00
Jürg Lehni
c0c5695b5a Fix indentation. 2013-10-16 16:09:34 +02:00
Jürg Lehni
fb6ff59218 Improve ProxyContext: Use JSON.stringify() for rendering values correctly, and streamline code. 2013-10-16 16:09:11 +02:00
Jürg Lehni
d45ba19914 SVG: Use new Path.Ellipse constructor. 2013-10-16 15:28:59 +02:00
Jürg Lehni
01a0920c92 SVG: Fix faulty parsing of matrix values. 2013-10-16 15:27:49 +02:00
Jürg Lehni
f63cb40723 Fix SVG error in importing transformed gradients with highlights. 2013-10-16 15:09:23 +02:00
Jürg Lehni
1decf451b4 Implement efficient filtering of already consumed values in argument reading from object literals. 2013-10-16 15:08:44 +02:00
Jürg Lehni
9eb1c104da Implement Shape#clone() 2013-10-16 15:04:50 +02:00
Jürg Lehni
b35296ef3e Improve Shape.Ellipse to support center & radius parameters, and update documentation. 2013-10-16 15:04:37 +02:00
Jürg Lehni
b325aebc77 Docs: More smaller fixes. 2013-10-16 15:03:29 +02:00
Jürg Lehni
543609c0c6 Have Path.Ellipse constructor support negative radius values correctly. 2013-10-16 14:25:14 +02:00
Jürg Lehni
c945bf7908 Docs: Various smaller clean ups. 2013-10-16 14:20:13 +02:00
Jürg Lehni
3af179e2cf Docs: Improve Path constructors. 2013-10-16 14:19:25 +02:00
Jürg Lehni
41d6650666 Add support for named center & radius arguments to Path.Ellipse. 2013-10-16 13:32:40 +02:00
Jürg Lehni
4b636dd31c Clean up Path constructors code. 2013-10-16 13:26:08 +02:00
Jürg Lehni
8fdcbce5ac Improve argument reading in Segment. 2013-10-16 13:15:08 +02:00
Jürg Lehni
ac5c45906f Update to latest straps.js, with changed Base.create() method. 2013-10-14 23:37:43 +02:00
Jürg Lehni
2263afea59 Start implementing rounded rectangles in Shape.Rectangle. 2013-10-14 19:57:28 +02:00
Jürg Lehni
7285ec636a Improve CanvasView constructor.
Support canvas / size arguments, but not both together, and throw exception if both fail.
2013-10-14 16:06:30 +02:00
Jürg Lehni
a3d0e0d462 Clean up throw statements.
Never throw plain strings.
2013-10-14 16:05:50 +02:00
Jürg Lehni
b9ba2364fe Move Shape#isEmpty() to right place. 2013-10-14 09:15:34 +02:00
Jürg Lehni
198305b75c Remove doc comment since Item#isEmpty() is already documented, and move it to an inline comment. 2013-10-14 09:14:59 +02:00
Oliver Jones
df7f1fe874 Override default isEmpty method for Shape
Fixes (new Group([new Shape.Rectangle(...)])).bounds throwing ReferenceError when using Item's isEmpty
2013-10-12 19:28:45 +01:00
hkrish
e20ff3b0a1 Calculate correct parameter for linear segments 2013-10-11 22:03:07 +02:00
hkrish
f0434548c6 Fix regression issues with Curve-Line intersection code 2013-10-11 20:48:34 +02:00
Jürg Lehni
dfa1687a90 Adapt to new bower_components directory. 2013-10-11 00:20:30 +02:00
Jürg Lehni
60732e8456 No need for default parameter. 2013-10-10 23:09:18 +02:00
Jürg Lehni
c68a7d33da Switch from options.browser and options.node to options.environment 2013-10-10 23:09:00 +02:00
Jürg Lehni
6b45a9382c Replace typeof x !== 'undefined' checks with typeof x === 'object'. 2013-10-10 20:36:33 +02:00
Jürg Lehni
94fac965ec Minor improvement in Base.equals() 2013-10-10 20:15:56 +02:00
Jürg Lehni
c5e43778bc Allow the minification of the undefined variable by defining it as a local parameter inside the paper scope. 2013-10-10 20:15:32 +02:00
Jürg Lehni
d158056899 Optimise DomElement.getPrefixValue() 2013-10-10 16:40:46 +02:00
Jürg Lehni
22e13df102 Implement support for Hi-DPI canvas on Retina screens. 2013-10-10 16:31:24 +02:00
Jürg Lehni
03efd56df7 Fix strange issue on iOS 7 where a simple regular expression appears to cause a complete browser crash.
Closes #306.
2013-10-10 14:47:27 +02:00