Commit Graph

290 Commits

Author SHA1 Message Date
Eric Rowell
d6a836ba5c Merge branch 'master' of github.com:ericdrowell/KineticJS 2013-05-17 10:52:13 -07:00
Eric Rowell
b1d1981fe9 added getType() and getClassName() methods. beefed up on() docs 2013-05-17 10:51:56 -07:00
Aku Kotkavuo
b3e76a4e23 Fix variable leakage 2013-05-17 16:56:56 +03:00
Eric Rowell
70f5c405a9 finished the major doc updates 2013-05-16 00:28:49 -07:00
Eric Rowell
b1025be75e updated docs in prep for jsdoc3 migration 2013-05-15 09:27:22 -07:00
Eric Rowell
8c9d2b5459 setAttr() is now a public method that can be used to set Kinetic attrs, or custom attrs 2013-05-14 22:37:33 -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
2cf81cc6dd attr change events no longer bubble. this improves setter + render performance by about 25% 2013-05-12 23:37:24 -07:00
Eric Rowell
032eb9e4db updated docs 2013-05-08 09:44:03 -07:00
Eric Rowell
edc050067d node.setPosition() now uses setX() and setY() which handles the transform cache 2013-05-08 00:18:29 -07:00
Eric Rowell
76a399bfc0 major refactor of directory structure. Killed Util directory. Created Util.js file instead. Moved general purpose methods from Global to Util 2013-05-07 23:51:02 -07:00
Eric Rowell
e2d6993c89 added Global.addMethods() method and defined core constructors in Global 2013-05-07 23:17:57 -07:00
Eric Rowell
8f06f1eb67 heavily updated documentation 2013-05-07 10:19:54 -07:00
Eric Rowell
e22f5c4bcf added dynamic color component setters, and also added more unit tests 2013-05-03 21:13:26 -07:00
Eric Rowell
58b081ef12 fixed a couple bugs introduced with transform matrix caching. Cleaned up addPointGetterSetter API. reorganized dynamic getter setter comments so that it's easier to keep track of them 2013-05-02 10:22:21 -07:00
Eric Rowell
43256d0916 added skew transform courtesy of danielkur #188 2013-05-01 10:56:01 -07:00
Eric Rowell
790b45ec87 added new get*RGB(), get*R(), get*G(), and get*B() methods for fill, stroke, and shadowColor. Also added new Kinetic.Type.getRGB() utility 2013-04-29 23:12:28 -07:00
Eric Rowell
bf8d2db0df multiple transitions on the same node are now supported 2013-04-28 14:14:45 -07:00
Eric Rowell
1dc323305b all attrs that have x and y components now have individual component setters. i.e. you can use setScale() and pass in an object, or setScaleX() and setScaleY() individually 2013-04-27 20:50:42 -07:00
aniruddha-loya
a71d3e1fa0 Bug fix for getAttr function
Now it permits to return user defined attributes which do not have a corresponding method, similar to setAttrs(config) that sets attributes as key-value whenever there is no method for the given key
2013-04-24 10:19:41 +03:00
Eric Rowell
8a78b62cad added matrix transform caching, and optimized the clear() method. This has improved rendering performance by about 17% 2013-04-21 22:42:25 -07:00
Eric Rowell
90a2820e5b toDataURL and toImage now work correctly on devices with a pixel ratio != 1 2013-04-14 09:41:59 -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
6f61b07500 some refactoring proposed by pavelpower 2013-04-07 10:00:55 -07:00
Eric Rowell
d57842126a fixes #353 2013-04-04 23:17:20 -07:00
Eric Rowell
793e43b0db removed apply() Collection method. Added new mapMethods() Collection method, which is used internally to map node methods to collection methods 2013-03-25 22:43:35 -07:00
Eric Rowell
ffe11a4539 refactored and optimized Image.js and Type.js 2013-03-24 13:12:33 -07:00
Eric Rowell
c8e83dfacb for event delegation, changed evt.node property to evt.targetNode 2013-03-24 10:38:05 -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
542f675522 added getNodeType() and getShapeType() methods 2013-03-24 00:14:42 -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
c31abf6be3 changed getUserPosition to getPointerPosition, and setUserPosition to setPointerPosition 2013-03-23 20:15:49 -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
9db24812bd removed simulate method. refactoring also fixed bug in which if you fire a custom event that has not been registered, the script no longer fails 2013-03-21 19:43:17 -07:00
Eric Rowell
2c237aa708 Merge pull request #329 from Rulexec/master
Thorfile typo fix and chainable on/off.
2013-03-20 10:01:04 -07:00
Eric Rowell
c9d6820dbf refactored transition logic and added getAttr method 2013-03-15 16:19:12 -07:00
Eric Rowell
69f9374c8e first pass at removing setDefaultAttrs logic to speed up node instantation performance 2013-03-15 08:33:05 -07:00
Alexander Ruliov
9b5d33325d chainable .on/.off and Layer.(before/after)Draw. closes #279 2013-03-15 01:07:35 +03:00
Eric Rowell
66cc6cd98c added support to define pixel ratio with Canvas constructor 2013-02-12 10:29:23 -08:00
Eric Rowell
5e65b4c596 refactored pixel ratio scale logic 2013-02-12 00:20:24 -08:00
Eric Rowell
79fecd2c13 dynamic drag layer setup now does deep copy of Groups and Layers when reconstructing ancestors 2013-01-28 21:27:08 -08:00
Eric Rowell
b1038e99bf pulled Node config params and Shape config params into a textfile, and now using token replacement to auto fill Node and Shape config params throughout the code base. In this way, if I need to make changes to the Node or Shape configs, those changes are propagated to all of the other constructors 2013-01-26 20:42:19 -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
b6ba1a503c ids and names hashes used for node selection via get() has moved to Global in order to greatly simplify the selection logic. This means that node ids and names are shared across all stages. If two stages each have a node with the same id, only the last id set will be accessibile (similar to DOM) 2013-01-13 11:10:49 -08:00
Eric Rowell
ed579e4843 added new destroy Node method which removes and destroys a node. remove() now simply removes a node from the stage. You can re add the node at a later time with add(). getDOM() changed to getContent(). stage.remove() now correctly removes content node 2013-01-12 22:01:12 -08:00
Eric Rowell
4136ddb398 added new dragOnTop property which allows you to define whether or not a node is automatically moved to a temp top layer when dragging 2013-01-09 23:45:30 -08:00
Eric Rowell
db4a972fb2 updated more docs 2013-01-03 00:00:10 -08:00