Commit graph

30 commits

Author SHA1 Message Date
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
Renamed from src/canvas_element.class.js (Browse further)