Commit graph

920 commits

Author SHA1 Message Date
Jonathan Puckey
4649835d5b Document: fix selection drawing in Firefox. 2011-05-07 18:18:14 +01:00
Jürg Lehni
20409f3084 Use Base.splice() for Layers too. 2011-05-07 17:27:19 +01:00
Jürg Lehni
566f52201c Fix typo. 2011-05-07 17:11:12 +01:00
Jürg Lehni
70d0dd9c0c Move #moveTo() to the same scope as the other drawing commands, and add explaining comments. 2011-05-07 17:11:06 +01:00
Jürg Lehni
979bda52ab We don't need the empty #initialize(). 2011-05-07 17:05:42 +01:00
Jürg Lehni
d254d9542d Add ChangeFlags.HIERARCHY, for future change notifications when children get rearranged. 2011-05-07 16:52:54 +01:00
Jürg Lehni
6c3fd5953a Simplify Symbol#setDefinition(). 2011-05-07 16:14:12 +01:00
Jürg Lehni
8c7b253bc2 Add Base.splice() to handle lists of items with _index referneces and use it for paper.documents and Item#children. 2011-05-07 16:11:05 +01:00
Jürg Lehni
b44e796475 Make sure getters dont return undefined but null instead. 2011-05-07 16:10:38 +01:00
Jürg Lehni
79f55aa908 Fix recently introduce error in append(). 2011-05-07 15:41:07 +01:00
Jürg Lehni
999fb129cc Some code clean ups. 2011-05-07 15:40:02 +01:00
Jürg Lehni
81c1b2dcce Clean up Path#_add() a bit. 2011-05-07 15:38:36 +01:00
Jürg Lehni
450d277fb4 Avoid necessity of try-catch around code evaluation by declaring all local variables that we are looking for. 2011-05-07 15:38:14 +01:00
Jürg Lehni
afe61d61ac Fix recently introduced errors in setting of Tool#_document. 2011-05-07 15:37:12 +01:00
Jürg Lehni
9ef542ff9a Add comment to #_canged(). 2011-05-07 14:57:20 +01:00
Jürg Lehni
3ff2880ca8 Make Item#setDocument() and #removeFromParent() private. 2011-05-07 14:50:48 +01:00
Jürg Lehni
ef8a2aad9b Remove Tool#setDocument(). 2011-05-07 14:50:31 +01:00
Jürg Lehni
2f6fbcba74 Check result from removeFromParent(). 2011-05-07 14:34:57 +01:00
Jürg Lehni
59e2783979 Use tripple equal operators for string compares now. 2011-05-07 14:32:27 +01:00
Jürg Lehni
4bd12feb49 Merge branch 'master' of github.com:scriptographer/paper.js 2011-05-07 14:18:50 +01:00
Jürg Lehni
4e6e855461 Change '// TODO: Port' comments to '// PORT:'. 2011-05-07 14:18:27 +01:00
Jonathan Puckey
ba6139cd48 Merge remote branch 'origin/master' 2011-05-07 13:56:03 +01:00
Jonathan Puckey
97b7dacfa2 Tool: check for event first, before checking for event.targetTouches. 2011-05-07 13:51:26 +01:00
Jürg Lehni
430a8fb290 Do not pass document as the item for Document#currentStyle. 2011-05-07 13:39:40 +01:00
Jürg Lehni
dabc2b97ed Implement change-notification in a proper way, using ChangeFlags that tell it what exactly has changed, and clearing caches accordingly. 2011-05-07 13:39:17 +01:00
Jürg Lehni
53cc1cd908 Apply #position optimisation through caching to all items, not just PlacedSymbol. 2011-05-07 13:13:19 +01:00
Jürg Lehni
1413094be2 Shorten PlacedSymbol#initialize(). 2011-05-07 13:12:46 +01:00
Jürg Lehni
15b7cfec0b Shorten Item#translate(). 2011-05-07 13:09:04 +01:00
Jürg Lehni
72976f4191 Use internal _position in PlacedItem and transform it along when a matrix is applied. 2011-05-07 11:36:16 +01:00
Jürg Lehni
34785534e0 Use getPosition() rather than getBounds().getCenter(). 2011-05-07 11:25:46 +01:00
Jürg Lehni
17b5354773 Include util files at the end of the library, not the beginning. 2011-05-07 11:24:01 +01:00
Jürg Lehni
6af787e475 Move access to Numerical.TOLERANCE out of the injection scope into getBounds(), so util files can be included at the end of the library again. 2011-05-07 11:23:46 +01:00
Jürg Lehni
3a5aa466de Add comments about things to change. 2011-05-07 10:07:21 +01:00
Jürg Lehni
53a4685248 Merge branch 'master' of github.com:scriptographer/paper.js 2011-05-07 09:56:46 +01:00
Jürg Lehni
6083faaf80 Use getter instead of beans property. 2011-05-07 09:56:27 +01:00
Jürg Lehni
5e4369d800 No need to call setter, we can set internal property directly here. 2011-05-07 09:55:56 +01:00
Jonathan Puckey
74dd89a68b Use Point#read in Point#min and Point#max. 2011-05-06 15:37:55 +01:00
Jürg Lehni
91919987a6 We need the paper object before including utils. 2011-05-06 13:45:18 +01:00
Jürg Lehni
819c1c098c Clean up BlendMode code, and add comments about things not working yet. 2011-05-06 13:41:36 +01:00
Jürg Lehni
0fc7216f1c Fix typos introduced in recent commit. 2011-05-06 13:40:43 +01:00
Jürg Lehni
8a4fe7eb42 Tiny code simplification. 2011-05-06 13:29:21 +01:00
Jürg Lehni
1e7fab2cbc Rearrange file sequence to have utils first. 2011-05-06 13:29:05 +01:00
Jürg Lehni
c36db3a55c Introduce private faster Matrix#_transform* methods that lack arguments checks, and use them internally. 2011-05-06 13:28:35 +01:00
Jürg Lehni
aed1bb0878 Use Numerical.TOLERANCE instead of hardcoded one. 2011-05-06 12:06:05 +01:00
Jürg Lehni
218c7ce2fc Use Paperjs.org blue instead of that other blue. 2011-05-06 12:04:18 +01:00
Jürg Lehni
66602c9cec Remove comment about necessity to reverse coordinate system. 2011-05-06 01:27:47 +01:00
Jürg Lehni
0b082289a6 Simplify Path#arcTo() a lot (get rid of necessity to reverse coordinate system in y-direction, etc). 2011-05-06 01:26:23 +01:00
Jürg Lehni
18ef19649c Remove comment about unnecessary change. 2011-05-06 00:45:46 +01:00
Jürg Lehni
680ae49ec8 Clean up code a bit and add comment about possible further optimsiations. 2011-05-06 00:44:54 +01:00
Jürg Lehni
a3065a59d1 Simplify Path#arcTo(). 2011-05-06 00:42:10 +01:00
Jürg Lehni
a4b37a6278 Simplify addJoin(). 2011-05-06 00:39:44 +01:00
Jürg Lehni
a3da96e8be Remove notify parameter again from _add(). 2011-05-06 00:18:56 +01:00
Jürg Lehni
20cf32d599 Resolve question about wether last segment should be included in join or not. 2011-05-06 00:14:09 +01:00
Jonathan Puckey
6fa993a2a5 Implement equals function for GradientColor, Gradient & GradientStop. 2011-05-05 20:28:28 +01:00
Jonathan Puckey
140f7dee44 Imlement Stats in the dev version of Paper. 2011-05-05 20:23:22 +01:00
Jonathan Puckey
7e24a9170f Document: subtract the offset of the canvas element from the size of the window when resizing. 2011-05-05 20:19:54 +01:00
Jonathan Puckey
c8f13b4ace Document#initialize: use canvas.attributes.resize instead of canvas.getAttribute('resize'). 2011-05-05 20:18:22 +01:00
Jonathan Puckey
0e42f5be6d Document: when the canvas element that is passed to the constructor has a resize attribute, resize the document to the size of the window whenever the user resizes the window. 2011-05-05 16:17:30 +01:00
Jonathan Puckey
f806c68dc0 Merge remote branch 'origin/master' 2011-05-05 13:22:09 +01:00
Jürg Lehni
b50b0f9e5a Fix bug in Color#equals() resulting in it always returning true. 2011-05-05 13:19:36 +01:00
Jürg Lehni
478002ea1c Add comment about return undefined rather than null for unclear styles, and fix test. 2011-05-05 13:11:40 +01:00
Jürg Lehni
93fe0216d2 Add Path#addSegment(s) and #insertSegment(s) and define #add() and #insert() as a switch between these versions based on the amount and nature of parameters. 2011-05-05 12:35:14 +01:00
Jonathan Puckey
19a767e6f6 Merge remote branch 'origin/master' 2011-05-05 11:42:35 +01:00
Jürg Lehni
7894a48ace Add parameter to Path#_add() that controls wether path is notified of change. 2011-05-05 11:40:46 +01:00
Jürg Lehni
ee6d593620 Cache strokeBounds and bounds only if no transformation matrix is passed. 2011-05-05 11:21:09 +01:00
Jürg Lehni
32ed418bdf Remove unused parameter. 2011-05-05 11:20:37 +01:00
Jürg Lehni
5dfec35dc1 Allow colors to be compare to null. 2011-05-05 11:20:26 +01:00
Jürg Lehni
a59fab0409 Only change style and notify item of change if it differs from current one. 2011-05-05 11:16:26 +01:00
Jürg Lehni
1279e820aa Use arc() instead of rect() to draw handles. 2011-05-05 11:01:20 +01:00
Jürg Lehni
14549a383b Improve Item#_getBounds(). 2011-05-05 00:16:28 +01:00
Jürg Lehni
7334e824f5 Further optimise PathStyle code. 2011-05-05 00:08:55 +01:00
Jürg Lehni
23a29ced98 Optimise and comment PathStyle code. 2011-05-05 00:05:36 +01:00
Jürg Lehni
cc0f4a3f7e Add PathStyle#clone(). 2011-05-05 00:01:17 +01:00
Jürg Lehni
ab9cce137c Separate PathStyle constructor into internal PathStyle.create(item, style) and public PathStyle(style). 2011-05-05 00:00:41 +01:00
Jürg Lehni
bc80c58558 Add Base.formatNumber() to format numbers in the same way as Scriptographer (precision of up to 5 fractional digits) and use it in the various #toString() functions. 2011-05-04 19:42:50 +01:00
Jonathan Puckey
2a65e19656 Merge remote branch 'origin/master' 2011-05-04 18:49:41 +01:00
Jonathan Puckey
648f0d7db6 Tool & Event: support touch events & call onMouseMove (if present) while dragging when there is no onMouseDrag handler. 2011-05-04 18:49:30 +01:00
Jürg Lehni
a5099fd51d Add support for insertion of multiple segments at once to Path#_add(), #add() and #insert(), and change code that relies on these methods. 2011-05-04 18:42:40 +01:00
Jürg Lehni
bdbbca487f Remove rounding in drawSelectedBounds(). 2011-05-04 17:44:08 +01:00
Jürg Lehni
3eb17f2953 Refrain from hacker style. 2011-05-04 15:20:42 +01:00
Jürg Lehni
13dd088043 Shorten Base.read() a bit. 2011-05-03 12:10:11 +01:00
Jürg Lehni
6b4f142838 Improve Base.readAll() to check entries for arrays and pass them to constructors as arguments rather than their containing array. 2011-05-03 12:06:59 +01:00
Jürg Lehni
49645f8a0d Do not use short-forms and syntax magic in core API. 2011-05-03 09:34:07 +01:00
Jürg Lehni
728bf0441c Clean up Path#moveTo() and #lineTo() commands. 2011-05-03 09:12:07 +01:00
Jürg Lehni
516557808e Add Base.readAll(), to repeatetly apply Base.read() on all elements of an array and return the result in a new array. 2011-05-03 08:59:55 +01:00
Jürg Lehni
e0edddd5f6 Clean up code ('){' -> ') {')). 2011-05-03 08:57:09 +01:00
Jürg Lehni
66465541c6 Clean up code (if() -> if ()). 2011-05-03 08:55:01 +01:00
Jürg Lehni
52a73e86ce Clean up code (for() -> for ()). 2011-05-03 08:54:13 +01:00
Jürg Lehni
3af24e6178 Replace hidden getter call with direct access of internal property. 2011-05-03 08:47:52 +01:00
Jürg Lehni
a0e211c691 Big refactoring of how curves are kept in sync with segments (direct references rather than indices), along with various tests. 2011-05-03 00:25:23 +01:00
Jürg Lehni
47c88a1252 Compress math functions in Size the same way as in Point. 2011-05-02 23:09:59 +01:00
Jonathan Puckey
2ee7081c14 Merge remote branch 'origin/master' 2011-05-02 12:25:32 +02:00
Jonathan Puckey
41120cf4d9 Various small code cleanups. 2011-05-02 12:23:42 +02:00
Jürg Lehni
98ab342235 Shorten #_transformCoordinates() a bit. 2011-05-02 08:59:51 +01:00
Jürg Lehni
26b70309a8 Improve various #toString() functions. 2011-05-02 08:57:55 +01:00
Jürg Lehni
0a4150a5c9 Add beginning of value caching (_length, _bounds) and change tracking to invalidate cached values. 2011-05-02 00:17:21 +01:00
Jürg Lehni
4bac4b89f6 Clean up other Point.create() calls. 2011-05-01 23:37:15 +01:00
Jürg Lehni
51e5a29a9d Change Point#set() calls back to clearer multi-line notation. 2011-05-01 23:36:08 +01:00
Jürg Lehni
756c4f37c5 Compress Point#getQuadrant() to one line. 2011-05-01 23:34:00 +01:00
Jürg Lehni
77c19601ff Improve Point#normalize(). 2011-05-01 23:32:37 +01:00
Jürg Lehni
2cdb15f2d6 Fix recently renamed functions in commented out code. 2011-05-01 23:29:15 +01:00
Jürg Lehni
4b832e0ea9 Simplify Point#setLength(). 2011-05-01 23:28:57 +01:00
Jürg Lehni
b0282b9bd4 Change Segment to be aware of its index in the segment list and have the curves list update automatically on each change to segments. 2011-05-01 13:27:53 +01:00
Jürg Lehni
0680a50fd2 Fix yet another two bugs in CurveLocation. 2011-05-01 13:18:36 +01:00
Jürg Lehni
08e779d560 Fix two bugs in CurveLocation. 2011-05-01 13:16:25 +01:00
Jürg Lehni
6bbfd55240 Clean up Path#setSegments and begin moving of logic to keep Path#curves in sync away from Path#getCurves() to Path#setClosed(). Requires more work, e.g. Path#_add(). 2011-04-30 23:44:37 +01:00
Jürg Lehni
6cca355e20 Add Curve.create() as faster internal constructor. 2011-04-30 23:29:10 +01:00
Jürg Lehni
053fb2d955 Move Path#get/setSegments back to top and remove test-code for array object extension. 2011-04-30 23:24:39 +01:00
Jürg Lehni
781b315808 Add getter/setter for Path#closed. 2011-04-30 23:22:29 +01:00
Jürg Lehni
bf3bd13540 Simplify Path#cubicCurveTo(). 2011-04-30 23:17:19 +01:00
Jürg Lehni
dd442bf960 Correct comment. 2011-04-30 23:06:41 +01:00
Jürg Lehni
13dca647c3 Simplify Point#rotate(). 2011-04-30 23:06:21 +01:00
Jürg Lehni
2b5e9296f7 Simplify Point#getDirectedAngle(). 2011-04-30 23:05:31 +01:00
Jürg Lehni
ab634f2391 Remove unneeded Point#getDistanceSquared(). 2011-04-30 23:04:23 +01:00
Jürg Lehni
cd58351864 Add comment about porting chainable calls back to Sg. 2011-04-30 22:30:54 +01:00
Jonathan Puckey
b1d8922fd1 Merge remote branch 'origin/master' 2011-04-28 20:46:39 +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
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
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
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
Jürg Lehni
4bfc56bb6d Simplify and compress code a bit. 2011-04-27 17:53:23 +01:00
Jonathan Puckey
0700c51a85 Simplifications in Item#isDescendant & Item#isAncestor. 2011-04-27 16:16:05 +02:00
Jonathan Puckey
55fc2bc99c Some minor changes to Item. 2011-04-27 16:10:23 +02:00
Jonathan Puckey
81a15379e5 Have Path#reverse also reverse the segment handles. 2011-04-27 15:49:06 +02:00
Jürg Lehni
ccbdb2abe3 Make preventDefault() work on IE too. 2011-04-27 12:41:52 +01:00
Jürg Lehni
ae3ec6f2d7 Remove comment about pending port that has been backported to Scriptographer. 2011-04-27 12:36:04 +01:00
Jürg Lehni
9671ac6dbc Remove comment about pending port that has been backported to Scriptographer. 2011-04-27 12:30:17 +01:00
Jürg Lehni
e6a0f48256 Further clean-up code, as we only need previous / next references inside one sub-condition. 2011-04-27 12:26:10 +01:00
Jürg Lehni
138ec7d93c No need to perform cyclic looping here now, since #getNext/Previous() does that for us. 2011-04-27 12:24:04 +01:00
Jürg Lehni
a251a24347 Add some TODOs to check. 2011-04-27 12:21:47 +01:00
Jürg Lehni
0e89466a11 Add cyclic looping to Segment#previous/next for closed paths. 2011-04-27 12:21:31 +01:00
Jürg Lehni
92369bf14f Seperate the private Segment#is/setSelected(point) methods from the newly added getter / setter. 2011-04-27 12:15:51 +01:00
Jürg Lehni
6204eef643 Remove comment about pending port that has been backported to Scriptographer. 2011-04-27 12:08:13 +01:00
Jürg Lehni
776edda51d Cleaned-up Segment#is/setSelected() code a bit. 2011-04-27 12:06:44 +01:00
Jürg Lehni
cd2347aa9b Remove comment about pending port that has been backported to Scriptographer. 2011-04-27 11:24:13 +01:00
Jürg Lehni
41eb09f15f Add forgotten brackets in Curve#isSelected() and remove comments about backporting as it is ported now. 2011-04-27 10:52:56 +01:00
Jürg Lehni
1c9cd9ace4 Clean up code in #setContextStyles(). 2011-04-27 09:53:53 +01:00
Jürg Lehni
b7a4277143 Add comment about _x / _y properties and clean up code a bit. 2011-04-26 17:57:12 +01:00
Jürg Lehni
ead1600afe Clean-up CurveLocation code and switch from returning -1 to null for #getIndex(). 2011-04-26 17:49:54 +01:00
Jürg Lehni
c4ede92e81 Fix error in Path#getLastCurve(). 2011-04-26 17:48:36 +01:00
Jürg Lehni
77ad25ffba Clean up port comments. 2011-04-26 17:47:30 +01:00
Jürg Lehni
ac5dca4fc0 Update various comments about TODOs. 2011-04-26 17:04:15 +01:00
Jürg Lehni
84d321bd56 Clean up comments. 2011-04-26 15:56:06 +01:00
Jürg Lehni
9ed0254cde Make sure global paper point works during bootstraping of library already. 2011-04-26 15:53:19 +01:00
Jürg Lehni
bdfe35d93a Consistently name local context variables 'ctx', to save line size and acknowledge the fact that Canvas contexts have a funny API design. 2011-04-26 15:39:16 +01:00
Jürg Lehni
189182b77c Rename loop function to frame. 2011-04-26 15:16:05 +01:00
Jürg Lehni
a20f988511 Minor code cleanup. 2011-04-26 12:55:20 +01:00
Jürg Lehni
ba0c6dafea Add paper.debug switch, set it to true by default when loading code through load.js and use it to ignore focus / blur events in Event.requestAnimationFrame() during development. 2011-04-26 12:48:46 +01:00
Jürg Lehni
9d2459d799 Rename '// Todo' to '// TODO', which is the convention. 2011-04-26 12:39:48 +01:00
Jürg Lehni
f431dcab5c Add test code for dirty rectangle performance, deactivated by a boolean switch. 2011-04-26 12:37:37 +01:00
Jürg Lehni
e8a2a786e0 Fix Curve#getParameter() for straight lines. 2011-04-26 12:30:58 +01:00
Jürg Lehni
6609dc2307 Implement new root finding algorithm, combining Newton-Raphson Method with Bisection, and update Curve#getParameter() to use it. 2011-04-26 12:23:09 +01:00
Jürg Lehni
7868bc1bdc Remove obsolete comma. 2011-04-26 11:30:29 +01:00
Jonathan Puckey
e52ed9ae36 Key handlers: allow the user to prevent the default behaviour of key events. 2011-04-25 18:11:01 +02:00
Jonathan Puckey
1efb69e46f Key: small change to a todo comment. 2011-04-25 17:42:37 +02:00
Jonathan Puckey
778997ec18 Simplify Key further and fix ToolEvent#getModifiers. 2011-04-25 17:38:40 +02:00
Jonathan Puckey
404bbac3a5 Key: remove logging statement. 2011-04-25 17:30:24 +02:00
Jonathan Puckey
5d15c3dfef Simplify ToolEvent#getModifiers() & small cleanup in Key. 2011-04-25 17:26:58 +02:00
Jonathan Puckey
a96bb326f4 Some more simplifications in Key. 2011-04-25 17:16:45 +02:00
Jonathan Puckey
95bfebf64b Simplify Key a bit. 2011-04-25 17:08:08 +02:00