Commit Graph

106 Commits

Author SHA1 Message Date
Eric Rowell
c79f286893 added stage mouseover and mouseout events 2013-07-05 10:38:02 -07:00
Eric Rowell
7c40333fc8 stage events can now be added without having a target node. i.e. you can bind mousedown, mouseup, click, dblclick, etc. to the stage directly 2013-07-04 00:20:28 -07:00
Eric Rowell
18fa3673aa removed data url dependencies from functional tests 2013-06-02 15:44:24 -07:00
Eric Rowell
7069bf9e0c stage tweens now work correctly. getChildren() and getLayers() now return a Kinetic.Collection. added toArray() method to Kinetic.Collection 2013-05-19 21:07:43 -07:00
Eric Rowell
fc1e388f22 cleaned up internal firing logic. the fire method now does not bubble events by default, to prevent devs from unknowingly bubbling events that they don't care to bubble, inadvertantly affecting performance 2013-05-13 08:56:09 -07:00
Eric Rowell
b6cca6a143 moved dd logic in destroy() from Node to DD namespace. refactored stopDrag logic to correctly handle the event object 2013-04-07 10:52:33 -07:00
Eric Rowell
22aaa15562 fixed #348 2013-04-02 22:29:56 -07:00
Eric Rowell
08bac6dc89 fixed up all of the data url issues in the functional test suite 2013-03-24 16:40:09 -07:00
Eric Rowell
13c540b969 removed beforeDraw and afterDraw methods. you can now subscribe to draw events with .on('draw') or .on('beforeDraw'). Draw events also bubble 2013-03-24 01:05:37 -07:00
Eric Rowell
3a903d6c7c minor refactoring. fixed bug related to click mapping 2013-03-23 23:19:24 -07:00
Eric Rowell
ce793a4b25 refactored / cleaned up code in Node and DD 2013-03-23 22:56:22 -07:00
Eric Rowell
966ebf2a32 lots of refactoring, and code hardening. Also fixed bug in which dragend events were being fired before mouseup/touchend events 2013-03-23 20:02:11 -07:00
Eric Rowell
0c80f6e223 rewrote dynamic drag and drop layer because the old implementation had too many problems. This resolves all of the dynamic drag and drop issues in one go. draw() method can now be applied to any node, not just the Stage and Layers. drag events now bubble 2013-03-22 00:46:41 -07:00
Eric Rowell
0dbda82886 created _upperCase util method for function and event name generation, and did some refactoring 2013-03-21 20:24:03 -07:00
Eric Rowell
4a0087f72c gauss cleanup 2013-02-20 21:30:24 -08:00
Eric Rowell
5ac8142f82 Kinetic.Text events now work property 2013-02-11 22:55:24 -08:00
Eric Rowell
322e88d454 new fillPriority attr which enables you to easily toggle between different fill types without having to null out fill attrs and reset other fill attrs 2013-01-30 09:50:36 -08:00
Eric Rowell
1775913476 mouseup and click events now work correctly after dragging and dropping a shape 2013-01-29 10:12:24 -08:00
Eric Rowell
1bcdd15f45 drag and drop now ends whenever a mouseup or touchend event is detected anywhere on the page 2013-01-27 22:25:16 -08:00
Eric Rowell
8ed84f474a fixed several memory issues with transition logic. Heavily refactored Transition module. New Animation isRunning method. destroy() method now correctly stops currently running transitions. added several transition and destroy related unit tests 2013-01-13 19:59:35 -08:00
Eric Rowell
3a6a55d1cc fixed edge case when setting draggable=false on dragend 2013-01-07 19:51:20 -08:00
Eric Rowell
5e16b3d7d0 fix bug 169 when removing a node, be sure to also remove the drag and drop reference 2012-12-13 00:01:24 -08:00
Eric Rowell
291583148b moved all rendering logic into the Canvas renderer modules. Shape draw funcs are now passed a renderer object, not a canvas context. The context is accessible via canvas.getContext() 2012-12-09 09:52:33 -08:00
Eric Rowell
60db1a2d43 cleaned up functional test data urls. Functional tests now pass with no warnings 2012-11-24 23:00:14 -08:00
Eric Rowell
27d5031665 further decoupled scene, hit, and buffer graph drawing. To define a custom hit draw function, you now need to set the drawHitFunc attr. 2012-11-18 19:50:50 -08:00
Eric Rowell
694ced6b7a added custom buffer drawing function functional tests. Added an index page with links to all of the KineticJS tests inside the tests directory 2012-11-14 22:14:15 -08:00
Eric Rowell
9f80402dd1 improved functional test layout, and started work on drawBufferFunc support 2012-11-14 21:55:16 -08:00
Eric Rowell
a5e23c426d restructured unit tests and created a unit test build target which concatenates source test files 2012-11-13 21:37:28 -08:00
Eric Rowell
0748692c1d added new fire() method which fires synthetic events and custom events. Simulate() now simulates user events with event bubbling 2012-11-03 17:19:21 -07:00
ericdrowell
b6eb2cdf82 added mouseenter and mouseleave events. mouseover and mouseout were actually functioning like mouseenter and mouseleave. mouseover and mouseout now work similar to traditional DOM mouseover and mouseout. This change enables event delegation to work correctly 2012-10-03 10:53:09 -07:00
Eric Rowell
6eda6d2607 decided to split Circle and Ellipse shapes because it was causing too many issues related to the mixed data type of radius, which could be a number or object with x and y properties 2012-08-25 23:56:39 -07:00
Eric Rowell
e6e488025e hit detection color mapping now takes into account anti-aliasing color variations, which was causing issues when moving the mouse from one shape into another shape which were inside the same group. created getIntersections() method which returns an object with shape and pixel data 2012-08-16 23:03:28 -07:00
Eric Rowell
9cdbadc4fd refactored ancestor comparison logic to ensure that container handlers aren't incorrectly executed for mouseover mouseout. Fixed up functional tests 2012-08-16 22:03:39 -07:00
Eric Rowell
d8bbbf6353 new Canvas class to decouple layer and canvas, providing more flexibility. drawing operations now require a canvas object rather than an optional layer which contained a canvas. fixed some transformation issues introduced with a pull request that I pulled in last week 2012-07-18 23:28:45 -07:00
Eric Rowell
20adf7e036 first pass at implementing filters. Still have a lot to work through. 2012-07-17 00:32:26 -07:00
Eric Rowell
384a686740 worked through some synchronous / asynchronous issues with toDataURL and toImage(). stage toDataURL() is now asynchronous, and all other node toDataURLs is still synchronous. toImage() is now asynchronous. Kinetic.Image once again only accepts image objects, and can no longer be instantiated with a data URL or image data due to asynchronous issues. It's much cleaner for the developer to load an image however they like, and then instantiate a Kinetic.Image shape synchronously 2012-07-15 20:12:18 -07:00
Eric Rowell
acc6b6e14e updated unit tests 2012-07-15 00:06:35 -07:00
Eric Rowell
4692c51c74 toDataURL() is now synchronous, and works with all nodes, including the stage, layers, groups, and shapes. This also sets things up nicely for node caching. You can now cache anything, including the whole stage, layers, groups, or shapes, manifested as Kinetic Images that were instantiated with data urls 2012-07-14 18:10:37 -07:00
Eric Rowell
d62df7ba5c setup filters. saveImageData can now work for any nodes, including shapes, groups, layers, and the stage. images can now take image data as a parameter. This enables shape caching. New beforeAttrChange event which fires before an attr is changed 2012-07-14 16:25:56 -07:00
Eric Rowell
1f3d1cc905 added event bubbling functional test 2012-07-06 10:05:37 -07:00
Eric Rowell
014d4f198f fixed mouseover / mouseout incorrectly firing when moving from one node to another node inside the same container 2012-07-06 00:27:55 -07:00
Eric Rowell
80eb50a708 added new clearBeforeDraw Layer property which enables you to skip canvas clearing before each draw. Added new warn() method to test suite, and added error and warning colorings to the test counter 2012-06-23 16:11:58 -07:00
Eric Rowell
ce5a8f3209 you can now cancel drag and drop with setDraggable(false) during a drag and drop operation 2012-06-19 17:06:31 -07:00
Eric Rowell
667ee16aab added more functional tests 2012-06-18 23:52:25 -07:00
Eric Rowell
c8d8aa6028 changed draggable() to setDraggable(). added getDraggable(). added more unit tests and functional tests 2012-06-18 22:02:13 -07:00
Eric Rowell
2c0aabcb9c removed timeouts from functional tests and uncommented image comparison tests 2012-06-18 18:02:44 -07:00
Eric Rowell
bf616d0d4d fixed mousemove event bug, and added a very rigorous functional test to test all of the basic shape events for both desktop and mobile 2012-06-18 17:56:12 -07:00
Eric Rowell
fae1ff6cb7 removed Circle shape and replaced it with the more flexible Ellipse shape. If you define the radius with a number, the shape will be a circle. if you define the radius with an x and y component, it will be an oval 2012-06-17 16:50:04 -07:00
Eric Rowell
a49fc610d6 moved several manual tests to the unit test page. Added another functional test. Added warning logs to the functional test framework 2012-06-16 01:21:35 -07:00
Eric Rowell
c1b9d44885 setup data url hash for functional tests so that we can compare the visual result before and after a series of simulated events 2012-06-16 00:02:55 -07:00