kangax
a7155ccbfb
Reorganize project structure. Add "customization" demo (work in progress).
2011-06-29 11:10:08 -04:00
kangax
628efcdc70
fabric.Element is renamed to fabric.Canvas, which makes more sense. fabric.Element is kept for compatibility reasons (but is deprecated). Bump version to 0.3.
2011-06-28 19:14:40 -04:00
kangax
6845db3670
Rework observable mechanism: All events are now scoped to canvas instances. fabric.util.observeEvent(...) becomes canvas.observe(...) and only observes events of that particular canvas instance. fabric.util.observeEvent becomes fabric.util.observe, fabric.util.stopObservingEvent — fabric.util.stopObserving, and fabric.util.fireEvent — fabric.util.fire. These could still serve as a generic pub-sub mechanism. Add "mouse:down" event (to be consistent with "mouse:up"). Add "Event inspector" demo page.
2011-06-27 18:25:45 -04:00
kangax
e7aafae9e7
Add support for "opacity" attribute.
2011-06-14 17:28:54 -04:00
kangax
27c72bd634
Use set with object in tests (rather than chaining it).
2011-06-14 10:11:25 -04:00
kangax
0a9d835b12
Dynamically generate accessors based on state properties — width, height, fill, opacity, scaleX, scaleY, etc. For example, rect.set('fill', 'red') can now be replaced with rect.setFill('red'), and rect.get('opacity') with rect.getOpacity().
2011-05-31 00:56:01 -04:00
kangax
abaa87fbd0
Add fabric.Text#backgroundColor (can be used for text highlighting). Change default lineheight of text objects from 1 to 1.6.
2011-05-13 14:34:24 -04:00
kangax
79e37bbf30
Add fabric.Object#selectable Boolean property (true by default), which can be used to control object selection.
2011-05-11 15:56:49 -04:00
kangax
7041b64ad6
Update minified file.
2011-05-10 19:02:31 -04:00
kangax
14e988aa9f
lockScaling constrain is now broken into lockScalingX and lockScalingY ones. Add lockUniScaling to be able to prevent non-proportional scaling of an object. lockHorizontally is now lockMovementX and lockVertically is now lockMovementY for consistency. Change demo accordingly.
2011-05-05 17:02:46 -04:00
kangax
e61f46b44c
Add "lineHeight" to fabric.Text options. Add slider to control line height of selected text to demo.
2011-04-20 16:36:31 -04:00
kangax
cf1c1b2808
Disable clipping in demo.
2011-04-11 15:21:07 -04:00
kangax
a29aa82518
Add experimental clipping support.
2011-04-11 02:41:55 -04:00
kangax
9853b4a18f
Add rudimentary support for stroke style. Fix IE errors on a demo page.
2011-03-28 18:57:40 -04:00
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
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
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
b550020024
Elements that are descendants of <defs> elements are no longer rendered (as per spec).
2011-01-06 15:20:56 -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
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
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
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