Commit Graph

52 Commits

Author SHA1 Message Date
Eric Rowell
f2976e7dd1 added support for linear gradients and radial gradients using the fill property 2012-05-03 14:20:50 -07:00
Eric Rowell
7d92a2099e fixed animation race condition bug that sometimes produced multiple requestAnimFrame calls, and also changed throttle property to be in fps (it used to be in ms). This will make it more consistent with other properties related to frame rates 2012-05-03 12:05:54 -07:00
Eric Rowell
3585e000b6 added new Kinetic.Sprite shape that enables you to easily add animated sprites to the stage 2012-05-02 00:35:32 -07:00
Eric Rowell
7bcd34ec47 added new beforeDraw() and afterDraw() event handlers for Layer 2012-04-28 23:03:58 -07:00
Eric Rowell
1dbe93a232 added new Line Shape 2012-04-28 21:12:01 -07:00
Eric Rowell
ffd9924511 tweaked throttling algo and added unit tests 2012-04-28 19:52:45 -07:00
Eric Rowell
ff31dcb0ae fixed small bug related to animations - if you called .start() multiple times, multiple animation instances would be created. This wasn't desirable. Also beefed up animation unit tests 2012-04-28 18:33:05 -07:00
Eric Rowell
bd17b54aa8 added stage.reset() method so that you can reset the stage to its original state. hooked this in with stage.load() so that the stage starts when a clean slate when loading json 2012-04-28 13:57:43 -07:00
Eric Rowell
9cc380608e fixed drawing bug related to new throttle feature 2012-04-28 13:46:54 -07:00
Eric Rowell
9f6381aef3 stage.setSize() now correctly sets the content node dimensions. Also refactored object and DOM node sizing 2012-04-28 12:23:23 -07:00
Eric Rowell
3ac0e5592e added throttling unit tests 2012-04-28 11:41:58 -07:00
Eric Rowell
4e82139b74 added layer throttling which greatly improves drag and drop and other mousemove drawing performance 2012-04-28 11:18:40 -07:00
Eric Rowell
222aea4e2e removed .onContent() and replaced with .getDOM() 2012-04-28 00:07:44 -07:00
Eric Rowell
9fef9e54d9 added new stage.getIntersects() method which allows you to obtain all the shapes that intersect a given point. Also enhanced all methods that require an x or y by allowing either two arguments to be passed in or an object to be passed in. Example foo(100, 50) or foo({x:100, y:50}); 2012-04-27 23:57:01 -07:00
Eric Rowell
192681374d added new selector capability to .get() method. You can now select all nodes by type inside of a container, such as by Shape, Group, or Layer 2012-04-27 22:54:39 -07:00
Eric Rowell
2879c0763f changed isPointInShape() to intersects(). Currently the method accepts a point object, but I may extend this to also accept another shape object 2012-04-27 20:54:49 -07:00
Eric Rowell
508bfb7a9b rewrote cropping logic from last pull request, fixed serialization issue in unit test, added new unit tests, and added getX() and getY() methods 2012-04-27 19:08:45 -07:00
Eric Rowell
78e4022126 made isPointInShape() a public method for the purpose of collision detection 2012-04-15 09:18:30 -07:00
Eric Rowell
47b8a8e0d6 new setDetectionType() and getDetectionType() methods to enable path and pixel detection swapping 2012-04-14 21:46:38 -07:00
Eric Rowell
860025263b added about 50 unit tests to better test selector support 2012-04-14 21:34:36 -07:00
Eric Rowell
3a520376e5 fixed stage.hide() bug, created new isVisible() method, and moved visible check to container 2012-04-14 12:04:45 -07:00
Eric Rowell
fb9f324cfb exposed absolute positioning logic inside the _prepareDrag method so that developers have access to it via the setAbsolutePosition() method 2012-04-14 10:40:54 -07:00
Eric Rowell
b8516b1b0c moved .get() method to Container so that all containers can use it, not just stage. This allows you to select nodes within other nodes 2012-04-08 21:26:13 -07:00
Eric Rowell
4f36b27199 refined global object temp nodes has removal when removing nodes from container. Also added another unit test 2012-04-08 17:50:46 -07:00
Eric Rowell
2035d188c8 added hash cleanup logic when nodes are moved from a container. Also added unit tests 2012-04-08 17:37:49 -07:00
Eric Rowell
3c17e59eb0 moved ids and names hashes to the stage level 2012-04-08 11:01:31 -07:00
Eric Rowell
8c70333472 added simple selector support by id (#) or by name (.). Selecting by name is similar to selecting by class in other DOM libraries 2012-04-07 20:32:24 -07:00
Eric Rowell
3243e5f8ff added support for image de-serialization and cleaned up some of the Shape attr default logic 2012-04-07 19:08:16 -07:00
Eric Rowell
d3b025254a new getAttrs() method 2012-04-07 18:50:53 -07:00
Eric Rowell
0a94c75e22 decided that the developer should be responsible for setting custom drawing functions, images, and event handlers via selectors rather than a hash map passed into the load() method 2012-04-07 18:40:44 -07:00
Eric Rowell
1a40e50622 finished custom shape serialization with new attrs structure 2012-04-07 15:03:19 -07:00
Eric Rowell
58eb778e9a re-integrated simple serialization and deserialization with new attrs structure 2012-04-07 14:39:31 -07:00
Eric Rowell
6d618b97b5 first phase of new attrs architecture to better represent Node states 2012-04-05 23:48:58 -07:00
Eric Rowell
15bd27562e continued work on serialization/de-serialization 2012-04-05 20:38:12 -07:00
Eric Rowell
350f7b7496 implemented stage.load() which allows you to deserialize a json string 2012-04-05 00:06:00 -07:00
Eric Rowell
bf86dacb59 setup simple serialization 2012-04-04 22:57:36 -07:00
Eric Rowell
21981e94eb updated text metrics unit test so that it passes in Firefox 2012-04-04 20:08:53 -07:00
Eric Rowell
fc5825e61e got the unit tests and functional tests passing. Have a few things left to do, and a bit more testing before I merge the transitions rewrite back into the trunk 2012-04-02 23:38:14 -07:00
Eric Rowell
86a1337017 fixed bug related to multiple removals of same node 2012-04-01 10:29:16 -07:00
Eric Rowell
8f104a6fad added new getTextSize(), getTextWidth(), and getTextHeight() methods 2012-03-31 15:40:27 -07:00
Eric Rowell
8398670a47 added new getAbsoluteZIndex() and getLevel() methods to Node 2012-03-31 15:17:36 -07:00
Eric Rowell
99d9381411 added setDrawFunc() method to Shape so that you can dynamically change the drawing function. added new unit test 2012-03-31 00:14:18 -07:00
Eric Rowell
9994e8a37e added getSize() method to Stage, Rect, and Image. Also updated unit tests 2012-03-31 00:08:50 -07:00
Eric Rowell
69c27de7df added line join property to Shape along with getter and setter 2012-03-30 23:57:10 -07:00
Eric Rowell
540670ba8b updated docs 2012-03-30 21:06:26 -07:00
Andy Yaco-Mink
bd43ffbc0e fontStyle params for Text objects
Specify css font-variant|font-style options via the fontStyle parameter

Also getFontStyle and setFontStyle functions for this object.
2012-03-30 10:08:44 -05:00
Eric Rowell
f312c0cf9d reworked transformation matrix operations with drag and drop 2012-03-24 20:52:17 -07:00
Eric Rowell
7ced50f694 changed Stage constructor to accept a config object. Now that Stage is a node, every KineticJS object requires the same config object which bubbles up through the parent classes 2012-03-22 23:17:52 -07:00
Eric Rowell
0da8adfb6e added Matrix.js and started integration 2012-03-22 13:47:37 -07:00
Eric Rowell
70fe63b2b6 cleaned up animation and transition interaction 2012-03-18 19:50:20 -07:00