Commit Graph

472 Commits

Author SHA1 Message Date
Eric Rowell
9c1f32d341 added dist files to ignore file and updated Thorfile. Dist files should no longer be checked into the repo 2012-11-03 21:14:27 -07:00
Eric Rowell
fb1186883a purging dist files 2012-11-03 20:59:18 -07: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
Eric Rowell
df829e1e89 fixed up toImage() docs 2012-11-03 16:08:29 -07:00
Eric Rowell
78668b0d38 greatly improved animation, transition, and drag and drop performance by dynamically switching between fixed and dynamic frame rates, and also created a single source of truth for the animation frame object 2012-11-03 11:16:33 -07:00
Eric Rowell
1ad12bbbf1 updated readme 2012-11-02 10:03:29 -07:00
ericdrowell
35876c854c Merge pull request #138 from pavelpower/master
use function simulate for user event
2012-11-02 09:12:07 -07:00
Pavel Akhmetchanov
4536f3cdef Update src/Node.js
replace function simulate. Added event attribute.
2012-11-02 17:59:17 +06:00
Eric Rowell
d0ebbc939a added setAttrs() method back in because I realized that it wasn't hurting performance that much 2012-10-28 22:45:37 -07:00
Eric Rowell
fb90709b3a greatly improved transition performance by directly setting attr properties for each frame, and also removing unecessary redraws when transition finishes 2012-10-28 22:41:13 -07:00
Eric Rowell
f1e2503873 added tests for configurator combinations 2012-10-19 23:31:26 -07:00
Eric Rowell
8298bdee7a updated build file to better support custom builds via configurator 2012-10-18 23:32:57 -07:00
Eric Rowell
0b9af3028c continued refactoring and decoupling drag and drop logic. The code base now looks fully decoupled as far as I can tell - next step is to test configurator combinations 2012-10-14 20:22:22 -07:00
Eric Rowell
3d0cb26e6d updated build file to also minify modules separately for custom builds. Started work on decoupling Animation and DragAndDrop logic from other modules 2012-10-14 18:46:04 -07:00
Eric Rowell
d636afb6fe text.getWidth() and getHeight() now return calculated width and height. Removed getBoxWidth() and getBoxHeight() methods 2012-10-11 20:00:13 -07:00
Eric Rowell
353cd939bd readded linecap attr to shape level 2012-10-10 20:00:27 -07:00
Eric Rowell
0ae50ba523 merge trunk 2012-10-10 19:25:50 -07:00
Eric Rowell
2426c2bd2c moved width and height attrs to node level. This enables us to get and set shape dimensions via width and height. For example, if you have a circle with radius 50, getWidth() will return 100. Not all shapes width and height methods have been implemented yet 2012-10-10 18:48:08 -07:00
ericdrowell
b025767a27 updated jsdocs. TextPath setText() now calls Text setText(). Polygon setPoints() method now has data conversion logic similar to Line 2012-10-07 21:12:45 -07:00
ericdrowell
f74955641a fixed multiple bugs related to toDataURL() when using hidden layers 2012-10-07 19:38:12 -07:00
ericdrowell
432533ae4a greatly improved the OO design for draw logic. removed unecessary _draw() and __draw() methods 2012-10-07 19:14:14 -07:00
ericdrowell
f1bc2fe4e8 updated unit tests 2012-10-06 16:11:49 -07:00
ericdrowell
fcd4b345fc moved cornerRadius proprty to Shape level 2012-10-06 15:55:10 -07:00
ericdrowell
e16935efb3 merge pull request #115 which improves get() design, and also enables the ability to select by node ttype 2012-10-06 15:40:49 -07:00
ericdrowell
07a8848098 updated text shadows unit test 2012-10-06 15:22:51 -07:00
ericdrowell
82bfd9c15a text shadows now work correctly again 2012-10-06 15:19:33 -07:00
ericdrowell
a3840fdc69 moved line cap logic to shape level so that Path can also utilize line caps 2012-10-06 15:05:03 -07:00
David Johansson
8e03a97d46 Improved get method to inlude get by shapeType. Also improved the oo-design. 2012-10-06 23:35:46 +02:00
ericdrowell
6f230fc42b pull request #109 opacity can now be applied to the stage 2012-10-06 13:53:50 -07:00
ericdrowell
3f8801a494 setZIndex now correctly reorders layer canvases 2012-10-05 18:59:03 -07:00
ericdrowell
f5d4228f3b removed load() method from stage. Added Kinetic.Node.create() which creates a node from a json string. This essentially allows us to deserialize any node, including a stage, layers, groups, and shapes. 2012-10-03 20:38:29 -07:00
ericdrowell
a97d3ad01f refactored toJSON() method to work for any node, not just the stage. Improved the OO design following David Johanssons lead, and also added another unit test 2012-10-03 19:38:12 -07:00
ericdrowell
67d3507925 Merge pull request #112 from davonium/on_off
Off can remove all listeners in the same name space by .off(".foobar")
2012-10-03 16:34:14 -07:00
David Johansson
fa2c8fb88d Off can remove all listeners in the same name space by .off(".foobar") 2012-10-04 00:50:04 +02:00
ericdrowell
9ba21651a9 fixed typo 2012-10-03 10:58:52 -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
ericdrowell
c6237b59e6 fix #93 readded layer isListening and isVisible logic 2012-10-03 00:04:56 -07:00
ericdrowell
0eff286243 fix #93 rather than detecting if a layer is listening or visible, I think it's cleaner to hide and show the buffer canvas along with the scene canvas inside the setVisible method 2012-10-02 23:33:53 -07:00
ericdrowell
8cd47db046 fix #93 layer children were still detecting events even when layers were hidden 2012-10-02 23:12:49 -07:00
David Johansson
73bf805483 Made getAbsoluteOpacity work recursively. Also added support for stage opacity (included test). 2012-10-01 00:55:12 +02:00
ericdrowell
759ec116ce fixed up unit serialization tests. cleaned up constructor jsdoc comments. fixed Ellipse setRadius method 2012-09-26 20:28:20 -07:00
ericdrowell
f235ea032d improved OO design for remove() and add() 2012-09-26 19:26:53 -07:00
ericdrowell
0a8f0ddb74 got really tired of doing node.getParent().remove(node). To remove a node, you now just do node.remove().
I realize that this doesn't follow the JavaScript pattern of
parent.remove(child), and that from an OO perspective, perhaps nodes
shouldn't have the ability to destroy themselves.  But, from a
practical standpoint, it's a heck of a lot more convenient to just use
.remove() when you want to remove something.
2012-09-26 12:50:08 -07:00
ericdrowell
900f02f912 merged pull request #65 and updated manual tests. Also removed dragConstraint and dragBounds as they are now redundant. I may introduce a set of dragBounds helper functions, similar to filters, that provide common functions out of the box, such as Horizontal and Vertical 2012-09-25 21:23:35 -07:00
ericdrowell
b757342b11 cleaned up isAncestorOf logic. stage should not be an ancestor of self. plus this was bad OO design 2012-09-25 16:30:13 -07:00
ericdrowell
2b99a88b7e merge pull request #106 2012-09-25 16:15:00 -07:00
ericdrowell
8fdab12e96 merge pull request #102 2012-09-25 16:07:28 -07:00
ericdrowell
d4734ba33a created _getFillType utility to help manage fill type objects. You can now dynamically switch between different fill types, including colors, linear gradients, radial gradients, and patterns 2012-09-25 15:57:57 -07:00
ericdrowell
ff926b34af in addition to Collection each() and apply(), I wanted to make it easier to attach event listeners to node collections, so I went with David Johansson's approach for whitelisting on() and off().
The difference now is that the on() and off() methods are dynamically
added to the Collections prototype from Node, which acts as a wrapper
around each()
2012-09-25 13:38:36 -07:00
ericdrowell
d522b9d9d0 now that the attrs engine has been rewritten, we can cleanly hide and show the layer canvas whenever the layer is hidden or shown via instantiation or with setters. Also improved layer hide and show unit test 2012-09-25 12:22:22 -07:00