Jonathan Puckey
|
bd5c906047
|
Fix error in CompoundPath.
|
2011-02-19 14:12:05 +01:00 |
|
Jürg Lehni
|
b14c9ae21b
|
For the closure injection to work properly we need an iterator function that provides a scope to the referenced key value. Rely on Base.each() for this, which even in a scaled down Bootstrap will be available and not harmful, as it won't rely on modified native prototypes.
|
2011-02-17 23:34:03 +00:00 |
|
Jürg Lehni
|
bc33ae8084
|
Add missing #closePath() to both Path and CompoundPath.
|
2011-02-17 23:01:18 +00:00 |
|
Jürg Lehni
|
4c2e1ee5c9
|
Optimise and simplfy CompoundPath code, by moving scope into extend() call, and only compiling one fields object inside it that is return at the end.
|
2011-02-17 22:58:56 +00:00 |
|
Jürg Lehni
|
e6dc189310
|
Simplify injection separation by using multiple arguments to extend().
|
2011-02-17 22:46:28 +00:00 |
|
Jürg Lehni
|
5850ef3cfc
|
Seperate Path definition into two parts, one that requires scoped private functions and values, and one that does not, to keep related things closer together and save indentation space.
|
2011-02-17 20:08:37 +00:00 |
|
Jürg Lehni
|
19121c33b2
|
Simplify injection of Path constructors.
|
2011-02-17 20:04:02 +00:00 |
|
Jonathan Puckey
|
deb1699f13
|
Tidy up code.
|
2011-02-17 16:00:03 +01:00 |
|
Jonathan Puckey
|
36de01a6ae
|
Move Path Constructors into seperate file.
|
2011-02-17 15:55:26 +01:00 |
|
Jonathan Puckey
|
1953c17f41
|
CompoundPath: move getCurrentPath into the outer scope and implement smooth and simplify.
|
2011-02-17 14:33:25 +01:00 |
|
Jonathan Puckey
|
0c1f29ce29
|
Implement CompoundPath and move most of PathItem into Path.
|
2011-02-17 13:36:40 +01: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
|
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
|
a154819350
|
Switch to using indexOf() in Segment#index for now.
|
2011-02-14 10:35:40 +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
|
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
|
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
|
3af5d549f6
|
Add comments about possible optimisations in PathItem#transformContent().
|
2011-02-14 01:14:03 +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
|
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
|
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
|
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
|
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 |
|
Jürg Lehni
|
a579b8bd3d
|
Make sure Segment#handleIn and #handleOut are always defined, even when not provided, and change compareSegments() to also reflect this change by relying on Segment.read for conversion of comparison values.
|
2011-02-13 15:09:24 +00:00 |
|
Jürg Lehni
|
4b2341b3c2
|
Add gettter/setters for Path#segments, and fix bug in Segment#previous.
|
2011-02-13 13:52:51 +00:00 |
|
Jonathan Puckey
|
c1d2cab5d9
|
Segment.js: fix toString and remove methods. Add test for segment.remove().
|
2011-02-12 19:10:19 +01:00 |
|
Jonathan Puckey
|
9b5e18c795
|
PathItem: replace this.segments.push(segment) to this.addSegment(segment)
|
2011-02-12 19:08:34 +01:00 |
|
Jonathan Puckey
|
c0e2101c32
|
Clean up src directory and move Bootstrap.js into lib.
|
2011-02-12 17:59:39 +01:00 |
|