Commit Graph

378 Commits

Author SHA1 Message Date
Eric Rowell
69f9374c8e first pass at removing setDefaultAttrs logic to speed up node instantation performance 2013-03-15 08:33:05 -07:00
Eric Rowell
5c590bb88f moved TextPath, RegularPolygon, and Star shapes to the plugins directory. updated all tests 2013-03-13 22:24:55 -07:00
Eric Rowell
012e495a69 new strokeScaleEnabled property which enables you to configure if the stroke style of a shape should scale or not as the shape itself scales, or as its ancestors scale 2013-02-21 09:14:44 -08:00
Eric Rowell
88e1c5fa08 Merge branch 'master' of github.com:ericdrowell/KineticJS 2013-02-20 21:31:10 -08:00
Eric Rowell
4a0087f72c gauss cleanup 2013-02-20 21:30:24 -08:00
Eric Rowell
46f71d283f added clipping functionality to containers. Currently, the clipping function can only be applied to layers and groups. The clipping region is also subject to the containers transforms, which means that you can also create transformed clipping regions. 2013-02-15 18:20:34 -08:00
Eric Rowell
ca0d3790b2 canvas elements now come with padding, margin, border, and background style resets 2013-02-15 15:18:02 -08:00
Eric Rowell
4d420efabd Converted test failures to warnings where appropriate 2013-02-15 14:44:18 -08:00
Eric Rowell
26943f8245 implemented new pixel ratio logic, which covers all drawing cases using a canvas context. The new logic also has better performance than the previous 2013-02-12 09:58:47 -08:00
Eric Rowell
5e65b4c596 refactored pixel ratio scale logic 2013-02-12 00:20:24 -08:00
Eric Rowell
5ac8142f82 Kinetic.Text events now work property 2013-02-11 22:55:24 -08:00
Eric Rowell
c9b99a9131 Kinetic.Text code cleanup 2013-02-10 15:42:48 -08:00
Eric Rowell
322e88d454 new fillPriority attr which enables you to easily toggle between different fill types without having to null out fill attrs and reset other fill attrs 2013-01-30 09:50:36 -08:00
Eric Rowell
1775913476 mouseup and click events now work correctly after dragging and dropping a shape 2013-01-29 10:12: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
1bcdd15f45 drag and drop now ends whenever a mouseup or touchend event is detected anywhere on the page 2013-01-27 22:25:16 -08:00
Eric Rowell
be295992e0 when parent and children are both draggable, the lowest level child draggable property now has priority over ancestors. Refactored dependency order in thorfile 2013-01-27 21:29:22 -08:00
Eric Rowell
6cd7ab135f moved some manual tests to unit tests and greatly refactored the manual test suite 2013-01-27 16:27:17 -08:00
Eric Rowell
6a73f4dcfb added enabler / disabler tests for Text. added more documentation 2013-01-26 19:35:53 -08:00
Eric Rowell
624ec25c29 added enabler and disabler functions to toggle shape attrs that are either on or off, such as fill, stroke, shadow, and dashArray. Also fixed problem with shadows not being applied to non color filled shapes 2013-01-23 23:08:01 -08:00
Eric Rowell
abbaef1cc6 refactored drag and drop a bit and fixed a dependency bug 2013-01-13 22:32:08 -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
f5f2fbaba9 added stage getDragLayer() method and unit tests 2013-01-12 23:45:28 -08:00
Eric Rowell
5cda46be69 drag and drop layer is now created on stage instantiation, and is removed and added as needed 2013-01-12 23:39:56 -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
40bcaeafed improved drag and drop layer creation logic to further reduce the possibility of a flicker 2013-01-09 23:27:37 -08:00
Eric Rowell
c504e7980b re-fixed drag and drop flicker issue on mobile. It was due to the browser taking a few ms to add to canvas dom when drag and drop started 2013-01-09 22:34:14 -08:00
Eric Rowell
48b85119f5 reverted async prevParent redraw for drag and drop because it has undesirable side effects. Need to find another solution for the flickering behavior on mobile devices 2013-01-09 08:32:05 -08:00
Eric Rowell
ffaa108830 removed animations length cached variable because the length can change while the for loop is running 2013-01-09 08:27:57 -08:00
Arthaey
2879dd92d0 Support creating shapes with points like [[x1,y1],[x2,y2]]. 2013-01-09 00:21:47 -08:00
Eric Rowell
3a6a55d1cc fixed edge case when setting draggable=false on dragend 2013-01-07 19:51:20 -08:00
Eric Rowell
d0148a50ac a small bit of animation code cleanup 2013-01-07 19:38:16 -08:00
Eric Rowell
590889f898 optimized animation code 2013-01-07 19:36:12 -08:00
Eric Rowell
ae103710d3 fixed flickering issue with dd on mobile. removed static framerate logic for dd 2013-01-06 23:31:14 -08:00
Eric Rowell
b542fbb188 finished updating unit tests. All tests now pass 2013-01-02 22:08:34 -08:00
Eric Rowell
66a7e2ac39 layer.toDataURL() now directly returns layer canvas data url if position and size are not specificed. updated unit tests and docs 2013-01-02 22:02:00 -08:00
Eric Rowell
a53db90d0a flattened fill attr, created new Node getter and setter generators that handle type conversions for points, sizes, and rotations 2013-01-01 23:54:02 -08:00
Eric Rowell
522607695f Text fontSize unit is now in pixels (used to be points). Default text lineHeight attr is now 1 (used to be 1.2) 2013-01-01 19:36:13 -08:00
Eric Rowell
7ef59fdcb2 added more blob unit tests 2013-01-01 18:14:30 -08:00
Eric Rowell
e9d56dafba added new Blob shape. removed double quotes from all shapes. made it easier for shapes to extend other shapes 2013-01-01 00:41:13 -08:00
Eric Rowell
176e805e58 decided to make an actual Spline shape. Will create a Blob shape soon, which will be an enclosed spline 2012-12-31 20:30:00 -08:00
Eric Rowell
f3a1e9a247 new spline attr for the Line shape which enables splines 2012-12-31 19:24:35 -08:00
Eric Rowell
7cb4c4269f huge changes to Text shape. Skinnied it up by removing rectangle rendering component. textFill is now fill, textStroke is now stroke, textShadow is now shadow, and textStrokeWidth is now strokeWidth 2012-12-31 12:45:32 -08:00
Eric Rowell
356661ecff updated unit tests with new shadow API 2012-12-31 10:46:23 -08:00
Eric Rowell
206f7bf8d0 fixed up group drag and drop 2012-12-31 01:47:49 -08:00
Eric Rowell
83bf1740a6 flattened shadow object into shadowColor, shadowBlur, shadowOpacity, and shadowOffset attrs 2012-12-31 00:45:38 -08:00
Eric Rowell
7ba40a6a68 drag and drop operatons now dynamically generate a temporary top layer for high performance drag and drop. When completed, the top layer is removed. Also cleaned up a bit of drag and drop logic 2012-12-30 23:14:23 -08:00
Eric Rowell
5e16b3d7d0 fix bug 169 when removing a node, be sure to also remove the drag and drop reference 2012-12-13 00:01:24 -08:00