kangax
91205b4bb6
More text enhancements and fixes. Demo page now has italic/underline/overline/line-through and shadow buttons for text manipulations.
2011-03-21 17:24:36 -04:00
kangax
b60edcc379
Much more usable multiline text.
2011-03-21 03:53:23 -04:00
kangax
4046084994
Revamp canvas initialization (now simpler, more maintainable, and makes more sense after removing old cruft). Bump version to 0.2. Back. compat warning: wrapping canvas container now has a "canvas-container" class instead of "canvas_container" (the actual class name can also be changed via fabric.Element#CONTAINER_CLASS); canvas background element is no longer created (as it wasn't really used).
2011-03-17 17:59:52 -04:00
kangax
849f2e226f
Use non-minified distribution in suite runner. Will need to create a switch later.
2011-02-13 15:30:03 -05:00
kangax
34e2fbafc9
Prevent errors in parser.js unit tests.
2011-02-13 15:29:03 -05:00
kangax
95cfa88c77
Fix most of the fabric.Object unit tests.
2011-02-13 15:28:38 -05:00
kangax
bf9ffb4768
Add more shapes to the demo.
2011-02-13 15:28:18 -05:00
kangax
a7301741cf
Make sure canvas complexity is re-calculated after async. adding shapes and images. Disable text for now as we can't tell its complexity just yet.
2011-02-13 15:27:54 -05:00
kangax
143c251010
Disable profiling on test page which seems to throw IE9 off.
2011-02-11 01:08:28 -05:00
kangax
7e6b615601
Fix simple shapes test. Make sure objects' coords are set even when fabric.Element#stateful is false.
2011-02-09 18:40:38 -05:00
kangax
240fbf0c13
Uncomment raphael test in complex_shape benchmark.
2011-02-09 18:25:16 -05:00
kangax
2ade9dc0f8
More optimizations: setCoords doesn't need to be invoked on an object before it's added to canvas. This makes most sense when creating path groups, since each of the paths in a path group doesn't really need to have coords. Coords are used to determine object boundaries when moving/scaling/rotating objects, and paths in pathgroup never participate in it (instead, pathgroup does).
2011-02-09 17:30:35 -05:00
kangax
45c9a333a8
Few optimizations in _parsePath implementation.
2011-02-09 16:35:46 -05:00
kangax
d42ba6ec02
Add links to benchmarks in readme; modify simple shapes benchmark to be able to chose number of shapes.
2011-02-09 02:27:25 -05:00
kangax
0a1c52408d
Add breakdown of parsing vs. rendering to complex_shape test.
2011-02-09 01:09:30 -05:00
kangax
83d1d7cecf
Uncomment raphael test in complex_shape_2.
2011-02-09 01:04:31 -05:00
kangax
ca11620451
Replace map with for loop for perf. reasons (as this method is likely to be called thousands of times).
2011-02-09 01:03:04 -05:00
kangax
afb841e085
Add another complex shape (~9K paths) to the raphael vs. fabric perf suite.
2011-02-09 00:41:27 -05:00
kangax
ba4486e5be
Use Array.prototype.slice to convert nodelist to an array (slice is usually faster; it makes sense in this context where nodelists (i.e. shapes) could consist of thousands of elements).
2011-02-09 00:14:12 -05:00
kangax
4d86890b68
Few tweaks to raphael vs fabric tests.
2011-02-06 04:28:04 -05:00
kangax
7e395b9a85
Few tests comparing performance of fabric vs Raphael.
2011-02-06 04:10:08 -05:00
kangax
fef2fd4666
Experiment with multiline text (incomplete; need to properly determine height of the bounding box).
2011-02-06 04:09:40 -05:00
kangax
848f7990b4
Add few more SVG files (for use in a demo).
2011-02-01 19:58:48 -05:00
kangax
bb4aad1de5
Modify cufon and text class to support textDecoration (underline/overline), fontStyle (italic), and textShadow (any valid CSS value).
2011-02-01 19:57:01 -05:00
kangax
fcbe708c5c
Enable color and opacity controls only when something is selected on canvas.
2011-01-30 18:37:02 -05:00
kangax
17c6817bf3
Add native colorpicker (<input type=color>) when available. Note that Chrome produces false positive; doesn't expose actual colorpicker control.
2011-01-30 18:29:30 -05:00
kangax
0dae843114
Revamp object corner detection logic (now, finally, corners are detected properly).
2011-01-23 03:30:22 -05:00
kangax
d54ac51445
Move gradient shape in the demo to the top of the shapes list (where other 1-path shapes are).
2011-01-20 01:44:23 -05:00
kangax
6e8810d791
Gradient color stops can now be parsed from style attribute of <stop> elements (which are children of <gradient> elements). Fix gradient rendering logic, where rendering point would originate from center of the shape, instead of a proper top/left corner. Add 2 more example gradients to the demo page.
2011-01-20 01:42:00 -05:00
kangax
0570d6f825
Add missing assets
2011-01-19 02:32:49 -05:00
kangax
580c0680f0
First stab at parsing + applying css rules to SVG elements. Needs unit tests!
2011-01-19 02:30:35 -05:00
kangax
1acbb04036
Add more demo shapes, including HTML5 logo. Make gradientify button enabled only when there's an active object.
2011-01-18 18:55:46 -05:00
kangax
b35ebd0bb2
Reorganize SVG gradients parsing in such way so that during parsing, objects (to apply those gradients to) were available; we need this to be able to apply percent-based values properly (e.g. x2="100%" should be translated to an object's width, y2="50%" -- to object's height / 2, etc.).
2011-01-09 02:09:28 -05:00
kangax
a40e9cd610
Initial implementation of gradients. Work in progress (but demo page now has working "gradientify" button). Still need to add tests, and make sure gradient-based fills on SVG elements are parsed/set properly.
2011-01-09 01:38:54 -05:00
kangax
6fa84aba5e
Add more shapes to the demo (all except few render properly).
2011-01-09 01:37:04 -05:00
kangax
80148361f3
Add support for parsing <image> SVG elements and creating fabric.Image instances out of them. Backwards-compatibility note: fabric.parseElements changed signature from (elements, options) to (elements, callback, options) and is now an "asynchronous" method -- doesn't return a value, but instead passes it to a callback function (second argument).
2011-01-07 19:53:19 -05:00
kangax
1a84c912d9
Add few more shapes to the demo page
2011-01-07 02:13:44 -05:00
kangax
fdfb61fd48
Make it possible to delete object/group with "delete" key.
2011-01-07 02:12:41 -05:00
kangax
2eea8d4468
Fix style attribute parsing + tests. Add one more shape to the demo (which utilizes style attribute).
2011-01-06 17:13:07 -05:00
kangax
19a82b2b50
Add test for elements inside <defs> being ignored.
2011-01-06 15:38:20 -05:00
kangax
b550020024
Elements that are descendants of <defs> elements are no longer rendered (as per spec).
2011-01-06 15:20:56 -05:00
kangax
d5a82f3fd9
Make sure straight lines are rendered.
2010-12-25 21:48:48 -05:00
kangax
773fe2bc55
Only activate guidelines in demo when url query has specific parameter.
2010-10-31 23:57:59 -04:00
kangax
33278ae20b
Reorganize fabric.Element in such way so that centering and aligning guidelines could work together.
...
`fabric.Element#onObjectMove` callback is gone, replaced by "object:moved" event (which allows subscription to the event by multiple parties).
Similarly, `fabric.Element#onMouseUp` is replaced with "mouse:up" event, and `fabric.Element#afterRender` with "after:render" one.
The drawback of these events, as of now, is that it's not possible to determine which canvas instance fired which event --
in case of multiple canvas instances in a document, this could get hairy. Will probably fix it by introducing some kind of `Observable` mixin,
which would add "observe" and "fire" methods to `fabric.Element` itself.
2010-10-31 22:42:20 -04:00
kangax
33467d15a2
First (crooked and incomplete) implementation of aligning guidelines.
2010-10-31 01:28:54 -04:00
kangax
45795824ac
First stab at centering guidelines and snapping to a center (vertical/horizontal).
2010-10-30 21:47:15 -04:00
kangax
f497327131
Fabric now runs fully under ES5 strict mode (except certain 3rd party dependencies, like cufon.js and json2.js).
2010-10-21 22:54:00 -04:00
kangax
588c422bbb
Give demo text random angle and slightly better random positioning.
2010-10-15 00:59:41 -04:00
kangax
2f168d05a9
Add few sample fonts and cufon.js (which is a dependency for fabric.Text).
2010-10-15 00:56:54 -04:00
kangax
415205d3f2
Document bunch of API (still incomplete, but getting there).
2010-10-14 17:42:39 -04:00
kangax
e70830f7d6
Introduce fabric.log and fabric.warn methods, as simple wrappers around console.log and console.warn (instead of declaring those methods right on console). This makes it easier to mock them when testing, and is generally safer due to less tinkering with host objects.
2010-10-11 14:45:06 -04:00
kangax
8ceca73561
Recalculate offset after adding shape to canvas on demo page (otherwise, FF4 is bugging out for some strange reason).
2010-09-22 18:32:02 -04:00
kangax
c97a41a514
Fix bug on demo page, when requests weren't made.
2010-09-22 18:23:05 -04:00
kangax
b35b559c6a
String.prototype.trim now strips '\xA0' characters in engines which fail to match that character via \s. Fix a couple of unit tests.
2010-09-14 18:57:55 -04:00
kangax
769c0c1eb7
Function.prototype.bind now calls object it's being invoked on indirectly (better spec compliance), thanks Garrett Smith;
...
Unit test `fabric.util.makeElementUnselectable` and make test names in util module more descriptive.
2010-09-14 12:53:29 -04:00
kangax
f2f37e5ffd
Update unit tests count. Add link to project on github to a demo page. Fix one of the remaining failing json tests.
2010-09-09 17:37:32 -04:00
kangax
18d217f2b8
Fix fabric.Object.prototype.toJSON test (which was testing toJSON according to old behavior — returning string, rather than an object).
2010-09-09 17:20:55 -04:00
kangax
e9fd7c6166
Fix bug in Polyline and Polygon points attribute parsing (thanks to unit tests).
2010-09-09 17:10:21 -04:00
kangax
ed4dca3117
Add unit tests for fabric.util.makeElement, fabric.util.addClass, and fabric.util.wrapElement.
2010-09-09 16:37:07 -04:00
kangax
d00a37d593
More effecient Function.prototype.bind and unit tests for bind, getById, and toArray.
2010-09-06 12:33:57 -04:00
kangax
d3de320b49
Add another set of shapes to the demo.
2010-09-05 22:23:46 -04:00
kangax
9a1bd4a728
Add few more shapes to the demo page.
2010-09-02 12:50:45 -04:00
kangax
6ba986da49
Add unit tests for fabric.util.object.extend and fabric.util.object.clone.
2010-09-01 17:56:59 -04:00
kangax
2d9fe82214
Add few more fabric.util unit tests — trim, camelize, capitalize.
2010-09-01 17:35:17 -04:00
kangax
0177c91917
Change links to demo pages from yura.thinkweb2.com to github pages (kangax.github.com/fabric.js). Add link to unit tests, that can be run right in the browser.
2010-09-01 17:03:16 -04:00
kangax
8d5520c49a
Add few more test shapes to a demo page; reorganize sidebar slightly.
2010-09-01 16:15:38 -04:00
kangax
53b1a90516
Fix paths of demo .js files.
2010-08-27 15:01:29 -04:00
kangax
43d11b6914
In demo, notify about inability to serialize canvas to an image when toDataURL is not supported.
2010-08-27 13:25:10 -04:00
kangax
b07fcb52a0
IE9PP3 -> IE9PP4; Add links to demos.
2010-08-27 13:10:23 -04:00
kangax
7d2c7a35f2
Various IE fixes (most of the demo pages now function).
2010-08-27 12:27:49 -04:00
kangax
bd5d670cbc
Add another benchmark (this time with continuous animation and fps indicator). Start experimenting with free drawing via brush.
2010-08-11 22:25:58 -04:00
kangax
b04d187a04
Make free drawing path round and make sure something it's drawn immediately, on mousedown, not just on mousemove.
2010-08-10 23:26:41 -04:00
kangax
5f18c43e91
More free-drawing tweaks. Paths can now be created with different stroke width and color. Add these options to demo.
2010-08-10 19:25:14 -04:00
kangax
9d018caf40
First draft of support for free drawing.
2010-08-10 18:29:33 -04:00
kangax
81cf81b34d
Add support for locking of movement (horizontal or vertical), rotation and scaling of objects.
2010-08-04 23:23:16 -04:00
kangax
1b824736bd
Add another shape and an opacity slider (when input[type=range] is supported).
2010-08-03 01:27:41 -04:00
kangax
d869eac11f
Add another (more complex) shape to demo page.
2010-08-02 20:15:23 -04:00
kangax
8afe03eb67
More demo page improvements and fixes.
2010-08-02 16:33:27 -04:00
kangax
ef73b46f7c
Fix simple shapes (triangle, circle, etc.) being drawn with corners while in selection. Minor perf. improvements.
2010-08-02 14:13:07 -04:00
kangax
37abb1b8d8
Load demo images locally (to prevent SOP errors when serializing an image).
2010-08-02 11:00:38 -04:00
kangax
4ca51a5f81
Add demo.css
2010-07-31 13:58:05 -04:00
kangax
9a9605fecd
Alias Math.* methods for slight perf. increase.
...
Remove `fastestClearingMethod` test, as webkit has rendering bugs with `canvas.width = canvas.width` type of clearing.
Rename some properties/methods in `fabric.Element` from `_oXxxxx` & `_aXxxxx` to `_xxxxx`.
Add test for `fabric.Element::onFpsUpdate`.
2010-07-31 13:55:10 -04:00
kangax
194d71d628
Start experimenting with "free drawing".
2010-07-30 19:41:17 -04:00
kangax
89e61ed6d0
Add onFpsUpdate callback to fabric.Element. Display FPS in demo.
2010-07-30 19:39:12 -04:00
kangax
536d532d41
Various compatibility fixes. Add fabric.util.falseFunction.
2010-07-27 17:58:23 -04:00
kangax
6593983196
Change copyright to include development start date. Remove old, unused files from /test/lib.
2010-07-26 16:35:58 -04:00
kangax
69d83c6484
Add information about test suite results in IE 6 & 7. Few tweaks to make test suite run in IE6.
2010-07-26 15:39:00 -04:00
kangax
e5fa742aff
Alias some methods in fabric.Element for perf. reasons. Few improvements to demo.
2010-07-26 14:58:49 -04:00
kangax
8388559b42
Add alternative minified version of fabric (via google closure compiler) and corresponding gzipped versions (for comparison). Do not set angle of circles in benchmark.
2010-07-26 01:43:25 -04:00
kangax
34777a0fae
Change benchmark to populate not only squares but circles and triangles as well (+ better opacity and positioning randomization).
2010-07-26 01:33:01 -04:00
Juriy Zaytsev
fa757b1717
Whoops, fix switch fallthrough bug.
2010-07-24 01:10:47 -04:00
Juriy Zaytsev
8a69756297
Make it possible to add images on canvas in demo.
2010-07-24 01:09:05 -04:00
Juriy Zaytsev
5f04e2d495
Add fabric.Triangle class (untested for now). Start beefing up demo.
2010-07-24 01:03:28 -04:00
Juriy Zaytsev
1264f05aa4
Some more renaming.
2010-07-24 00:34:18 -04:00
Juriy Zaytsev
33ad430a62
Rename test files: canvas_* --> *
2010-07-24 00:15:13 -04:00
Juriy Zaytsev
5d36a6393d
Ensure test suite can be run on IE8 (currently there's ~30-40 failures).
2010-07-14 10:02:03 -04:00
Juriy Zaytsev
f4b8c6aa89
Change conditional comments so that excanvas.js is only downloaded in IE<9.
2010-07-14 09:25:23 -04:00
Juriy Zaytsev
492eda82a6
Fix loading order of objects in loadFromDatalessJSON. Fix few unit tests.
2010-07-13 16:17:33 -04:00
Juriy Zaytsev
2340a98526
Rename canvas_*.class.js files to just *.class.js
2010-07-09 21:50:13 -04:00
Juriy Zaytsev
2e72a4d8c5
Rename Canvas.* to fabric.* (lowercased name makes more sense since Canvas is not a constructor).
2010-07-09 19:43:50 -04:00
Juriy Zaytsev
4b5ac284e8
Fix remaining failing tests.
2010-07-09 18:58:33 -04:00
Juriy Zaytsev
7242ea93de
Change Prototype unit testing framework to QUnit; change all tests accordingly.
2010-07-09 10:21:40 -04:00
Juriy Zaytsev
be20251d85
Remove few more prototype-isms, start transitioning to QUnit (it's not ideal, but should do for now).
2010-06-26 22:57:02 -04:00
Juriy Zaytsev
8ee515e647
Add Canvas.base.request and finally make demo page work. Remove remnants of Prototype.js from fabric.js.
2010-06-24 03:37:02 -04:00
Juriy Zaytsev
61fbfae2d8
Start experimenting with scout.js (on-demand code fetching based on feature test). Remove some redundant code from Canvas.Element. Add demo folder to /test.
2010-06-17 13:15:51 -04:00
Juriy Zaytsev
05a6aa4d42
Prototype.js and APE.js are no longer dependencies (shrinking overall size of fabric.js by ~150KB). Add json2.js and a simple base library (still needs tests).
2010-06-17 10:00:47 -04:00
Juriy Zaytsev
f8806b649e
Start changing the way unit tests are run.
2010-06-16 15:19:11 -04:00
Juriy Zaytsev
fa4224649c
Building dist file is now done via sprockets.
2010-06-11 19:37:06 -04:00
Juriy Zaytsev
fcb2877557
Replace $w with split(' ') (to remove dependency on global, non-descriptive variable and Prototype in general). Add few missing console.warn statements when double initialization is attempted.
2010-06-11 10:29:12 -04:00
Juriy Zaytsev
e1d036de71
Remove _unittest.js and some of the unnecessary modules from test loader.
2010-06-11 10:12:19 -04:00
Juriy Zaytsev
728b68a66c
Import fabric.js unit tests from printio
2010-06-11 10:07:08 -04:00
Juriy Zaytsev
36416e65a3
Split 2D.js into canvas_point.class.js and canvas_intersection.class.js
2010-06-10 11:37:51 -04:00
Juriy Zaytsev
ea4e1e3a9c
Add W3C SVG 1.2 Tiny test suite
2010-06-10 11:14:53 -04:00
Juriy Zaytsev
770e47b115
Add a couple more dependencies to /lib. Remove unneeded code from 2D.js and unminify it.
2010-06-09 23:30:25 -04:00