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
e8dcb8e584
fixed glitchy flash on transitions when applying multiple transitions to the same node at different times
2012-04-28 17:45:13 -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
6bed850042
added defensive coding when removing node from container in case it has not yet been added to the container
2012-04-28 13:06:22 -07:00
Eric Rowell
8dce92c2fd
introduced new setDefaultAttrs() method which greatly simplifies the logic required inside node constructors. This will also make plugin creation much easier
2012-04-28 12:55:18 -07:00
Eric Rowell
c661cff85a
fill, stroke, and strokeWidth values of undefined, null, '', or 0 are now correctly handled
2012-04-28 12:30:14 -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
3200a9063a
identified a couple public methods in the global object which are actually private
2012-04-28 11:23:47 -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
04554e0e6a
removed Transition constructor block comment to remove it from jsdocs. Devs should just use the transitionTo() method without knowing how it works under the covers
2012-04-28 00:10:26 -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
c02e7a0cee
adding prod build
2012-04-27 19:42:49 -07:00
Eric Rowell
70df77f9fa
enhanced setAttrs() logic to allow custom node properties and functions
2012-04-27 19:42:04 -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
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
5e46018012
discovered that the slow drag and drop behavior with Google Chrome is only effecting my Windows 7 test machine, not Mac. I've removed the drag and drop optimizing code for now
2012-04-14 12:15:01 -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
c17029d38e
fixed up fillStroke() logic in the Shape class
2012-04-14 10:47:52 -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
2108736df7
added chrome specific logic to improve the drag and drop performance until the chrome bug is fixed
2012-04-14 10:13:07 -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
5c7b969974
new setAttrs() method which enables you to set attributes in bulk
2012-04-12 23:02:55 -07:00
Eric Rowell
b7f14ca821
dynamically set drag time interval to determine the optimal dragging performance. Makes dragging and dropping even smoother and responsive
2012-04-12 21:33:40 -07:00
Eric Rowell
328f457512
updated docs
2012-04-08 21:37:10 -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
30e8973956
added setX and setY methods for convenience
2012-04-08 18:22:04 -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
f5b6b3c06f
fixed _modifyPathContext optimization problem
2012-04-04 20:46:58 -07:00
Eric Rowell
0ac84408e9
fixed bug with mouseout / mouseover events with nodes on the edge of the stage
2012-04-04 20:19: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
a6b526ee76
added new animation stop logic
2012-04-03 13:44:48 -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
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
08e2b74da9
preparing codebase for new pixel detection property
2012-04-01 00:31:02 -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
fc743d1442
undid last commit. I pulled in a commit from another fork which makes the isPointInPath extensible, but then realized that this doesn't really have a usage outside of my current path detection algo because the backstage layer needs to be redrawn each time
2012-03-30 22:04:51 -07:00
Yusuf Safak Bayram
79c778ebff
added extensible isPointInPath
2012-03-30 21:20:48 -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
d8c5ca24af
added scale save and restore logic to drag and drop operation
2012-03-25 23:56:38 -07:00
Eric Rowell
1f41e931b9
formatted code
2012-03-25 12:46:56 -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
e61f100b10
fixed edge case with new drag and drop bounds
2012-03-24 20:55:52 -07:00
Eric Rowell
f312c0cf9d
reworked transformation matrix operations with drag and drop
2012-03-24 20:52:17 -07:00
Eric Rowell
1fa41e6692
changed Matrix classname back to Transform
2012-03-24 10:03:28 -07:00
Eric Rowell
50ddf3f952
updated functional tests with new toDataUrl functionality
2012-03-24 00:08:08 -07:00
Eric Rowell
0610337db5
adding current dist files
2012-03-23 23:52:17 -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
afad713df3
code cleanup #2
2012-03-21 00:56:29 -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
bceedc08f6
updated docs
2012-03-19 22:44:42 -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
9e28a9010a
forgot to add production build
2012-03-17 14:36:38 -07:00
Eric Rowell
fafb5db93f
added support for event bubble cancelation
2012-03-17 14:35:34 -07:00
Eric Rowell
a9601fadc2
moved DOM creation logic from Stage constructor to a private method
2012-03-17 10:48:25 -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
Eric Rowell
039c9059a0
rewrote drag and drop logic. removed draggableX and draggableY. added new dragConstraint property and new dragBounds property
2012-03-13 22:11:22 -07:00
Eric Rowell
a0c385261e
finished transition code, complete with callback option whenever a transition is completed. All numeric Node properties can be transitioned. Will add easing function options later
2012-03-13 21:16:25 -07:00
Eric Rowell
1ac858dea5
added foundation for transition support, and added linear transitions. easeIn, easeOut, and easeInOut transitions will come later.
...
git status
2012-03-12 22:41:09 -07:00
Eric Rowell
68db5bf7c1
minor code cleanup discovered by Wappworks
2012-03-11 23:01:23 -07:00
Eric Rowell
2379646cee
updated documentation
2012-03-11 16:07:14 -07:00
Eric Rowell
6093c7ca73
updated shape.getContext() documentation
2012-03-11 16:05:47 -07:00
Eric Rowell
5aee56ab5e
added fix for IE9
2012-03-11 15:57:57 -07:00
Eric Rowell
cbab484117
missed a bug fix with last push
2012-03-10 20:15:15 -08:00
Eric Rowell
07860a7dbd
bug fixes and enhancements. also updated the README
2012-03-10 16:52:16 -08:00
Eric Rowell
0f49f12024
removing dist files (these shouldn't be checked in)
2012-03-10 10:45:25 -08:00
Antoine Proulx
7981df8a61
Include the version of the library in the file name when building it.
2012-03-07 14:25:45 -05:00
Antoine Proulx
a6948ec413
Ability to add the date and the version number from the command line.
2012-03-07 09:55:07 -05:00
Antoine Proulx
7a4bf6ec26
All comments are now removed from the production file.
2012-03-07 09:49:32 -05:00
Eric Rowell
3c140ca762
Merged ac80261
...
removed lib directory and used src instead. Moved license.js outside of the source directory. Created a geometries directory inside src. Also had problems getting the Ruby rake file to build a minified file with uglifiy, so after a bit of searching I found that many people suggested to include the json-pure gem, so I added it to the Gemfile
2012-03-06 23:53:48 -08:00
Antoine Proulx
ac802613a8
Create a build script to concatenate and (optionaly) minify the files in the lib directory.
2012-03-05 20:59:41 -05:00
Antoine Proulx
2a1acc3477
Split the main file into multiple files (one per class).
2012-03-05 19:01:34 -05:00