Commit graph

819 commits

Author SHA1 Message Date
Jonathan Puckey
de466edc23 Flock example: space bar toggles selection state of items in the document. 2011-04-28 20:57:04 +02:00
Jonathan Puckey
b1d8922fd1 Merge remote branch 'origin/master' 2011-04-28 20:46:39 +02:00
Jonathan Puckey
1781b53b55 Flock example: resize the document whenever the browser window is resized. 2011-04-28 20:46:24 +02:00
Jonathan Puckey
c14ea8f7b5 Document: resize canvas element when Document#setSize is called. 2011-04-28 20:42:20 +02:00
Jürg Lehni
6d84dc3351 Segment#isSelected() only checks for selection state of point. We need to check _selectionState instead to mirror behaviour in #_setSelected(). 2011-04-28 19:04:00 +01:00
Jürg Lehni
d098c6e8b2 Fix index issue in #removeSegments(). 2011-04-28 19:03:05 +01:00
Jürg Lehni
121ec5a93f Allow #removeSegments() to be called without arguments, in which case all segments are removed. 2011-04-28 19:02:34 +01:00
Jürg Lehni
ea510c2403 Separate Path#remove(), #remove(index) & #remove(from, to) into #removeSegment(index) and #removeSegments(from, to). 2011-04-28 15:42:16 +01:00
Jürg Lehni
5211e86e3a Rename Point#isParallel() to #isColinear(), reimplement it using #cross() and add #isOrthogonal() as well, using #dot(). 2011-04-28 15:12:58 +01:00
Jonathan Puckey
4b4e092f90 Undo previous compressing of Rectangle functions. 2011-04-28 15:44:05 +02:00
Jürg Lehni
3916db4eb8 Fix location of browser related files in load.js. 2011-04-28 13:25:34 +01:00
Jürg Lehni
037adc074d Merge remote-tracking branch 'origin/master' 2011-04-28 13:23:27 +01:00
Jürg Lehni
4d999d57e2 Replace all type converting string compares with ===, !==. 2011-04-28 13:23:17 +01:00
Jonathan Puckey
dd2b546914 Merge remote branch 'origin/master' 2011-04-28 14:22:44 +02:00
Jonathan Puckey
8f2bc422dd Point: compress round, ceil, floor and abs functions. 2011-04-28 14:22:25 +02:00
Jonathan Puckey
b4ee975cfb Rectangle: minor changes. 2011-04-28 14:15:12 +02:00
Jürg Lehni
115ef45464 Remove unnecessary .0 since numbers are all the same in JavaScript. 2011-04-28 13:13:33 +01:00
Jürg Lehni
0d697403b5 Clean up Path#curveTo() code. 2011-04-28 13:12:21 +01:00
Jürg Lehni
7dce6f3a6c Merge remote-tracking branch 'origin/master' 2011-04-28 13:11:58 +01:00
Jürg Lehni
f69153844b Make #setContextStyles() a 'protected' function. 2011-04-28 13:04:12 +01:00
Jonathan Puckey
e0b5dbad21 Rectangle: compress unite, intersect and include. 2011-04-28 13:45:55 +02:00
Jonathan Puckey
c67128ca76 Add tests for strokeBounds of groups. 2011-04-28 12:56:30 +02:00
Jonathan Puckey
ad8dfe91c7 Implement Raster#getStrokeBounds(). 2011-04-28 12:56:08 +02:00
Jonathan Puckey
e1f5d4952d Minor cleanups and fixes in Item. 2011-04-28 12:50:53 +02:00
Jonathan Puckey
861812f3ad Fix bug in previous commit. 2011-04-28 12:39:55 +02:00
Jonathan Puckey
1666a36210 Have Item#_getBounds return a normal rectangle when called with includeStroke flag, since Item#getStrokeBounds is read only. 2011-04-28 12:38:57 +02:00
Jonathan Puckey
eed054af17 Item: implement getStrokeBounds, move getBounds functionality into _getBounds with an includeStroke flag. Also simplify the _getBounds code. 2011-04-28 12:33:03 +02:00
Jonathan Puckey
32f04f6162 Document: implement selectAll() and deselectAll(). 2011-04-28 11:54:26 +02:00
Jürg Lehni
d71450c0b1 Make sure selected argument is always a boolean. 2011-04-28 10:05:43 +01:00
Jürg Lehni
a9ea10ca7f Move version of #getBounds() that handles children to Item, to eliminate duplicated code. 2011-04-28 10:04:36 +01:00
Jürg Lehni
6468732d96 Some changes to Key code, rename alt to option to go with Scriptographer, and check for paper.toolt to exist since it caused errors when reloading a page. 2011-04-28 08:49:56 +01:00
Jürg Lehni
26111da357 Use CanvasProvider in Document to produce canvas. 2011-04-28 08:49:05 +01:00
Jürg Lehni
81461764a5 Add conditional code to CanvasProvider, with a TODO for implementing functionality for the server. 2011-04-28 08:48:50 +01:00
Jürg Lehni
cf79080682 Move browser related code to browser folder and use conditionals to not include them when producing paper.js for server. 2011-04-28 08:48:28 +01:00
Jürg Lehni
b5d1662b58 Shorten definition of heart shape. 2011-04-27 23:19:33 +01:00
Jürg Lehni
6a483fa8be Rename CurveLocation related functions to *At(offset), and add optional isParameter argument that defines whether offset is a length or a description of curve index / curve parameter. 2011-04-27 21:40:52 +01:00
Jürg Lehni
ea6cf24aae Rename length parameter to more appropriate offset, to reflect recent name changes. 2011-04-27 21:23:57 +01:00
Jürg Lehni
3501e14c51 Remove comment about pending port that has been backported to Scriptographer. 2011-04-27 21:13:32 +01:00
Jürg Lehni
5200434a07 Move lines.html to Animated folder. 2011-04-27 20:55:28 +01:00
Jürg Lehni
c2fbcbcaa8 Use Curve#getLength(from, to) rather than cloning and dividing. 2011-04-27 20:52:24 +01:00
Jürg Lehni
346493fb7c Replace calls to getters with their internal property in all cases where getter does not perform additional magic. 2011-04-27 20:48:41 +01:00
Jürg Lehni
016f4c15aa Rename CurveLocation#getLength() and #getCurveLength() to #getOffset() and #getCurveOffset(), and seperate Path#getLength([location]) into #getLength() and #_getOffset(). 2011-04-27 20:08:57 +01:00
Jürg Lehni
b0a1f4b1a9 Add missing Path#getPoint(length). 2011-04-27 19:28:39 +01:00
Jürg Lehni
c836012d3d Add CurveLocation#getTangent() and #getNormal() and use them in Path's versions. 2011-04-27 19:26:03 +01:00
Jürg Lehni
bf0bc81892 Fix various minor bugs in CurveLocation: We cannot rely on most of its field to always be set and need to call getters instead. 2011-04-27 19:24:40 +01:00
Jürg Lehni
cc06a6f128 Remove CurveLocation#getPath() again as its functionality is provided by #getItem() already. 2011-04-27 19:22:57 +01:00
Jürg Lehni
ebc9bc88c4 Use 0 instead of null for empty bit flag fields. 2011-04-27 19:11:22 +01:00
Jürg Lehni
c6d96784ba Further simplify and compress code. 2011-04-27 18:16:32 +01:00
Jürg Lehni
f71967f3d3 Further simplify and compress code. 2011-04-27 17:57:56 +01:00
Jürg Lehni
6b6f27cb6e Add TODOs about not returning -1 for undefined. 2011-04-27 17:53:59 +01:00