Commit Graph

40 Commits

Author SHA1 Message Date
Eric Rowell
8dce92c2fd introduced new setDefaultAttrs() method which greatly simplifies the logic required inside node constructors. This will also make plugin creation much easier 2012-04-28 12:55:18 -07:00
Eric Rowell
c661cff85a fill, stroke, and strokeWidth values of undefined, null, '', or 0 are now correctly handled 2012-04-28 12:30:14 -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
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
70df77f9fa enhanced setAttrs() logic to allow custom node properties and functions 2012-04-27 19:42:04 -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
c698005adc refactored fillStroke() method 2012-04-14 21:53:00 -07:00
Eric Rowell
a908c59769 fixed center offset + drag and drop bug by fixing a root problem with the getAbsoluteTransform() method. This method no longer takes into account the center offset. Center offset transforms are now applied separately 2012-04-14 18:27:06 -07:00
Eric Rowell
df8df63400 refactored setAbsolutePosition() method and Shape _draw method 2012-04-14 16:27:00 -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
c17029d38e fixed up fillStroke() logic in the Shape class 2012-04-14 10:47:52 -07:00
Eric Rowell
63c8dde6d5 no longer auto clearing shape data. added new shape.clearData() method instead 2012-04-08 20:25:31 -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
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
dc45f5e2d6 when using pixel detection, clear shape data whenever shape is drawn 2012-04-04 19:53:11 -07:00
Eric Rowell
6ce9d5489c reworked pixel detection. I now require the dev to use shape.save() to save the pixel data for performance reasons 2012-04-01 19:38:30 -07:00
Eric Rowell
72c0555d0b pixel detection performance was horrible for large amounts of shapes. Added some optimizations which require knowledge of a shape's perceivable position and size based on transforms. This will be added in later. For the time being, only Kinetic.Images will have access to the detectionType property. Image cannot be transformed or offset with the center offset. Support for these will come soon as well. 2012-04-01 17:18:01 -07:00
Eric Rowell
71b0449071 fixed drag and drop issue and reverted default easing back to linear 2012-04-01 10:06:00 -07:00
Eric Rowell
95fabe9160 finished pixel detection algo which can be applied to any Shape. This enables a lot of new functionality, such as image pixel detection, shape border detection, and custom shape detection that isn't drawn with a standard path 2012-04-01 01:08:33 -07:00
Eric Rowell
08e2b74da9 preparing codebase for new pixel detection property 2012-04-01 00:31:02 -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
69c27de7df added line join property to Shape along with getter and setter 2012-03-30 23:57:10 -07:00
Eric Rowell
fc743d1442 undid last commit. I pulled in a commit from another fork which makes the isPointInPath extensible, but then realized that this doesn't really have a usage outside of my current path detection algo because the backstage layer needs to be redrawn each time 2012-03-30 22:04:51 -07:00
Yusuf Safak Bayram
79c778ebff added extensible isPointInPath 2012-03-30 21:20:48 -07:00
Eric Rowell
1fa41e6692 changed Matrix classname back to Transform 2012-03-24 10:03:28 -07:00
Eric Rowell
68f9688575 finished matrix integration. the stage, layers, groups, and nodes can be transformed in anyway, and drag and drop on any of these nodes now works great regardless of parent node transforms 2012-03-23 23:39:54 -07:00
Eric Rowell
0da8adfb6e added Matrix.js and started integration 2012-03-22 13:47:37 -07:00
Eric Rowell
fafb5db93f added support for event bubble cancelation 2012-03-17 14:35:34 -07:00
Eric Rowell
ed35c6dbba added scrollbar support for container DOM, structured the unittests a bit better, and did some minor refactoring 2012-03-17 10:28:25 -07:00
Eric Rowell
a0c385261e finished transition code, complete with callback option whenever a transition is completed. All numeric Node properties can be transitioned. Will add easing function options later 2012-03-13 21:16:25 -07:00
Eric Rowell
68db5bf7c1 minor code cleanup discovered by Wappworks 2012-03-11 23:01:23 -07:00
Eric Rowell
2379646cee updated documentation 2012-03-11 16:07:14 -07:00
Eric Rowell
6093c7ca73 updated shape.getContext() documentation 2012-03-11 16:05:47 -07:00
Eric Rowell
07860a7dbd bug fixes and enhancements. also updated the README 2012-03-10 16:52:16 -08:00