Commit Graph

78 Commits

Author SHA1 Message Date
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
Eric Rowell
9ec8c94701 refactored event bindings to expose content node events and enable true functional tests without a test framework like Selenium. Added new manualTests.html page for manual tests. One of the manual tests has already been converted to a functional test. Will add in image data url hashmaps soon so that I can compare screenshots before and after a series of actions in the functional tests 2012-06-15 11:47:55 -07:00
Eric Rowell
838c719c0e made a better fix for the mobile alternating drag and drop bug 2012-06-14 20:29:07 -07:00
Eric Rowell
13105969b1 attr change events are now only fired on root level attr changes. changed centerOffset property to offset property for consistency. did additonal refactoring 2012-06-09 16:13:25 -07:00
Eric Rowell
e7699a588f fixed mobile drag and drop bug. refactored _handleEvents(). added new functional test that has two drag and drop shapes 2012-06-08 00:42:48 -07:00
Eric Rowell
e74fa3a319 fixed stage drag and drop bug on tablets 2012-06-03 12:48:13 -07:00
Eric Rowell
8b22fb0690 updated Transition docs 2012-06-03 10:36:50 -07:00
Eric Rowell
e842cdf8ac stage setSize() method now converts inputs to integers. added a lot of setSize unit tests 2012-06-02 21:27:26 -07:00
Eric Rowell
ba796f4cc3 new tap event. touchmove no longer incorrectly fires onmousemove event. dbltap now correctly bubbles. cleaned up some other event handling logic. 2012-06-01 00:44:38 -07:00
Eric Rowell
4488f22c32 added drag and drop support for the stage. This essentially enables stage panning 2012-05-27 00:07:36 -07:00
Eric Rowell
e60eb8be6e tons of refactoring to make the code base even more elegant and flexibile. In particular, the setAttrs() method is much more powerful now, and serves as a really convenient way for setting a bunch of node properties at once 2012-05-19 21:14:04 -07:00
Eric Rowell
16c251bb97 added drawFunc property to layer so that layers can easily draw non-node background graphics 2012-05-09 18:53:20 -07:00
Eric Rowell
a27741ce03 added shadow support. changed fillStroke method to shadowFillStroke 2012-05-08 23:06:13 -07:00
Eric Rowell
622278a510 point properties can now be set with an array of points or an array of numbers for convenience 2012-05-08 22:11:37 -07:00
Eric Rowell
ffd9924511 tweaked throttling algo and added unit tests 2012-04-28 19:52:45 -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
c698005adc refactored fillStroke() method 2012-04-14 21:53:00 -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
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
63c8dde6d5 no longer auto clearing shape data. added new shape.clearData() method instead 2012-04-08 20:25:31 -07:00
Eric Rowell
ff896a4946 unit tests and functional tests now passing. Next up, re-integrate serialization with new attrs structure 2012-04-07 14:04:15 -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
2dff730081 added functional test that tests all of the transition easing functions 2012-04-03 23:46:59 -07:00
Eric Rowell
602220bdce finished new animation, transitions, and tweens functionality 2012-04-03 23:00:35 -07:00
Eric Rowell
f953e4694f tons of refactoring. Now have separate Transition and Tween classes 2012-04-03 22:23:13 -07:00
Eric Rowell
9e3baf69c1 added first phase of transition event subscription 2012-04-03 14:08:06 -07:00