Commit Graph

101 Commits

Author SHA1 Message Date
Eric Rowell
0fc44eb3ff finished up all of the context traces for a simple rectangle rendering, and added unit test 2013-09-01 02:03:24 -07:00
Eric Rowell
3ba89d36e7 introduced new Context class. I've bumped up the next release to v4.7.0 because this is a relatively big mind shift in how the framework works, and it's a big enough API change to warrant a minor update. This is the first step towards enabling context tracing for stellar unit testing 2013-08-31 21:49:18 -07:00
Eric Rowell
64d6c79a6a moved factory logic out of Node.js to Factory.js 2013-08-10 21:11:34 -07:00
Eric Rowell
1fc57bed4c removed createAttrs method and cleaned up init logic 2013-07-22 22:05:21 -07:00
Eric Rowell
37a15817b5 removed setDrawFuncs dependency from leaf node classes. It's handled in Shape now 2013-07-22 21:49:30 -07:00
Eric Rowell
9324c366ea standardized init method names with underscores 2013-07-22 21:41:41 -07:00
Eric Rowell
5d1a78589a updated class config param doc include replacements with grunt 2013-06-01 10:27:44 -07:00
Eric Rowell
35b1f61bda tied className into toJSON and create. deprecated shapeType property and getShapeType method 2013-05-19 21:48:48 -07:00
Eric Rowell
993ffd7b0e finished base constructor examples for core shape docs 2013-05-17 20:56:24 -07:00
Eric Rowell
70f5c405a9 finished the major doc updates 2013-05-16 00:28:49 -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
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
8f06f1eb67 heavily updated documentation 2013-05-07 10:19:54 -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
Louis Jolibois
14dc481eee Merge github.com:ericdrowell/KineticJS 2013-03-27 18:55:52 +01:00
Louis Jolibois
823529f839 Fixed word wrapping behavior: last words of a multiline text should not be arbitrarily wrapped anymore.
Fixed width padding not being used.
Removed unused _expandTextData method
2013-03-27 17:12:20 +01:00
Eric Rowell
46c7b89e06 created new test method, testDataUrl, which makes it super easy to identify data url comparison failures that resulted from Chrome upgrades. Begain integrating. fixed all synchronous unit test data url comparison failures 2013-03-24 14:12:00 -07:00
Eric Rowell
5b3a87b98d changed wrapping attribute to wrap 2013-03-20 09:26:55 -07:00
Eric Rowell
809da97a45 merged and tweaked pull request 314 2013-03-20 09:17:21 -07:00
Eric Rowell
821aa7b872 Merge pull request #307 from Turbo87/patch-1
Text: Fixed DASH constant
2013-03-19 10:29:09 -07:00
Eric Rowell
0073c4cbb9 TextPath now uses Text to build the context.font value for consistency and code reuse. Type._getRandomColorKey now uses an or bitwise operation to round rgb values much faster 2013-03-19 10:17:09 -07:00
Eric Rowell
e43c2fbeb4 fixed logic in Text that was accessing padding attr directly without using the getter 2013-03-17 21:16:08 -07:00
Eric Rowell
8e17729cea first pass of new Label plugin 2013-03-15 23:35:40 -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
Louis Jolibois
c58db11a2a refactored the whole _setTextData method of Kinetic.Text, added a 'wrapping' option.
Performances should improve.
Also, the text should not overflow anymore from the defined width like it sometimes did.
2013-03-15 15:40:30 +01:00
Louis Jolibois
5ca21992de Added a shared cached dummy canvas context that may be used by Kinetic.Text methods.
This greatly improves performances when creating lots of Kinetic.Text nodes, especially on mobile devices.
2013-03-14 19:34:35 +01:00
Tobias Bieniek
ac1578b6c6 Text: Fixed DASH constant
The DASH constant should obviously contain a dash instead of a newline character. I guess this was caused by a copy-paste error...
2013-03-08 11:57:31 +01:00
Eric Rowell
5d3180aee5 added text metric caching to improve text drawing performance a bit 2013-02-10 17:36:47 -08:00
Eric Rowell
c9b99a9131 Kinetic.Text code cleanup 2013-02-10 15:42:48 -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
c2e5f4c1b3 refactored stroke and fill logic to eliminate duplicated logic 2013-01-24 22:44:00 -08:00
Eric Rowell
bba5c7b101 really cool new feature that... wait, no, just more docmentation 2013-01-02 23:55:56 -08:00
Eric Rowell
31ad5fca88 updated docs 2013-01-02 21:35:51 -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
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
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
36584a3ce2 cleaned up docs, and beefed up individual shape docs. moved corner radius attr to Rect shape 2012-12-22 23:08:03 -08:00
Eric Rowell
f18bf604de added pixel ratio optimization to sharpen renderings for devices with a pixel ratio > 1 2012-12-13 21:53:39 -08:00
Eric Rowell
291583148b moved all rendering logic into the Canvas renderer modules. Shape draw funcs are now passed a renderer object, not a canvas context. The context is accessible via canvas.getContext() 2012-12-09 09:52:33 -08:00
Eric Rowell
ab19b442a0 wrapped all modules with anonymous func. moved Canvas to root dir because it's now coupled to KineticJS logic. removed whitelisting arrays from Global. Did some prep work for AMD and Node support 2012-12-01 12:04:10 -08:00
Eric Rowell
047e26382e added new wedge shape. cleaned up shape comments. added degToRad and radToDeg helper in Type utility 2012-11-29 20:15:01 -08:00
Eric Rowell
0e6eb3ffe4 fixed up some text shadow issues 2012-11-24 09:15:02 -08:00
Eric Rowell
b67cc4b589 Text shape now depends on Rect for rect drawing func 2012-11-23 22:21:19 -08:00
Eric Rowell
318d03feb7 finished up new Scene and Hit Renderers. added new textShadow attrs for more flexibility. Added new fillStroke() method which encapsulates shadow application logic 2012-11-23 14:54:32 -08:00
Eric Rowell
144e95ad42 preparation work for new Renderer inheritance pattern 2012-11-20 23:03:24 -08:00
Eric Rowell
c121e4b941 you can now pass in custom drawFuncs and drawHitFuncs via shape constructors 2012-11-18 20:28:55 -08:00
Eric Rowell
5be1802729 fix #149 began decoupling scene graph draw and buffer graph draw logic. This will enable more flexibility for developers to define custom buffer draw functions, and it also improves draw performance for both the scene and buffer graphs, because each function can be optimized for its purpose. Also moved text drawing logic to the Text shape 2012-11-12 19:59:19 -08: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
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