kangax
fe37bc66a0
fabric.Element#loadImageFromURL no longer displays image that's being loaded. Fix getPointer unit test.
2011-05-11 18:58:51 -04:00
kangax
3ea4a4ad95
Fix majority of failing unit tests.
2011-05-11 18:17:21 -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
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
a29aa82518
Add experimental clipping support.
2011-04-11 02:41:55 -04:00
kangax
752eff298d
Few small IE fixes.
2011-03-29 13:27:28 -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
9bf3e71ced
When free-drawing, do not create paths with 0 width/height, as they are rendered inconsistently across different browsers.
2011-03-01 19:27:40 -05:00
kangax
d9828321ca
Fix text rendering in IE9. Now fully works! Fix fabric.Element#insertAt not calling setCoords and setupState on added object. This was affecting fabric.Element#loadFromJSON. Thanks vepkenez for bringing it up.
2011-02-17 16:41:16 -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
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
263206a7a0
Remove remaining pieces of Prototype.js
2011-02-06 04:06:40 -05:00
kangax
da6b00fc0e
Introduce fabric.Element#stateful and fabric.Element#renderOnAddition options, as a way to improve performance. Note that setting "renderOnAddition" to false could give a pretty significant performance boost when adding a lot of objects to canvas at once, since fabric.Element#add would not re-render canvas on each addition. Once added, the canvas should be re-rendered manually, via renderAll method.
2011-02-06 02:58:32 -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
cc9d469b81
fabric.Element#remove should clear active object if it's active object that's being removed.
2010-12-25 21:45:30 -05: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
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
f052a067ef
More documentation.
2010-10-19 16:27:24 -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
639aa12e2a
Another chunk of documentation (which is a bitch, by the way).
2010-10-14 22:16:24 -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
eba95c6ee7
Loading data from json (via loadFromJSON rather than loadFromDatalessJSON) should preserve z-index order of objects
...
(but ideally, we need to get rid of duplication in `loadFromJSON` and `loadFromDatalessJSON`).
2010-08-30 19:11:14 -04:00
kangax
13d87dd060
Extend canvas element through excanvas' initElement in fabric.Element.supports.
2010-08-27 13:19:36 -04:00
kangax
2d7d61d82a
Do not set background color value to "transparent", as that results in IE8 painting black. Use "rgba(0,0,0,0)" instead.
2010-08-27 12:29:06 -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
36a50ab3e8
Rendering fixes.
2010-08-02 14:50:07 -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
89e61ed6d0
Add onFpsUpdate callback to fabric.Element. Display FPS in demo.
2010-07-30 19:39:12 -04:00
kangax
3adc592778
Make loadFromDatalessJSON set design background. Make sure its callback is invoked even if there are no objects in json.
2010-07-30 09:50:23 -04:00
kangax
a2bb25043c
toJSON now returns object instead of a string (fixes bug with JSON.stringify returning incorrect — double — serialization of an object).
2010-07-29 13:50:09 -04:00
kangax
2c8540f3b4
Forgot to pass callbacks to fxCenterObjectH and fxCenterObjectV.
2010-07-28 16:35:01 -04:00
kangax
536d532d41
Various compatibility fixes. Add fabric.util.falseFunction.
2010-07-27 17:58:23 -04:00
kangax
313cffa57f
Remove try/catch from around event handlers (for perf. reasons). Remove APE.anim references from fxCenterObjectH and fxCenterObjectV.
2010-07-27 14:07:59 -04:00
kangax
ad679a6f87
Create local aliases of some of the "long" methods.
2010-07-26 19:20:19 -04:00
kangax
a535b004e6
Fix few Prototype dependencies.
2010-07-26 18:00:02 -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
Juriy Zaytsev
5f04e2d495
Add fabric.Triangle class (untested for now). Start beefing up demo.
2010-07-24 01:03:28 -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