Jürg Lehni
b8816a07f5
Reformat to fit 80 chars boundary.
2011-02-15 23:10:48 +00:00
Jürg Lehni
d82eb4534c
Update Bootstrap.js to provide Array.isArray() if missing.
2011-02-15 23:10:31 +00:00
Jürg Lehni
9a9005a604
Correct comments about transform flags.
2011-02-15 22:57:12 +00:00
Jürg Lehni
3d64b017c5
Remove comment about having Point.read() return consumed arguments indices, as after analysing the situation it seem too complex to imeplement easly: Point.read internally relies on Point#initialize for all the heavy lifting, and this would have to report back how many indices were consumed somehow...
2011-02-15 22:56:53 +00:00
Jürg Lehni
f0d4374dc4
Improve translate() calls by directly calling Point objects and thus not relying on Point.read() internally.
2011-02-15 22:53:05 +00:00
Jürg Lehni
27f291ec80
Clean up comments.
2011-02-15 22:51:02 +00:00
Jürg Lehni
14bfb4c78e
Make Matrix#toString() behave the same as in Scriptographer.
2011-02-15 22:35:25 +00:00
Jürg Lehni
c6b5b11b1e
Use dragstart event instead of mousedown, to go with drag and dragend.
2011-02-15 22:32:05 +00:00
Jonathan Puckey
2b626be502
Item: use internal _clipMask variable, so we don't collide with getters/setters.
2011-02-15 12:05:39 +01:00
Jonathan Puckey
f92da1297b
RoundedRectangles Example: use onMouseDrag for now.
2011-02-15 00:08:11 +01:00
Jonathan Puckey
4e0bf98035
Tools Examples: no need to set the document anymore.
2011-02-15 00:07:02 +01:00
Jonathan Puckey
24e93bcaf5
Tool#setDocument: remove mousemove functionality for now, since it is interfering with tool.fixedDistance.
...
Remove events when a tool has been attached to another document before.
When not passed a document in the constructor, use the global Paper.document.
Only redraw the document when the corresponding mousehandler exists.
2011-02-15 00:01:56 +01:00
Jonathan Puckey
3c22aedfbb
ToolEvent: fix small mistake.
2011-02-14 23:41:47 +01:00
Jonathan Puckey
30fef4d147
Group: use internal _clipped variable, so we don't collide with getters/setters.
2011-02-14 22:51:31 +01:00
Jonathan Puckey
4395caf41f
Tool: add support for Tool#onMouseMove(event) and add RoundedRectangles example
2011-02-14 22:43:14 +01:00
Jonathan Puckey
e36ea0c2e3
Tool: add support for Tool#eventInterval
2011-02-14 22:23:05 +01:00
Jonathan Puckey
a633b2a066
Tool: use dragend instead of mouseup, since mouseup is not fired when the mouse is released outside of the canvas area.
2011-02-14 20:08:19 +01:00
Jürg Lehni
a154819350
Switch to using indexOf() in Segment#index for now.
2011-02-14 10:35:40 +00:00
Jürg Lehni
1d0321bc69
Change Size constructor to reflect logic in Point constructor.
2011-02-14 10:32:42 +00:00
Jürg Lehni
91e8a3b652
Update Bootstrap to fix issues with beans (requiring definition of setter when getter is redefined in sub-class), and remove setBounds in PathItem that was introduced for that reason.
2011-02-14 10:28:27 +00:00
Jürg Lehni
a6e9ee56d4
Cleanup Path constructors by using simple constructor functions instead of Base.extend() classes, use Path.Oval for Path.Circle and optimise Path.Oval through ovalSegments array with real segments (no use to call Segment.read each time).
2011-02-14 02:05:54 +00:00
Jürg Lehni
12d82ece56
Define beans in Matrix.
2011-02-14 01:52:53 +00:00
Jürg Lehni
d33a2decab
Examples: Close the letterPath.
2011-02-14 01:48:15 +00:00
Jürg Lehni
ed55dc39fb
Fix PathItem constructor by no redefining arguments variable that results in arguments array changing as well on some browsers.
2011-02-14 01:47:56 +00:00
Jürg Lehni
1edd4b4e21
Add additional test for setting bounds.
2011-02-14 01:25:35 +00:00
Jürg Lehni
38f4dd353d
Make Item#bounds setter work for PathItem, and add two TODO comments about Bootstrap shortcommings that cause it to break.
2011-02-14 01:24:22 +00:00
Jürg Lehni
bb9ae75f3d
Add tests for setting of position.
2011-02-14 01:17:57 +00:00
Jürg Lehni
87f146fb44
Have Item#setPosition use Point.read() for point conversion.
2011-02-14 01:17:43 +00:00
Jürg Lehni
50f285798c
Fix Item#setPosition and Item#setBounds to actually work (unfinished porting work).
2011-02-14 01:14:43 +00:00
Jürg Lehni
3af5d549f6
Add comments about possible optimisations in PathItem#transformContent().
2011-02-14 01:14:03 +00:00
Jürg Lehni
739c5a669f
Add tests for Item#position and Item#scale, but should really be sepearted from Path Bounds.
2011-02-14 01:05:58 +00:00
Jürg Lehni
ee8c30b518
Implement Matrix, Item#position, Item#bounds (setter too), Item#transform(), Item#scale(), Item#rotate(), Item#transalte() and Item#shear(). Some of it work in progress.
2011-02-14 01:05:16 +00:00
Jürg Lehni
6ef5183731
Fix Rectangle#center (use + instead of -).
2011-02-13 19:22:48 +00:00
Jürg Lehni
20746ad3a7
Clea up white spaces.
2011-02-13 19:21:56 +00:00
Jürg Lehni
420ffaa7ea
No need to check for existance of handleIn/Out, as they are always defined.
2011-02-13 18:56:06 +00:00
Jürg Lehni
7370326cb2
Add space after beans: true.
2011-02-13 18:52:17 +00:00
Jürg Lehni
604ff7824c
Add comment about ideally not relying on parent.children.indexOf for getIndex().
2011-02-13 18:51:49 +00:00
Jürg Lehni
eeb7d377e6
Add optional index argument to static read() functions, so points, rectangle, sizes and segments can be read from any index in the arguments array.
2011-02-13 18:15:55 +00:00
Jürg Lehni
08d4826441
Reformating code to follow Scriptotgrapher coding conventions.
2011-02-13 16:26:24 +00:00
Jürg Lehni
50b2e12372
Add comments to Path Bounds tests.
2011-02-13 16:24:55 +00:00
Jürg Lehni
4f4261488e
Fix issues with _angle caching in Point.
2011-02-13 16:24:39 +00:00
Jürg Lehni
0ac19a8e82
Optimise read() functions to only convert if argument is not of desired type already.
2011-02-13 16:05:19 +00:00
Jürg Lehni
d67055b09b
Add documentation to PathItem#bounds.
2011-02-13 15:59:22 +00:00
Jürg Lehni
515439c4df
Optimize PathItem#bounds by using less coordinate lookups.
2011-02-13 15:55:43 +00:00
Jürg Lehni
71d1ff3cb3
Make PathItem#getBounds() work for closed paths too.
2011-02-13 15:51:54 +00:00
Jürg Lehni
d59d514a55
Fix bug in PathItem#bounds (wrongly used variable name twice), now works properly for open paths.
2011-02-13 15:49:36 +00:00
Jürg Lehni
5234c5624c
Add compareNumbers() method, to compare with same tolerance in Rectangles as in Points.
2011-02-13 15:48:20 +00:00
Jürg Lehni
e08359f49d
Beginning of PathItem#bounds and tests to go along with it, not functional yet.
2011-02-13 15:40:30 +00:00
Jürg Lehni
a30e4057e3
Fix PathItem constructor to support passing of segments both as array and arguments.
2011-02-13 15:39:24 +00:00
Jürg Lehni
771d9d0efe
Fix a couple of bugs in shape drawing code, and switch to consistently use this.currentSegment rather than this._segments[this._segments.length - 1], to use the internal check for a starting point.
2011-02-13 15:12:25 +00:00