Commit Graph

378 Commits

Author SHA1 Message Date
Eric Rowell
a8ab9a2533 implemented clone method (inspired by matteo78) and added thorough unit tests 2012-07-07 14:43:12 -07:00
Eric Rowell
9baaee2440 getIntersections no longer returns visible shapes in the result set, and can also be called from any container 2012-07-06 21:45:18 -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
de7cab4cf3 moved animation logic into Animation.js. Global.js now only contains logic and properties that operate on stages 2012-07-03 23:00:52 -07:00
Eric Rowell
6126c73a84 moved data type logic into new utility files Type.js and renamed GlobalObject to Global 2012-07-03 22:08:59 -07:00
Eric Rowell
e2e16d49c1 updated serialization/deserialization unit tests 2012-07-01 21:12:52 -07:00
Eric Rowell
caae5a5155 bug fix: ellipse radius change no longer fires duplicate attr change event 2012-07-01 15:30:51 -07:00
Eric Rowell
31566bff13 transition attr updates now fire the attr change event. Fixed problem with root level attrs not being fired when child level attr changed 2012-07-01 00:19:56 -07:00
Eric Rowell
aa4b0955c0 added horizontal align logic back into the Text draw func 2012-06-30 20:05:27 -07:00
Eric Rowell
e279ea30b9 fixed up new Text wrap edge cases. Will add a bunch of unit tests soon 2012-06-30 19:43:52 -07:00
Eric Rowell
6663b9e612 first pass at implementing auto word wrap. Still have a few edge cases to cover. Removed vertical align property as it is no longer relevant 2012-06-30 00:40:54 -07:00
Eric Rowell
07ef653441 completely rewrote the Text shape. Kinetic.Text is now a Group that's composed of a Rect and a custom shape that draws text. align and vertical align now apply to the text alignment inside the text box. box rounded corners are now possible since Text uses Rect. Shadow logic improved. Beefed up the text getter and setter unit tests 2012-06-27 19:50:32 -07:00
Eric Rowell
3b6dffe6e1 refactored Image event bindings and fixed radial gradient bug 2012-06-24 13:39:36 -07:00
Eric Rowell
a8c09516ba trying out Image extending Rect so that Image has Rect properties and methods such as corner radius 2012-06-24 12:44:08 -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
19750782c7 improved drawing speed by 7% by optimizing stroke(), fill(), and several other methods 2012-06-22 19:36:37 -07:00
Eric Rowell
422791a99a cleaned up undefined, null, 0, and '' comparison operators. To unset a attribute, you can now set it to null, 0, or ''. Setting an attribute to undefined will have no effect 2012-06-22 13:15:29 -07:00
Eric Rowell
40a92a9988 added unit tests for Jonathan\'s toJSON() fix 2012-06-21 21:46:52 -07:00
Eric Rowell
ac3f512ab8 updated global object utilities 2012-06-21 12:47:15 -07:00
Eric Rowell
5765ab749b converting arguments object into true array for setters, restored the original underscore.js methods, and moved radius conversion logic from the setAttrs method to a radiusChange event listener in Ellipse 2012-06-20 12:55:34 -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
5679b1fb76 fixed bug with Path dataChange event subscription 2012-06-19 16:26:28 -07:00
Eric Rowell
667ee16aab added more functional tests 2012-06-18 23:52:25 -07:00
Eric Rowell
76c85a639e changed listen property to listening, listen() to setListening(), and isListening() to getListening() for consistency 2012-06-18 23:12:56 -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
dee78e86e2 added Circle backwards compatibility with Ellipse 2012-06-18 19:09:07 -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
dc51d95eb1 image fills can now be scaled to simulate image cropping. Now that image fills can be offset and scaled, the Image Shape is now obsolute because any shape can now use regular images or cropped images. 2012-06-17 17:18:49 -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
2455000f5c fixed set fill attr bug which occurred when instantiating the fill with a string color and then setting it later to a fill object such as a gradient or pattern. The fix will apply to any attr which can be a string or object 2012-06-12 09:57:29 -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
bba1d0ad21 now leveraging the setAttrs method for all setters in Node class. utilizing draggableChange attr event to trigger drag and drop inits 2012-06-09 15:31:25 -07:00
Eric Rowell
9697af530c stage now listens for dimension changes, and updates the DOM dimensions if the widthChange or heightChange event is triggered 2012-06-09 11:24:35 -07:00
Eric Rowell
e64024d3bd refactored attr event change logic a bit. added delete operator in a couple places to fix memory leaks. added better event unit tests. 2012-06-09 10:53:47 -07:00
Eric Rowell
12b61b3621 attr change events are now triggered for any root attr so long as the attr is set with the setAttrs method 2012-06-09 01:47:41 -07:00
Eric Rowell
2cd24309ac first step to exposing event driven architecture. Devs can subscribe to attr change events with the on method. e.g. shape.on('widthChange', function(){...}) 2012-06-08 21:56:33 -07:00
Eric Rowell
440c3ac279 event simulation now correctly bubbles 2012-06-08 20:57:20 -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
Jason Follas
f9342cb019 Tab to spaces; fixed tests (i.e., disabled "testonly") 2012-06-06 00:33:29 -04:00
Jason Follas
b61c688a83 Implemented "a", "A". Added unit test for SVG "tiger" path (the canonical SVG example) 2012-06-05 23:56:46 -04: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
91eb4ea371 isVisible() method now takes into account ancestor visibility. This fixes several bugs related to odd event detection behavior with clusters of visible and invisible nodes 2012-06-02 19:12:06 -07:00
Eric Rowell
9f243d4a2e garbage collecting empty arrays in _removeName method to free up space 2012-06-02 00:39:17 -07:00
Eric Rowell
1b333bc800 new simulate() method to simulate node events. e.g. shape.simulate('click') 2012-06-02 00:21:49 -07:00
Eric Rowell
385deb793d remove() method now correctly removes node descendants 2012-06-01 23:56:01 -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
84e400e0f0 changed commands property to data per Jason's request. This provides a similar nomenclature to the SVG path data property 2012-05-29 21:34:04 -07:00
Jason Follas
59ee010050 Implemented 's' and 'S' 2012-05-29 16:14:58 -04:00
Jason Follas
90364408d7 implemented 'T' and 't'. 2012-05-29 15:22:06 -04:00
Jason Follas
90c07bdaa5 Implemented 'c', 'C', 'q', 'Q' paths 2012-05-29 14:41:23 -04:00
Jason Follas
d0acfb14e1 Added multi-point string handling to the path parser. Added support for 'm' and 'Z'. 2012-05-29 13:49:11 -04:00
Eric Rowell
89370bfee7 fixed bug with setScale method and _isNumber method. Added unit tests 2012-05-28 23:46:40 -07:00
Eric Rowell
9fa7949d27 fixed closePath bug with Path shape, added getters and setters, and added another path unit test 2012-05-28 16:11:43 -07:00
Eric Rowell
3c72f8240b fixed up unit tests 2012-05-28 12:02:02 -07:00
Eric Rowell
a2defa4bed turns out there was no performance problems with the path (made a dumb mistake with implementation). However, during the analysis, I ended up adding event detection throttling which is pretty handy. It cuts down unecessary mousemove event handling dramatically and greatly improves performance when you have thousands of shapes 2012-05-27 23:41:05 -07:00
Eric Rowell
cc35abd0f6 first round of new Path shape. Despite multiple optimizations, the path performance isn't as good as a previous experiment done with v3.8.1. Will keep this as a separate branch until the performance issues are resolved 2012-05-27 21:46:03 -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
e075a725a1 rewrote shadow logic. Shadows can now be applied to images and sprites, even if they have transparent pixels 2012-05-26 20:34:36 -07:00
Eric Rowell
44ba6f7e5b bug fix - when setting a custom attr that points to self, the setAttrs method no longer gets stuck in a recursive loop throwing a stack overflow error. Also, objects that were instantiated from a class (non-literal objects) are no longer serializable 2012-05-26 18:31:13 -07:00
Eric Rowell
07edfbc765 hooked setAttrs into setCrop() method and made the _getSize() method more flexibile by accepting more variations of input. added unit tests 2012-05-26 16:37:37 -07:00
Eric Rowell
8c675327b9 hooked in the setAttrs method to the shadow setter and the pattern fill setter. added more unit tests 2012-05-26 10:57:56 -07:00
Eric Rowell
0bb158c0fb hooked setAttrs into setPosition and setScale for more flexibility. Added in depth position and scale unit tests. add() and remove() methods are now chainable 2012-05-25 20:18:05 -07:00
Eric Rowell
61d325d383 fixed up some issues with serialization and deserialization and updated unit tests 2012-05-20 16:42:37 -07:00
Eric Rowell
e26575a6c8 fixed flickering when a node was added to the stage, updated, and redraw due to throttling 2012-05-20 15:30:32 -07:00
Eric Rowell
2331222459 linear and radial gradients can now have any number of color stops 2012-05-20 11:12:07 -07:00
Eric Rowell
4ba2818f97 improved shadow code quality and added support for text fill and stroke shadows 2012-05-20 10:47:28 -07:00
Eric Rowell
7fcf5f156a added support for shadow alpha property 2012-05-19 22:11:33 -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
2ac2c2856c transitions can now operate on ANY numeric value for any Node object, regardless of the property's depth in a config object tree 2012-05-13 18:59:10 -07:00
Eric Rowell
9944b897c4 added support for heigt and width properties inside an object config property to be transition-able 2012-05-13 17:04:15 -07:00
Eric Rowell
ec415c55de added _setPoints so that points setter methods could leverage the same logic that was in the setAttrs() method 2012-05-13 11:58:40 -07:00
Eric Rowell
7f8a174b51 fixed bug with _setSize() 2012-05-13 11:32:26 -07:00
Eric Rowell
e4f5e11792 finished up pattern fill support 2012-05-13 10:27:40 -07:00
Eric Rowell
81df49e75d pulled out _setPointAttr from Node and moved it to the GlobalObject as _setXY, which enables x,y property setting for any object, not just attrs. also added _setSize which has similar logic for height width properties 2012-05-12 18:37:07 -07:00
Eric Rowell
9e3475f37a setup support for pattern fills 2012-05-12 18:18:06 -07:00
Eric Rowell
92919058b2 after a bit more thought, I've decided to change the maxWidth property to width, to make it even more similar to CSS sizing rules. If you set the width of the text box to a certain value, and the text string width is longer than that width, the text will be clipped 2012-05-12 17:49:01 -07:00
Eric Rowell
05df078295 reworked text max width logic to use clipping rather than native max width functionality which scales the text (what was w3c thinking? no idea) 2012-05-12 17:11:57 -07:00
Eric Rowell
502115fad7 Kinetic.Line detection type is now defaulted to pixel since this is the expected detection strategy 2012-05-12 15:45:04 -07:00
Eric Rowell
51258531bf fixed bug with getTextSize() which was throwing a JS error if used before adding text to the stage 2012-05-12 15:32:27 -07:00
Eric Rowell
28f7fc246d changed shadowFillStroke() to applyStyles(). Took applyLineJoin() out of shape draw functions and moved it to the Shape._draw() method. 2012-05-09 22:31:55 -07:00
Eric Rowell
2993191fe6 improved shadow logic such that it first attempts to apply shadows to a shape's fill if it's defined, otherwise it will attempt to apply the shadow to the stroke 2012-05-09 19:15:49 -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
40ebb21033 implemented dashed and dotted line styling for Kinetic.Line based on method written by Phrogz 2012-05-08 19:11:19 -07:00
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
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
860025263b added about 50 unit tests to better test selector support 2012-04-14 21:34:36 -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
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
1c8669eb7a undoing optimized drag and drop for now because I added it in due to Google Chrome's latest release which made drag and drop very slow (while other browsers are still fast), and the changes that I made to help work around it were slightly effecting the experience in other browsers. I'll file a ticket with Google Chrome instead 2012-04-14 10:04:17 -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
63c8dde6d5 no longer auto clearing shape data. added new shape.clearData() method instead 2012-04-08 20:25:31 -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
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
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
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
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
d5834c8351 more new transition architecture integration 2012-04-02 22:54:05 -07:00
Eric Rowell
77aea95e7a round 1 of animation + transition rewrite, while combing Xaric's Tween port 2012-04-02 21:03:59 -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
313c6a1541 fixed drag and drop bug related to drag constraints and positioned containers. Just needed to move the drag constraint logic after the matrix unravel 2012-04-01 15:59:12 -07:00
Eric Rowell
bdafb3eb25 when node is at the edge of the canvas, and you mouse over the node and then off the canvas, the mouseout handlers for the node are executed 2012-04-01 11:34:22 -07:00
Eric Rowell
86a1337017 fixed bug related to multiple removals of same node 2012-04-01 10:29:16 -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
3a8afc747c fixed bug related to multiple drag and drop initializations 2012-04-01 09:32:20 -07:00
Eric Rowell
98917fe644 transformed the layer in the star pixel detection functional test to make sure parent transforms don't break the pixel detection 2012-04-01 01:21:39 -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
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
eaab71e242 added another functional test to cover more transform and drag and drop cases 2012-03-25 22:58:07 -07:00
Eric Rowell
fbb6d0f706 again reworked the matrix transform logic with drag and drop 2012-03-25 12:45:46 -07:00
Eric Rowell
8ee223584d added support for evt.shape so any event handler can have access to the shape that was interacted with 2012-03-24 21:11:42 -07:00
Eric Rowell
f312c0cf9d reworked transformation matrix operations with drag and drop 2012-03-24 20:52:17 -07:00
Eric Rowell
50ddf3f952 updated functional tests with new toDataUrl functionality 2012-03-24 00:08:08 -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
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
d10721d85a code cleanup 2012-03-21 00:52:45 -07:00
Eric Rowell
8aa5fcf560 fixed clear transition bug 2012-03-20 22:46:54 -07:00
Eric Rowell
2977d8f1d8 implemented ease-in, ease-out, and ease-in-out transitions 2012-03-19 22:36:30 -07:00
Eric Rowell
8f0aebad11 prepared transition logic for new easing functions 2012-03-19 21:09:13 -07:00
Eric Rowell
588b65a849 fixed transition bug related to frame.timeDiff 2012-03-19 19:39:41 -07:00
Eric Rowell
70fe63b2b6 cleaned up animation and transition interaction 2012-03-18 19:50:20 -07:00
Eric Rowell
84e7e71461 improved mouseover and mouseout event handling by ignoring parent handlers if mouse moves from one child to another 2012-03-18 11:24:57 -07:00
Eric Rowell
9a61e149df fixed mousemove bug for overlapped shapes in different groups 2012-03-17 19:48:54 -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