Commit graph

110 commits

Author SHA1 Message Date
Jonathan Puckey
52b69817a0 Clean up animatedStar.html example. 2011-02-16 22:44:05 +01:00
Jonathan Puckey
3ae20c8a4b Item: undo mistaken changes to transform comments. 2011-02-16 22:35:53 +01:00
Jonathan Puckey
7e5cb1cc81 Examples: clean up scripts list and add PathStyle.js. 2011-02-16 22:35:17 +01:00
Jonathan Puckey
13b8ddccc8 PathStyle: small cleanup. 2011-02-16 22:15:19 +01:00
Jonathan Puckey
d7dca48e00 Add tests for Layer & PathStyle. 2011-02-16 22:11:26 +01:00
Jonathan Puckey
4000853c2f Implement PathStyle and Document#currentStyle. 2011-02-16 22:09:51 +01:00
Jonathan Puckey
9adb668d2a Group: add missing beans property. 2011-02-16 22:06:24 +01:00
Jonathan Puckey
3e2b4adc27 Layer: implement moveAbove / moveBelow / nextSibling / previousSibling 2011-02-16 18:55:12 +01:00
Jürg Lehni
a7dc48951d Improve previous getter / setter check in Bootstrap. 2011-02-16 00:40:10 +00:00
Jürg Lehni
8a0a0712cd Add Layer#index to override Item#index. 2011-02-16 00:18:58 +00:00
Jürg Lehni
00ee00d6ac Update Bootstrap to not fail when overriding existing beans or getter / setters. 2011-02-16 00:18:08 +00:00
Jürg Lehni
b0b9594f1e Add support for single-parameter calls to scale() and shear(), both in Matrix and Item (supporting optional center parameter too). 2011-02-15 23:23:40 +00:00
Jürg Lehni
99bde74a10 Improve Matrix constructor to read from arrays too. 2011-02-15 23:15:28 +00:00
Jürg Lehni
9d1458e6ae Rely on new Array.isArray() now for array checks. 2011-02-15 23:15:13 +00:00
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