kangax
d0e60d7c5a
Fix up/down selection boundaries with shift
2013-11-11 00:01:57 +01:00
kangax
f421979e80
More fabric.Group refactoring
2013-11-10 17:43:23 +01:00
kangax
1ecbf379ff
More group refactoring
2013-11-10 17:31:59 +01:00
kangax
ffa794ed54
Refactor fabric.Group
2013-11-10 17:24:32 +01:00
kangax
1183464dde
Refactor arcToSegments
2013-11-10 17:13:01 +01:00
kangax
fc3bb9fe69
Refactor getColorStop
2013-11-10 16:51:08 +01:00
kangax
db7b0b585f
Refactor _drawControls
2013-11-10 16:43:56 +01:00
kangax
a39474d5bc
Refactor __onMouseUp
2013-11-10 15:34:10 +01:00
kangax
987f165790
Remove duplication in log.js
2013-11-10 15:15:31 +01:00
kangax
4556c7bf45
Fix origins of free-drawing paths and shapes
2013-11-10 11:24:45 +01:00
kangax
cbecc7910c
Fix vertical cursor movement in center/right -aligned and styled text
2013-11-09 18:09:25 +01:00
kangax
ffe6091dd7
Move getObjects to fabric.Collection. Add support for getObjects(type). Version 1.3.10.
2013-11-09 14:50:30 +01:00
Kienz
42935be697
Remove activeObject in fabric.Canvas#remove
...
Fire 'before:selection:cleared' and 'selection:cleared' if activeObject is removed from canvas
Add unit test
Fixes issue #962
2013-11-08 19:09:16 +01:00
Tom French
88b589b3d6
Implement zoom for brushes, various zoom fixes, remove canvasBorder.
2013-11-08 15:54:55 +00:00
kangax
2d2bd68325
Add doc on requestAnimFrame
2013-11-06 21:20:07 +01:00
Juriy Zaytsev
b09af384c4
Merge pull request #956 from articulate/master
...
Finer animation
2013-11-06 12:18:25 -08:00
kangax
dcf1e1e980
Add data-url crossOrigin workaround
2013-11-06 21:16:44 +01:00
kangax
5f643daf54
Normalize behavior of setActiveObject, setActiveGroup, discardActiveObject, discardActiveGroup. Closes #579
2013-11-06 20:58:23 +01:00
kangax
aea61aa64e
Update itext docs
2013-11-06 20:35:32 +01:00
kangax
c3fd102cdb
Fix fabric.Object#selectable. Closes #957
2013-11-06 18:41:02 +01:00
bbudd
24da312a54
fixed weird spacing stuff2
2013-11-05 17:03:47 -08:00
bbudd
61fdc7d93a
fixed weird spacing stuff
2013-11-05 17:03:01 -08:00
bbudd
afb6db8e1c
change animate to use sub-millisecond where possible
2013-11-05 16:58:39 -08:00
kangax
d0abb90f1c
Add fabric.Image#crossOrigin which allows crossOrigin image loading and canvas rendering without tainting. fabric.util.loadImage now accepts 4th argument (crossOrigin) and sets crossOrigin="" on image element by default. fabric.Image.fromURL can be passed crossOrigin via 3rd argument (options). Closes #263
2013-11-05 15:13:15 +01:00
kangax
baf646e7a0
Support mouse and touch events simultaneously. Closes #670
2013-11-05 12:27:15 +01:00
kangax
f91dd30dc7
Better line length in parser
2013-11-05 11:59:48 +01:00
kangax
6cb941c116
Extract elements parsing into a separate object (ElementsParser)
2013-11-04 17:12:05 +01:00
kangax
ce8fe3447d
Break parseStyleAttribute apart
2013-11-04 16:41:26 +01:00
kangax
2753108028
Initial implementation of fabric.IText#toSVG (~75% complete atm)
2013-11-04 15:20:40 +01:00
kangax
59af4b7934
Add ctrl/cmd + x support
2013-11-04 12:05:29 +01:00
kangax
1c07c9600e
Fix cursor appearance in itext
2013-11-04 11:59:10 +01:00
Juriy Zaytsev
fe54615584
Merge pull request #931 from lorenzopolidori/controls-visibility
...
Added object controls visibility. Closes #552 .
2013-11-03 15:28:19 -08:00
kangax
330784ac2c
[BACK_INCOMPAT] Change default objects' originX/originY to left/top
2013-11-04 00:15:49 +01:00
Lorenzo Polidori
d1642c0729
Added object controls visibility (github issue #552 ).
2013-11-03 23:08:05 +00:00
kangax
c6c5090a20
Small tweaks in text.class.js
2013-11-03 17:38:39 +01:00
Kienz
5017bc6626
[BACK_INCOMPAT] fabric.StaticCanvas#backgroundImage and fabric.StaticCanvas#overlayImage are fabric.Image instances. fabric.StaticCanvas#backgroundImageOpacity, fabric.StaticCanvas#backgroundImageStretch, fabric.StaticCanvas#overlayImageLeft and fabric.StaticCanvas#overlayImageTop were removed.
...
`backgroundImage` and `overlayImage` are now `fabric.Image` instances
New property `overlayColor` (analog to `backgroundColor`) - should be set with `canvas.setOverlayColor`
`backgroundImageOpacity` was removed => use `fabric.Image#opacity`
`overlayImageLeft ` was removed => use `fabric.Image#left`
`overlayImageTop ` was removed => use `fabric.Image#top`
`backgroundImageStretch` was removed => use `fabric.Image#width` and `fabric.Image#height`. If you scale your canvas you have to adjust the backgroundImage width/height manually.
Update SVG output.
Add 2nd parameter `firstLetterOnly` to `fabric.util.string.capitalize` => only first letter is transformed to uppercase (other letters stay untouched)
Add `preserveAspectRatio="none"` to `fabric.Image#toSVG` (otherwise streched backgroundImage and overlayImage didn't work as expected)
Update examples - TODO: Update jsfiddles for `setBackgroundImage` and `setOverlayImage`
Add unit test
Closes issue #270
2013-11-03 13:09:49 +01:00
Kienz
6f115bbf1e
Fix fabric.util.enlivenObjects for empty fabric.Group objects
...
Add unit test
Fixes issue #943
2013-11-02 16:02:38 +01:00
kangax
bdf147fbfb
Fix itext styling due to caching
2013-11-02 15:06:15 +01:00
kangax
2da3fa80b5
Slight reorganization
2013-11-02 14:41:28 +01:00
kangax
7eee6ddef0
Add caching to IText which increases performance of large text tremendously
2013-11-02 14:15:20 +01:00
kangax
9bfce93ddf
Only fire dblclick if clicked at the same location
2013-11-02 12:37:50 +01:00
kangax
c5c6474c4d
Ensure one editing text at a time
2013-11-01 22:39:28 +01:00
kangax
7235a97e91
Add basic copy/paste support in IText; fix certain char insertion.
2013-11-01 22:28:23 +01:00
Tom French
328f14f388
Add zoom
2013-10-31 17:36:18 +00:00
kangax
c6ff46269c
Preserve canvas reference in fabric.Object#toDataURL. Closes #938
2013-10-31 16:00:31 +01:00
kangax
6210da1568
Avoid jshint error with "unknown" typeof
2013-10-30 18:15:02 +01:00
kangax
43a8df57b3
Remove duplication in anim_ease
2013-10-30 17:42:49 +01:00
kangax
7ff0ae826f
Refactor _renderViaNative a bit more
2013-10-30 17:35:20 +01:00
kangax
bc5b78f60c
Refactor touch event abstraction
2013-10-30 17:29:55 +01:00
kangax
9433729124
Refactor getPointer
2013-10-30 17:26:26 +01:00
kangax
3b3b478e77
Refactor _setObjectScale
2013-10-30 17:15:53 +01:00
kangax
7022cd4a9b
Even more canvas_events refactoring
2013-10-30 17:05:11 +01:00
kangax
171cfc1a05
More canvas_events refactoring
2013-10-30 16:58:47 +01:00
kangax
cd66612aa3
More canvas_events refactoring
2013-10-30 16:34:57 +01:00
kangax
61a3fb5123
Refactor __onMouseDown
2013-10-30 15:32:04 +01:00
kangax
10a3319ed1
Refactor _restoreObjectState
2013-10-30 15:09:02 +01:00
kangax
8ad5e7e511
IText doc fixes
2013-10-30 14:55:02 +01:00
kangax
f53559773f
Prevent errors in FF when rendering non-ready patterns
2013-10-29 21:14:20 +01:00
Alex Chuchunkov
a6f8e16c81
stopObserving w/o arguments removes all event - handler pairs. Closes issue #936
2013-10-29 22:47:29 +04:00
kangax
167f2fa089
Move shared attributes out of parser since it's needed by many "classes"
2013-10-28 14:01:44 +01:00
kangax
dd11dc7e87
Resize canvas back only after data url is retrieved. Closes #924
2013-10-28 08:02:58 +01:00
kangax
6892783156
Refactor fabric.Text#toSVG
2013-10-27 19:20:46 +01:00
kangax
eee0c9416b
Refactor canvas event handling
2013-10-27 19:05:04 +01:00
kangax
fb05e13c69
Return early
2013-10-27 18:40:53 +01:00
kangax
8d2d6dabad
De-duplicate cursor moving methods even more
2013-10-27 18:39:22 +01:00
kangax
b02c444b3f
Move regex into instance property
2013-10-27 14:35:25 +01:00
kangax
b8b3403b0d
Move line shifting into a separate method
2013-10-27 14:32:33 +01:00
kangax
b6ceb0a87d
Refactor key movement handlers in IText
2013-10-27 14:26:17 +01:00
kangax
733eccb00c
Separate IText behavior into a separate "module"
2013-10-27 14:05:35 +01:00
kangax
803ad572d4
draw -> render, for consistency
2013-10-27 13:27:05 +01:00
kangax
10c8a108d4
Unify image loading in few places
2013-10-27 13:12:48 +01:00
kangax
8f42a40964
Refactor pointerX/pointerY
2013-10-27 13:01:38 +01:00
kangax
f114a566b1
Refactor min/max in lang_array
2013-10-27 12:54:35 +01:00
kangax
64f749f8d1
Remove duplication in Polyline/Polygon classes
2013-10-26 20:20:48 +02:00
kangax
4ecef881fe
Move out event binding
2013-10-26 19:16:44 +02:00
kangax
0aad996dc9
Refactor _scaleObject more
2013-10-26 19:06:48 +02:00
kangax
aa75b47506
Refactor _scaleObject
2013-10-26 18:59:36 +02:00
kangax
d803f9aa64
Refactor _findSelectedObjects
2013-10-26 18:54:29 +02:00
kangax
715f5bd245
Refactor iText a bit more
2013-10-26 18:45:17 +02:00
kangax
bd79c10987
Refactor _getSVGTextAndBg
2013-10-26 11:24:18 +02:00
kangax
9b841f9362
Refactor renderViaNative
2013-10-25 21:50:58 +02:00
kangax
86d8df6c8e
Refactor duplication in gradient class
2013-10-25 20:27:02 +02:00
kangax
ce33c3cd3e
Fix missing argument
2013-10-25 20:20:29 +02:00
kangax
46c5d9073c
Refactor fabric.StaticCanvas#renderAll
2013-10-25 20:13:54 +02:00
kangax
c0effef9e1
Refactor fabric.StaticCanvas#toSVG more
2013-10-25 20:05:18 +02:00
kangax
df1125e0b9
Refactor fabric.StaticCanvas#toSVG
2013-10-25 19:57:31 +02:00
kangax
244d01879f
Refactor long methods in iText
2013-10-25 19:42:17 +02:00
kangax
1cf94af014
Remove duplication in anim_ease.js
2013-10-25 12:15:26 +02:00
kangax
9e6fc35ffe
Refactor fill setting into a separate method
2013-10-25 11:49:47 +02:00
kangax
ffe45dc702
Refactor stroke setting into a separate method
2013-10-25 11:34:47 +02:00
kangax
93d2ab3400
Refactor _getCoordsFromCommand
2013-10-25 11:23:24 +02:00
kangax
f67b78a984
Refactor _parseDimensions
2013-10-25 11:18:44 +02:00
kangax
3e75f63c7b
Refactor iText again
2013-10-25 11:06:58 +02:00
kangax
c9e819ea8e
Refactor IText
2013-10-25 10:56:24 +02:00
kangax
c42d857b14
Refactor _handleGroupLogic even more
2013-10-25 10:43:42 +02:00
kangax
c0c222f672
Refactor _handleGroupLogic
2013-10-25 10:38:32 +02:00
kangax
58f30be963
Add iText
2013-10-25 10:28:30 +02:00
kangax
c2edbf003a
Refactor _setupCurrentTransform
2013-10-25 10:20:55 +02:00
kangax
ae5973676a
Support includeDefaultValues in shadow serialization
2013-10-25 09:05:39 +02:00
kangax
e34fb6a256
More specific documentation
2013-10-25 09:05:39 +02:00
kangax
f6a6ea68b7
Avoid width=0 for text objects
2013-10-25 09:05:39 +02:00
kangax
476da71e92
Doc changes
2013-10-25 09:05:39 +02:00
Stefan Kienzle
9c6565491b
Don't fire 'selection:created' if only one object exists
2013-10-23 09:18:07 +02:00
Kienz
0f9612b69f
Fix object selection with shift key - Closes issue #912
2013-10-22 20:33:20 +02:00
Jason Gauci
6bbc1798f1
Do not name the requirejs module (see http://requirejs.org/docs/api.html#modulename )
2013-10-20 21:10:19 -07:00
Kienz
3b0b9b7d80
Doc additions. Add examples to fabric.Image.filters
2013-10-13 18:46:51 +02:00
Juriy Zaytsev
b92e9575e0
Merge pull request #866 from rykerwilliams/master
...
Update Events / Gestures modules with event.js 1.1.3
2013-10-12 14:13:02 -07:00
Kienz
5adf772a64
Invisible objects are no longer selectable with "selection-mode" (canvas.selection = true) - Closes issue #891
2013-10-09 20:57:41 +02:00
rykerwilliams
5bf42c099f
Add custom object properties to clone function.
2013-10-06 17:02:36 -04:00
rykerwilliams
d40509d688
Remove diff tool change.
2013-10-06 16:41:27 -04:00
rykerwilliams
5445f52db3
Remove canvas_wheel_event.mixin.js. Change wrapping to bind.
2013-10-06 16:35:09 -04:00
rykerwilliams
8fafe15649
Merge branch 'master' of https://github.com/kangax/fabric.js
2013-10-05 21:02:45 -04:00
kangax
5608e17b1a
Add fabric.Polyline example and an inline link to constructor
2013-10-05 12:50:29 +02:00
kangax
eef047a5b3
Add check for skipTextAlign in fabric.Text
2013-10-05 12:50:29 +02:00
kangax
a0c508c1d5
Fix selectable=false objects getting incorrectly selected. Closes #880
2013-10-01 16:52:11 +02:00
kangax
82d9a15fee
Fix left aligning in Node. Version 1.3.7
2013-09-30 18:37:45 +02:00
kangax
f93a0e4313
Fix text rendering offsets on Node by simplifying things
2013-09-30 16:15:00 +02:00
kangax
6cd767c479
Fix offsets of underline/line-through/overline text decoration and line sharpness
2013-09-30 13:38:12 +02:00
kangax
4b65f9f682
Fix removal of default values in fabric.Text#toObject
2013-09-30 13:38:12 +02:00
Juriy Zaytsev
bfcd95b7a4
Merge pull request #878 from Kienz/patch-1
...
Add reviver function to `fabric.Canvas.toSVG` - Closes #690
2013-09-29 04:04:37 -07:00
Kienz
922e7ab159
Include sourcePath in fabric.PathGroup only if its defined
...
Doc additions
2013-09-29 09:56:29 +02:00
Kienz
61835602f9
Remove toGrayscale from fabric.PathGroup and fabric.Collection
2013-09-29 09:49:41 +02:00
Kienz
e94eb59012
Add @example for toSVG with reviver function
2013-09-29 09:28:27 +02:00
Kienz
be86429b32
Add reviver function to fabric.Canvas.toSVG.
...
Reviver function accepts one parameter (svg string representation of object instance) and should return svg string.
Add qunit test.
2013-09-29 09:22:44 +02:00
kangax
f5775eb2f4
Add rectangles optimization to Spray brush
2013-09-28 23:47:53 +02:00
kangax
4b78a2d819
Fix includeDefaultValues to account for stateProperties of specific objects
2013-09-28 23:47:53 +02:00
kangax
ec120452c5
Add x/y in fabric.Rect#stateProperties. Make toObject remove them when includeDefaultValues=false.
2013-09-28 23:47:53 +02:00
kangax
f2ad6e5be6
[BACK_INCOMPAT] Move "backgroundColor" from fabric.Text to fabric.Object (only works with text for now). Remove fabric.Object#overlayFill. Remove fabric.Canvas.toGrayscale, fabric.Object#toGrayscale, and fabric.Object#overlayFill. Version 1.3.5
2013-09-28 23:47:53 +02:00
Kienz
fa2f18a77a
Add more docs.
...
Examples, tutorial and demo links.
2013-09-28 12:31:32 +02:00
kangax
bbb73dcde3
Add more docs
2013-09-27 22:22:28 +02:00
kangax
485b3569d3
Add docs
2013-09-27 22:22:28 +02:00
kangax
bd2857e49a
Add link for mask filter
2013-09-27 22:22:28 +02:00
Juriy Zaytsev
3345156793
Merge pull request #873 from Kienz/docAddtions
...
Doc additions
2013-09-26 12:12:28 -07:00
Kienz
7792b1274b
Doc additions
...
Add example and jsfiddle link to `canvas.loadFromJSON`
2013-09-26 21:04:10 +02:00
Kienz
9de6c9a473
Doc additions
...
Add examples and links to jsfiddle to `fabric.Object.setGradient`, `fabric.Object.setPatternFill`, `fabric.Object.setShadow` and `fabric.Canvas.toDataURL
2013-09-26 20:17:53 +02:00
kangax
db8f0515f1
Add docs for object accessors. Build distribution.
2013-09-26 19:55:17 +02:00
Kienz
30ffd894d6
Add missing doc additions of previous commit from kangax
2013-09-26 18:43:13 +02:00
Kienz
5f9edecd18
[BACK_INCOMPAT] Split fabric.Object.centerTransform and fabric.Canvas.centerTransform into the properties centeredScaling and centeredRotation
...
centeredScaling: Define if object scaling should be centered (true). Default = false.
centeredRotation: Define if object rotates around center (true) or around origin (originX/originY) point (false). Default = false.
Pressed altKey negates the behavior.
2013-09-26 18:19:17 +02:00
kangax
365b2dc0a9
Doc additions
2013-09-26 17:50:28 +02:00
Juriy Zaytsev
aeaa5fcb00
Merge pull request #857 from briefbanane/master
...
Allow toggling of flipX/Y to flip the whole group
2013-09-26 06:04:11 -07:00
kangax
41ab3a0064
Doc additions
2013-09-26 14:12:02 +02:00
Fabian Ebner
44756d4a57
Handle addWithUpdate removeWithUpdate and destroy differently
2013-09-25 22:42:13 +02:00
Fabian Ebner
61fff6b8c6
Clean up code and fix rotation issue
2013-09-25 21:50:09 +02:00
kangax
812717b207
Add fabric.Object#evented. fabric.Object#selectable now fires events again, but can not be selected. However, evented=false does not receive events at all.
2013-09-25 19:05:57 +02:00
Fabian Ebner
5576759eb4
Preserve rotation after flipping when group isn't selected anymore
2013-09-25 15:34:30 +02:00
kangax
7e9e27aba5
Fix object loading yet again
2013-09-24 18:34:32 +02:00
kangax
15a6a3c3df
Fix objects enlivening with sparse arrays. Version 1.3.3
2013-09-24 15:58:52 +02:00
kangax
83ca60e885
Fix resolveNamespace and getKlass on node
2013-09-24 13:25:38 +02:00
Fabian Ebner
f02c657f84
If group was flipped and is destroyed always re-flip children
2013-09-24 12:47:39 +02:00
Fabian Ebner
6e96b3f1fb
Allow flipping in fabric.Group to change the object positions permanently
2013-09-24 12:38:11 +02:00
Stefan Kienzle
0a4bbfb4bb
Remove check for fabric.Color because only string values are allowed for color parameter. Otherwise initialization breaks if opacity is not defined.
2013-09-23 17:56:07 +02:00
rykerwilliams
f083a3dabb
Forgot __onShake method.
2013-09-23 10:55:00 -04:00
rykerwilliams
88aa0df407
Added new custom version of event.js. Added event listeners for shake, drag and orientation change.
...
Custom version available: https://github.com/rykerwilliams/Event.js
2013-09-23 10:10:40 -04:00
rykerwilliams
888f324e46
Casing Issue. Remove unneed variables.
2013-09-21 17:51:51 -04:00
rykerwilliams
9283530837
Add wheel event mixin.
2013-09-21 17:41:06 -04:00
Stefan Kienzle
60e9d0f144
[BACK_INCOMPAT] Initialization of fabric.Image.filters.Tint is now different - options.color: color string value, options.opacity: 0..1
...
Now you can define opacity of the tint filter (by rgba/hsla colors or with opacity attribute)
Doc additions
2013-09-20 19:51:55 +02:00
kangax
6de9f65702
Fix animation abort
2013-09-19 19:49:51 +02:00
kangax
24836cbdaf
Call abort earlier in animation loop (makes it possible to abort immediately)
2013-09-19 19:49:51 +02:00
kangax
d29a1d9ccd
Uncomment fabric.Object#getPointByOrigin
2013-09-19 19:49:51 +02:00
Juriy Zaytsev
e627c8804a
Merge pull request #856 from Kienz/patch-2
...
Fix wrong object order in `fabric.Group.toSVG`
2013-09-18 13:34:29 -07:00
Kienz
cb510b9ef3
Fixed fabric.Group.toSVG- object order was wrong
2013-09-18 19:17:50 +02:00
Kienz
815ca4ec70
Fixed fabric.Tectvertical position
2013-09-18 17:28:36 +02:00
Juriy Zaytsev
3c50e72548
Merge pull request #853 from Kienz/patch-1
...
Avoid unnecessary `renderAll` calls in mousedown and mouseup events
2013-09-18 06:17:51 -07:00
Kienz
516fa76b68
Fix jshint error
2013-09-18 08:23:36 +02:00
Kienz
721ac7a8c2
Doc additions - document object parameter
2013-09-17 22:42:58 +02:00
Stefan Kienzle
23a4685d22
Avoid unnecessary renderAll calls in mousedown and mouseup events.
...
Tested it with `canvas.selection = true/false`.
2013-09-17 18:45:54 +02:00
Kienz
ba2a0e6dff
Fixed fabric.PatternBrush- brush style was not applied during the drawing mode
2013-09-16 19:05:23 +02:00
kangax
dbc96349ce
Refactoring
2013-09-15 20:29:20 +02:00
Kienz
e69c19029a
Fixed object.toDataURL if object's originX/originY != 'center'
...
Add documentation to object.toDataURL for options object
Alias "jpg" format to "jpeg". Closes #806
2013-09-15 18:02:15 +02:00
kangax
b077905781
Avoid creation of exports global var as this messes up QUnit (and probably something else)
2013-09-14 20:40:40 +02:00
kangax
408a8b9de6
Alias "jpg" format to "jpeg". Closes #806
2013-09-14 18:44:44 +02:00
Kienz
26e784aede
Move setColorfrom fabric.Text to fabric.Object
...
Fixed "enum" notation
`fabric.Object.setGradient` is now chainable
Doc additions
Add `fabric.Object.setPatternFill`unit test
Add chainable tests to some methods
2013-09-14 17:10:49 +02:00
kangax
f5f29a3925
Create group of circles in CircleBrush for better performance. Closes #530
2013-09-14 13:59:10 +02:00
kangax
44265e3c97
Create group of rectangles in spray brush for better performance
2013-09-14 13:55:21 +02:00
kangax
eeb0f72bd4
Move fabric.Rect's stateProperties to prototype for more efficient memory usage
2013-09-14 13:54:18 +02:00
kangax
c1a818ac33
Add support for cropping in toDataURL. Closes #449 . Version 1.2.14
2013-09-14 12:42:25 +02:00
kangax
40e27b7392
Document text accessors
2013-09-13 19:03:05 +02:00
Stefan Kienzle
539afb8d97
Some small changes in fabric.Observable
2013-09-13 16:18:18 +02:00
Juriy Zaytsev
a7489774fd
Merge pull request #840 from Kienz/patch-2
...
`fabric.Observable.on` and `fabric.Observable.off` can add/remove multiple handlers (object with key/value pairs). Closes #838
2013-09-12 14:49:31 -07:00
Kienz
1e1adc7831
fabric.Observable.on and fabric.Observable.off can add/remove multiple handlers (object with key/value pairs)
...
Update jsdoc
Add unit tests
2013-09-12 20:43:31 +02:00
Kienz
9f6dea5d9e
Add reviver function to fabric.Canvas.loadFromJSON (and loadFromDatalessJSON)
...
Add unit test
2013-09-12 20:10:23 +02:00
kangax
5ebd697978
[BACK_INCOMPAT] Remove selectable, hasControls, hasBorders, hasRotatingPoint, transparentCorners, perPixelTargetFind from default object/json representation of objects. Fix includeDefaultValues. Version 1.2.13. Closes #795
2013-09-11 11:41:00 +02:00
kangax
95c97f5447
[BACK_INCOMPAT] Object rotation now happens around originX/originY point UNLESS centerTransform=true. Version 1.2.12. Closes #439
2013-09-09 16:39:39 +02:00
kangax
bec5787267
Update docs
2013-09-09 02:42:16 +02:00
kangax
36cd31b7a3
Fix object:modified firing incorrectly with groups. Closes #717
2013-09-09 02:27:19 +02:00
kangax
0fc54d4f7f
Fix Point and Intersection docs. Build distribution.
2013-09-06 19:12:57 +02:00
Juriy Zaytsev
62740ff27b
Merge pull request #828 from bernardofd/master
...
Replace the Streams interface with FS.readFile() in asset loading on Node.js
2013-09-06 10:04:55 -07:00
Bernardo F. Domingues
806a44e3c3
Renaming "url" to "path" for clarity reasons
2013-09-06 11:39:28 -03:00
Bernardo Figuerêdo Domingues
67d1a4732c
Replacing Streams interface for FS.readFile to load assets in the Node.js module
2013-09-06 11:36:09 -03:00
Stefan Kienzle
d190c31e8b
Renamed fabric.Shadow.getShadow to fabric.Shadow.toString
2013-09-05 18:09:34 +02:00
Juriy Zaytsev
ed1c116793
Merge pull request #823 from Kienz/patch-1
...
[BACK_INCOMPAT] `fabric.Text.textShadow`was removed and `fabric.BaseBrush` shadow properties removed (new `fabric.BaseBrush.shadow`)
2013-09-03 12:27:13 -07:00
kangax
70213ea92f
Tweak build.js; build distribution
2013-09-03 21:23:35 +02:00
kangax
4559918688
Resolve conflicts
2013-09-03 21:18:29 +02:00
kangax
fc3bc45920
Fix text decoration offset for text with originY=top
2013-09-03 21:17:00 +02:00
Drew Lustro
1f993e92b8
requirejs support added via "requirejs" build.sh option
...
$ node build modules=ALL requirejs
- dist/all* is clean of changes
- fixed bug in build.sh that would prevent dist/all.require.js from compiling properly
- Updated test.js to include test_script.js fixtures
- NOTE: Qunit tests largely incompatible with requirejs version... need more
insight on how Qunit works to get fabric in the namespace since it is
no longer a global when built as an AMD module.
2013-09-03 14:15:12 -04:00
Kienz
b638487686
Performance optimization - removed senseless code
2013-09-03 19:18:16 +02:00
Kienz
8c74f2b335
[BACK_INCOMPAT] fabric.Text#textShadow has been removed - new fabric.Text.shadow property (type of fabric.Shadow)
...
[BACK_INCOMPAT] `fabric.BaseBrush`shadow properties are combined into one property => `fabric.BaseBrush.shadow`(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY no longer exist)
Removed fabric.Text.getText method => is generated with `fabric.util.createAccessors`
`fabric.Shadow` can now initialized with string or object (e.g. '10px 10px 5px rgb(0,0,255)', 'rgb(0,0,255) 10px 10px 5px', {color: 'gb(0,0,255)', offsetX: 10, offsetY: 10, blur: 5})
`fabric.Shadow.getShadow`to get css3 declaration of shadow (String)
`fabric.Object.set('shadow', value)`is now the same as `fabric.Shadow.setShadow(value)`
Add unit tests
2013-09-03 19:11:21 +02:00
kangax
d7469c6a93
Make selectable=false objects propagate events through
2013-09-03 12:01:26 +02:00
kangax
ec32a3c399
Make on/off/trigger chainable
2013-09-03 11:52:10 +02:00
kangax
c262cd306d
When firing event, call handler in context of object firing event
2013-09-03 11:43:46 +02:00
kangax
28fa7a8b3f
Add fabric.Object#hoverCursor; just like fabric.Canvas#hoverCursor but on object level
2013-09-03 11:43:10 +02:00
kangax
e1df87c64c
Some (non-breaking) text changes to allow for more granular line height
2013-09-01 00:10:12 +02:00
kangax
e620e634b2
Add backwards-incompat doc notes
2013-08-31 12:52:30 +02:00
Stefan Kienzle
89f3ab0668
Fix fabric.Circle.set for radius - update width/height if radius is set
...
Closes issue #811
2013-08-30 11:51:08 +02:00
kangax
507dff705b
Fix tint filter. Thanks @mewdriller
2013-08-30 01:13:29 +02:00
Kienz
345ed3f5e9
Fix fabric.Text#fontFamily in SVG output - Closes issue #813
...
Add unit tests
2013-08-29 22:06:24 +02:00
kangax
434bfb2c6d
Fix fabric.Canvas subclassing; fabric.Canvas, fabric.StaticCanvas now created via createClass.
2013-08-28 15:17:25 +02:00
Kienz
f31a62a25c
Add encoding to canvas.toSVG(options)
...
Add unit tests for canvas.toSVG
2013-08-27 20:32:15 +02:00
kangax
78dc27a029
Call abort in context of an object. Closes #803
2013-08-23 14:30:33 +02:00
Jaak Sarv
2cd96f7933
Fixed bug where object selection borders where misaligned
2013-08-22 18:05:12 +03:00
Juriy Zaytsev
b708fbafa4
Merge pull request #799 from vegasje/feature/allow-touch-scrolling
...
Simple boolean option on canvas to allow scrolling on touchscreen devices
2013-08-21 15:19:22 -07:00
Jeremy Watkins
143203d99d
Adding a default allowTouchScrolling value, along with a description of its purpose
2013-08-21 15:01:00 -07:00
Stefan Kienzle
55d5d99fdc
Fix loadFromJSON for image objects without image filters
2013-08-21 10:08:35 +02:00
Jeremy Watkins
d728951ccf
Simple boolean option on canvas to allow scrolling on touchscreen devices
2013-08-20 10:44:53 -07:00
kangax
d1bcd18de5
Fix resolveNamespace
2013-08-17 20:18:06 +02:00
Stefan Kienzle
bd60887ef2
Remove cursor reset in __onMouseUp (old fix for firefox). Closes issue #793
2013-08-15 16:06:26 +02:00
Juriy Zaytsev
751f39cc58
Merge pull request #792 from Kienz/maskFilter
...
Update `fabric.Image.filters.Mask` - based on https://github.com/kangax/fabric.js/pull/667 (@aleph1)
2013-08-14 13:00:49 -07:00
kangax
a2e4d30a82
Add fabric.Canvas#skipTargetFind
2013-08-14 21:51:00 +02:00
Stefan Kienzle
901ee7f942
Update fabric.Image.filters.Mask - based on https://github.com/kangax/fabric.js/pull/667 (@aleph1)
...
[BACK_INCOMPAT] `fabric.Image._initFilters` is now async, add parameter callback
Add `fabric.util.resolveNamespace` - used to get correct klass in `fabric.util.enlivenObjects`
Doc additions
2013-08-14 18:07:56 +02:00
kangax
a5ab1baf24
Don't call setCoords when rendering text
2013-08-14 13:54:39 +02:00
kangax
4b1d1140eb
Doc additions
2013-08-14 12:55:09 +02:00
kangax
3317010fdf
Add support for fabric.Text#skipFillStrokeCheck
2013-08-14 12:55:08 +02:00
Stefan Kienzle
e151d297fc
Add filter root class fabric.Image.filters.BaseFilter from which all filter classes inherit from
2013-08-13 14:06:33 +02:00
kangax
79cd44650c
Update docs, build distribution
2013-08-12 11:52:13 +02:00
Kienz
a61b384684
Add toJSON back to image filters
...
Add toJSON to unit tests
2013-08-09 20:37:56 +02:00
Kienz
f2035da955
Add image filter tests
...
Doc fixes
2013-08-09 19:59:30 +02:00
Stefan Kienzle
6599d393ac
Fix fabric.Image.setElement - now _element and _originalElement (until now _originalImage) are set. Closes #745
...
Add additional parameter callback (invoked after filters habe been applied).
Fix `fabric.Image.fromObject` - don't overwrite image width/height with object width/height.
`fabric.Image.applyFilters` only resets _originalElement - fixes issue if object's width/height are different to _originaElement's width/height
[BACK_INCOMPAT] Renamed `fabric.Image.filters` method `toJSON` -> `toObject`
Fix serializiation of fabric.Image filter objects
2013-08-09 14:18:27 +02:00
Kienz
92bdebfde7
Doc fixes, Update README (1800+ unit tests)
2013-08-08 18:31:26 +02:00
kangax
2c6f6c27b4
Doc fixes
2013-08-08 16:39:40 +02:00
Juriy Zaytsev
7ce8b35fd8
Merge pull request #784 from Kienz/colorFix
...
Add color "orange" to `fabric.Color.colorNameMap`
2013-08-07 15:17:05 -07:00
Kienz
31f1abac12
Add color "orange" to `fabric.Color.colorNameMap
2013-08-07 21:39:25 +02:00
Kienz
b63a943137
Renamed property renderOnAddition to renderOnAddRemove
...
fabric.Canvas.renderAll can now be disabled on removing objects (renderOnAddRemove = false)
Add tests for renderOnAddRemove (add, insertAt and remove)
jsdoc additions
2013-08-07 21:01:45 +02:00
kangax
ef0ebebf0b
Add _drawChars abstraction in text class
2013-08-07 13:52:35 +02:00
kangax
5717df817b
Fix error when parsing gradient-based fill attribute. Closes #749
2013-08-07 13:51:59 +02:00
kangax
bbe83dad0f
Support reviver in Node's version of loadSVGFromURL and loadSVGFromString
2013-08-06 16:12:00 +02:00
kangax
9edba2c8f6
Add fabric.Image.pngCompression and use it in applyFilters under Node
2013-08-05 11:22:05 +02:00
Stefan Kienzle
473663aea1
Merge pull request #767 from MeLight/master
...
Single click in freedrawing mode now works for pencil brush, circle brush and pattern_brush - fixes #756
2013-08-02 10:25:19 -07:00
Yuri Shmorgun
25b12d3cd7
Renamed putPaint to drawDot
...
Fixed more styling issues
2013-07-30 21:33:45 +03:00
kangax
c827c92aad
Add oCoords in docs
2013-07-30 16:41:18 +02:00
kangax
a64cc65eb6
Pass abort option in fabric.Object#animate
2013-07-29 23:58:15 +02:00
Yuri Shmorgun
b507c0c18d
Fixed tabs
2013-07-29 00:31:12 +03:00
Juriy Zaytsev
f55e25f904
Merge pull request #772 from Kienz/patch-1
...
Set object shadow and context shadow only if shadowColor is set
2013-07-28 10:49:05 -07:00
kangax
e6bc08701c
Update centering methods docs to mention the need for setCoords
2013-07-28 19:43:07 +02:00
Kienz
e6188e55f3
Set object shadow and context shadow only if shadowColor is set
...
Otherwise toSVG() returns for every brush object a shadow filter
2013-07-28 18:36:29 +02:00
kangax
f270ca0259
Move animation methods to an optional module
2013-07-28 15:25:31 +02:00
kangax
0c98f83fa4
Simplify node-based applyFilters
2013-07-27 20:47:45 +02:00
kangax
34b5eee748
Increase dimensions of svg filter region to avoid clipping
2013-07-27 19:52:44 +02:00
melight
f9438fd66d
Gah. Fixed tabs and spaces. Again.
2013-07-27 01:24:47 +03:00
melight
26bf1b78f3
Fixed indentations issues too!
2013-07-27 01:17:08 +03:00
Yuri Shmorgun
de9b077469
Fixed JSHint issues from previous commit
2013-07-25 20:43:42 +03:00
kangax
7a46482328
Add shadow toSVG support. Version 1.2.7
2013-07-25 19:39:21 +02:00
kangax
22ac5d947f
Fix patterns width/height
2013-07-25 16:45:15 +02:00
Yuri Shmorgun
d5de9042cd
Issue #756 fixed - single click in free drawing mode now works for pencil brush, circle brush and pattern_brush (inherits pencil brush fix)
2013-07-24 23:30:48 +03:00
kangax
bc3adcffbc
Clip free drawing
2013-07-24 22:16:28 +02:00
Kienz
0912d1eeeb
Remove activeObject on creating activeGroup with shiftKey - closes issue #764
...
Add @default jsdoc tag etc.
2013-07-24 20:21:51 +02:00
kangax
67b54a44a5
Fix pattern toSVG
2013-07-22 22:00:03 +02:00
kangax
974ed943b8
Fix polyline, polygon tests and JSHint warnings
2013-07-22 14:39:07 +02:00
kangax
6b36e72521
Make SVG output Corel Draw -compatible. Closes #758
2013-07-22 14:22:36 +02:00
kangax
d3e2b03856
Start implementing pattern toSVG support
2013-07-22 14:22:36 +02:00
Kienz
c9d866dcf9
Fixed fabric.PathGroup.fromObject - use fabric.util.enlivenObjects to instatiate fabric.Path objects
...
Corrected jsdoc tags for fabric.PathGroup.fromObject, fabric.Path.fromObject and fabric.Path.fromElement
Fixed quint tests for fabric.Path and fabric.PathGroup
2013-07-18 22:21:19 +02:00
kangax
6f1b6bf243
Avoid canvas re-rendering for each object when loading from JSON
2013-07-17 16:36:29 +02:00
kangax
45017eeed2
Fire 'path:created' event for circle and spray brushes
2013-07-16 23:46:11 +02:00
kangax
8a0e9bd6b4
Fix fabric.Path.fromElement. Version 1.2.5
2013-07-13 20:15:35 +02:00
kangax
8f02189d50
Fix fabric.Path/fabric.PathGroup fromObject
2013-07-13 18:56:41 +02:00
Juriy Zaytsev
d741b647bc
Merge pull request #740 from nathan-muir/kangax-master
...
Fix issue with `fabric.Line` in browsers that don't support 'setLineDash'
2013-07-13 02:09:00 -07:00
kangax
b8ad7fa79e
Clip text background and decoration properly. Closes #743 .
2013-07-13 02:35:04 +02:00
kangax
c8cab03aac
[BACK_INCOMPAT] fabric.Path.fromObject is now async. fabric.Canvas#loadFromDatalessJSON is deprecated.
2013-07-12 22:38:21 +02:00
kangax
72ef6c67fa
Parse lineHeight in style attribute. This fixes IE11's only failing test.
2013-07-11 20:39:45 +02:00
Nathan Muir
f97d593c84
Fixed issue with fabric.Line when browser doesn't support 'setLineDash' (firefox & IE 10). Example at http://jsfiddle.net/taRvU/1/
2013-07-11 12:16:34 +10:00
kangax
4e5f5badc0
Avoid trailing comma in shadow.class.js when toSVG is stripped. Thanks @danielbeardsley
2013-07-08 12:39:19 +02:00
kangax
0bf607be2e
Revert polygon/polyline points change as it breaks shapes in SVG import section
2013-07-08 12:39:13 +02:00
kangax
3eb00518f8
Fix pointer detection in scrollable container. Thanks @kwicher. Closes #730
2013-07-07 22:32:03 +02:00
kangax
21f87bb63a
Fix polygon/polyline tests and minor cleanup
2013-07-07 22:25:01 +02:00
Juriy Zaytsev
3076a7b45f
Merge pull request #736 from timandres/master
...
Fix polygon/polyline bounding box
2013-07-07 13:09:30 -07:00
kangax
33fd6c66b5
Version 1.2.1
2013-07-06 16:04:29 +02:00
Juriy Zaytsev
e4989e3fbe
Merge pull request #709 from woutercommandeur/path
...
Fix path behaviour with top/left offsets. Closes #663
2013-07-06 05:56:43 -07:00
kangax
0b9a9fa9e2
Fix incorrectly created group. Closes #710
2013-07-05 23:10:45 +02:00
kangax
be72f68670
Make sure object angle is always positive
2013-07-04 14:18:30 +02:00
kangax
a33a599417
Remove commented out code
2013-07-04 14:18:30 +02:00
Juriy Zaytsev
aca2a62a22
Merge pull request #734 from sn3p/master
...
Make `sendBackward` / `bringForward` work with non-intersecting objects
2013-07-03 15:38:20 -07:00
Matthijs Kuiper
fe4c0cbb32
Make sendBackward/bringForward work with non-intersecting objects
...
sendBackward/bringForward functions now take an additional parameter
`intersecting` (boolean).
If `true`, send object behind/in front of next intersecting object.
If `false` (default), send object one level down/up without checking for
intersection.
See issue https://github.com/kangax/fabric.js/issues/707
2013-07-03 23:05:05 +02:00
Kienz
520b2258d3
Convert opacity value into float value. If stop-opacity is set as attribute (not as style attribute) el.getAttribute('stop-opacity') returns null. Problem exists since commit a0b7fa4eb9.
...
Add default value rgb(0,0,0) for stop-color and 1 for stop-opacity.
Add more gradient tests.
2013-07-02 21:09:50 +02:00
Tim Andres
1576306ef0
Simplified fabric.util.getBoundingRect code
2013-06-28 17:29:07 -04:00
Tim Andres
09e438b0ee
Fixed bounding box bug with SVG parsed polylines and polygons
2013-06-28 16:39:15 -04:00
kangax
53aaedadb6
Fix docs
2013-06-20 14:24:00 +02:00
Daniel Beardsley
f10bef57af
Resizing: allow centerTransform per-object
...
Instead of ONLY a global setting. Some objects (like circles) make far
more sense with centerTransform so it's nice to be able to do it
per-object.
2013-06-19 17:01:32 -07:00
Juriy Zaytsev
8805547e74
Merge pull request #716 from iFixit/load-image-buffer-support
...
Add support for Buffers in `fabric.utils.loadImage`
2013-06-19 04:19:33 -07:00
Cedric Wienold
5fc960aa56
Add support for Buffers to utils.loadImage
...
If the user has preloaded image data in a Buffer, allow that user to use
that data to load into a Fabric.js image.
This is possible because node-canvas supports setting 'src' to a Buffer.
2013-06-19 04:11:06 -07:00
kangax
6597b8919b
Make sure only existent custom properties included in output. Closes #713
2013-06-19 12:49:45 +02:00
kangax
4d4a129ee6
Fix objects z-index when creating a group via shift click
2013-06-18 12:34:43 +02:00
Michal Knizek
f22c198a1e
Zero opacity in gracient color stop kangax/fabric.js#711
2013-06-18 09:00:55 +02:00
Wouter Commandeur
b2b305e90b
fix path behaviour with top/left offsets, fixes #663
2013-06-16 11:56:35 +02:00
kangax
be8e921e57
Fix nested matrix multiplication. Closes #705
2013-06-13 23:10:33 +02:00
Stefan Kienzle
7e9122945e
Merge pull request #701 from woutercommandeur/flip
...
fix flickering when flipping using the corner scaling controls
2013-06-13 13:36:37 -07:00
Wouter Commandeur
6f4e78d6fc
semicolons again
2013-06-13 17:50:40 +02:00
Wouter Commandeur
cb5bb66628
adjust scaling when dealing with padding
2013-06-13 17:41:07 +02:00
Wouter Commandeur
34e00e862c
missing semicolon fixed
2013-06-13 17:00:31 +02:00
Wouter Commandeur
10e878fb62
mouse coordinates had to be adjusted for padding, now scaling works with padding as well
2013-06-13 16:52:21 +02:00
kangax
5bd8ba28d6
Fix loadFromJSON callback when objects array is empty. Closes #703
2013-06-13 13:39:17 +02:00
Wouter Commandeur
f4e4715905
remove commented out code
2013-06-12 21:23:15 +02:00
Wouter Commandeur
ecedb34d23
fix behaviour to be the same as the original
2013-06-12 21:21:34 +02:00
Wouter Commandeur
0ad759c428
fix flickering when flipping using the corner scaling controls
2013-06-12 19:24:30 +02:00
Riley Dutton
d79ff8f5e2
Fix bug for not firing selection:created when using Shift to add objects
...
Currently if you use Shift+Click to add objects to a group, selection:created will only fire after you add 3 or more objects to the group. This fix allows selection:created to fire when the group is first created (when the second object is added).
2013-06-12 10:19:00 -05:00
Juriy Zaytsev
6ad7e80f95
Merge pull request #696 from woutercommandeur/scaleflipfix
...
Fix flipping by using the corner controls
2013-06-12 06:31:00 -07:00
Wouter Commandeur
3809d19024
fix indentation
2013-06-11 11:03:05 +02:00
Wouter Commandeur
6dec0d24e0
fix flipping of objects using the corner controls
2013-06-11 10:07:35 +02:00
Wouter Commandeur
86bda44927
adjust point translation for strokeWidth. This fixes #687 (part 2)
2013-06-10 16:59:52 +02:00
kangax
5792521c7a
Remove bottom/right from fabric.Path#_parseDimensions, as it's incorrect and not used anywhere. Build distribution. Closes #666
2013-06-10 15:44:23 +02:00
kangax
816261d863
objects -> getObjects()
2013-06-10 15:30:17 +02:00
kangax
d89dea62ac
Only use quadraticCurveTo when rendering rectangle with rounded corners. Closes #691
2013-06-10 15:30:17 +02:00
Wouter Commandeur
b55bfd5326
fix scaling with large strokeWidth, this fixes #687
2013-06-09 21:28:08 +02:00
Wouter Commandeur
e503c36170
fix objects jumping around when scaling one side of a group and then rotating
2013-06-07 16:42:26 +02:00
kangax
51b7c09314
Move Cufon methods to text.cufon. Move drawControls to Canvas (from StaticCanvas). Move dataURL-exporting methods to dataurl_exporter mixin.
2013-06-06 12:31:32 +02:00
kangax
e1f93a3668
Move dimensionAffectingProps to fabric.Text.prototype. Simplify and speed up Intersection class. Build distribution.
2013-06-06 03:06:17 +02:00
kangax
55eeed181b
Move drawArc to utils. Simplify and speed up fabric.Point
2013-06-06 02:49:42 +02:00
kangax
64317de0d0
Revert text box behavior back to previous (so that characters don't peak out of bounding box). Version 1.1.21
2013-06-05 14:53:35 +02:00
kangax
1b1e0ecc72
Fix node text rendering again
2013-06-05 13:51:26 +02:00
Wouter Commandeur
3c9f7ba5ab
and fix bug.
2013-06-04 21:57:00 +02:00
Wouter Commandeur
54aad583cd
no need for extra local var
2013-06-04 21:55:54 +02:00
Wouter Commandeur
823ea5ecc5
local var for strokeWidth
2013-06-04 21:52:30 +02:00
Wouter Commandeur
b8e3e6d83f
proper fix for strokeWidth causing problems with controls on large scaling
2013-06-04 21:51:23 +02:00
Wouter Commandeur
af31d2abc9
fix object controls being incorrectly rendered at large scaling. Fixes #680 .
2013-06-04 21:20:03 +02:00
Wouter Commandeur
e377e681c3
adjust mouse cursor depending on rotation. fixes #644
2013-06-03 19:10:33 +02:00
kangax
2f1383a713
Fix text rendering again. Version 1.1.19
2013-06-03 18:32:44 +02:00
Wouter Commandeur
2dadf7b06a
fix transparentCorners beheaviour. When transparentCorners is specified we nolonger clearRect. See issue #405 .
2013-06-03 10:51:20 +02:00
kangax
044f5ed483
Fix rect positioning when loading from JSON. Closes #522
2013-06-03 02:24:41 +02:00
kangax
5a28acb032
Fix toJSON/toSVG serialization when there's active group on canvas. Closes #645
2013-06-03 01:55:51 +02:00
kangax
2407dbba49
Implement clipTo serialization, deserialization, and initialization. Closes #583 . Closes #677 . Closes #676
2013-06-02 23:04:54 +02:00
kangax
221146997c
Fix pattern initialization from function string. Closes #442 . Version 1.1.18
2013-06-02 22:07:16 +02:00
kangax
e65a7bfee8
Fix text rendering on Node when originY !== top
2013-06-02 21:17:26 +02:00
kangax
1c1b7e4b95
Fix function body matching regex. Add fabric.util.getFunctionBody
2013-06-01 18:08:36 +02:00
kangax
46183d8a85
Fix function body regex to match in IE. Closes #658
2013-06-01 17:48:46 +02:00
kangax
9b09a957f4
Better docs
2013-06-01 16:27:10 +02:00
kangax
6e41088614
Fix getElementOffset in IE<9
2013-06-01 13:14:52 +02:00
Kienz
cd49e7d90e
Update README
...
Move getKlass into seperate function (fabric.util.getKlass)
2013-05-31 20:52:04 +02:00
Stefan Kienzle
2698597c74
Fix vertical gradients (x1 = x2 = 0)
...
I think `ctx.canvas.width` is not needed.
If gradient coords are e.g. `{x1: 0, y1: -50, x2: 0, y2: -50}` the vertical gradient doesn't work.
Fixes issue #660
2013-05-31 13:30:44 +02:00
kangax
2223b1b61f
Remove more functions in distribution when SVG import (parser) is not included. Always include stateful mixin. Closes #662
2013-05-30 21:55:26 +02:00
kangax
b53209437f
Move shape classes (circle, line, rect, path, etc.) to /shapes dir
2013-05-30 21:53:49 +02:00
Kienz
86211daa9a
Fix indentation (2 whitespaces)
...
Add opaque to fabric.Image.filters.Convolute.toJSON
Update docs
2013-05-28 21:44:10 +02:00
Wouter Commandeur
d06b6e130e
Split image filters into separate files
2013-05-26 15:42:29 +02:00
Kienz
7bb8cc63c6
Fix fabric.util.getElementOffset for Firefox
2013-05-26 01:19:54 +02:00
Juriy Zaytsev
13326cde52
Merge pull request #646 from Kienz/parseSVGOpacity
...
Parse SVG stroke-opacity and fill-opacity. Add hsl/hsla support.
2013-05-25 15:08:17 -07:00
kangax
0a44d30347
Fix fabric.Line to render properly when x2/y2 is smaller than x1/y1. Thanks @LimeyTX. Closes #648
2013-05-26 00:06:06 +02:00
Kienz
2c29c0cfab
Fix typo, add hsl/hsla (with whitespaces) unit tests and move stuff outside of functions
2013-05-25 19:42:31 +02:00
Kienz
46256f2eeb
Reverse checks currentStyle & getComputedStyle => first check getComputedStyle and then currentStyle
2013-05-25 18:38:38 +02:00
Kienz
a6eab8d4e2
Fix wrong canvas offset
...
- Copy inline style attributes from lowerCanvasEl to upperCanvasEl
- Copy classes from lowerCanvasEl to upperCanvasEl
- Add borderTopWidth, borderLeftWidth, paddingTopWidth and paddingLeftWidth (offsetAttributes) to canvas offset (fabric.util.getElementOffset) - these properties are not considered from getBoundingClientRect()
- JSfiddle's for tests - new: http://jsfiddle.net/Kienz/KRcsY/ , old: http://jsfiddle.net/Kienz/xrMDr/
2013-05-25 17:32:42 +02:00
Kienz
1ba6d1345e
Merge remote-tracking branch 'origins/master' into parseSVGOpacity
2013-05-25 11:32:59 +02:00
Kienz
c96bc217c2
Add link to github page from that the hsl code is adapted
2013-05-25 11:23:30 +02:00
Kienz
66fc8f4d4b
Parse SVG stroke-opacity and fill-opacity
...
- SVG attribute opacity is now used for object's opacity
- fill-opacity and stroke-opacity are added to stroke and fill color value
- Add hsl/hsla support (e.g. hsl(270, 80%, 10%), hsla(320, 10%, 66%, 0.5))
- Add support for rgb/rgba values with whitespaces around values (e.g. rgba( 255 , 100 , 50 , 0.1 )) and percentage values (e.g. rgb(100%, 67%, 15%, 0.8))
- Delete stroke and strokeWidth from fabric.Text (defined in fabric.Object)
- New unit test for parse stroke-opacity and fill-opacity
- Update unit tests (new tests for hsl/hsla and rgb/rgba (whitespaces and percentage values))
- Change equal and deepEqual parameter order (e.g. equal(actualValue, expectedValue, message))
- Doc additions
2013-05-25 11:03:09 +02:00
Kienz
c03c556177
Fix wrong positioned bounding box of fabric.Polygon and fabric.Polyline objects
...
- Substract minX and minY from points.x/points.y (_calcDimensions)
- Same in fromElement - but only if minX or minY is negative
2013-05-23 20:02:44 +02:00
kangax
5e10c0011b
Fix regression in adjustPosition. Version 1.1.16
2013-05-23 03:52:56 +02:00
kangax
8a52f99292
Fix line rendering when points make height become negative. Closes #589
2013-05-21 18:38:32 +02:00
kangax
f3f1db63b3
Fix fabric.Line rendering
2013-05-21 17:47:44 +02:00
kangax
257d629575
Remove space at the bottom of containing box on text objects (with high line height). Fix underline/strike-through to work with line height correctly. Closes #608
2013-05-21 13:16:26 +02:00
Kienz
f0ca6b7b8f
Remove fabric.Group.containsPoint => uses now fabric.Object.containsPoint
...
Update group unit test - containsPoint checks now scaled group and group with padding
Fix text unit test (complexity, toString)
2013-05-20 18:41:16 +02:00
Kienz
727c075235
Add method complexity() to fabric.Text (returns 1)
2013-05-20 10:17:39 +02:00
kangax
d2bcfc922d
Build distribution
2013-05-19 16:26:23 +02:00
Juriy Zaytsev
21bfba0d42
Merge pull request #622 from nathan-muir/master
...
Fix issue with `getElementOffset` when using canvas in fullscreen mode
2013-05-19 04:10:43 -07:00
kangax
1ed4e40bdf
Move brushes to /brushes and mixins to /mixins. Organize ATTRIBUTE_NAMES to use fabric.SHARED_ATTRIBUTES.
2013-05-18 16:43:49 +02:00
Kienz
d80fec5df1
Better strokeDashArray support + Fixes
...
- fabric.Text has now strokeDashArray support (only native support)
- fabric.Text.fill = null should now work
- Fix save/restore context in render methods => setLineDash affected drawBorder/drawControls
- Add strokeLineCap (default "butt"), strokeLineJoin (default "miter") and strokeMiterLimit (default 10)
- Add support for fabric.Object#fromElement for strokeDashArray (and other stroke properties)
- Add @default tag to properties (JSDoc 3)
- strokeDashArray now only works if stroke property is defined
- Add trokeLineCap (default "round"), strokeLineJoin (default "round") to fabric.BaseBrush
- Updated unit tests
2013-05-18 13:01:34 +02:00
Nathan Muir
fd22edb289
Merge pull request #1 from kangax/master
...
Merged master branch
2013-05-15 20:52:10 -07:00
kangax
f1c8670102
Remove unnecessary script attributes
2013-05-14 12:34:59 -04:00
kangax
6f306a6436
Add no-es5-compat option during build. Add option to include/exclude stateful module during build.
2013-05-14 12:34:45 -04:00
kangax
b2bcb3aff5
Fix adjustPosition and _getLeftTopCoords
2013-05-14 11:25:52 -04:00
kangax
0be6a5d556
Fix node text rendering. Version 1.1.14
2013-05-12 20:30:24 -04:00
kangax
c65b1f5e7d
Add support for parsing shorthand font declaration in styles, such as "font: italic 12px Arial,Helvetica,sans-serif"
2013-05-12 13:01:23 -04:00
Juriy Zaytsev
0229df4a78
Merge pull request #627 from aleph1/master
...
Optimize Grayscale Filter performance and footprint
2013-05-11 10:53:11 -07:00
Daniel Barber
17c83dcd67
Optimized Grayscale Filter performance and footprint.
...
Changed from "for" to "while" loop and reduced number of variables.
It is possible to get even better performance by assigning the average
amount in a single line, or by dropping the average variable and doing
a direct assignment (See:
http://jsperf.com/fabric-js-grayscale-benchmark/5 ), however I wasn't
sure if this is against the project's coding guidelines.
2013-05-11 12:29:29 -04:00
Kienz
efc4d8f486
Don't fire object:modified on group selection (with shiftKey)
...
Fixing tags for jsdoc
2013-05-11 11:27:31 +02:00
Nathan Muir
8e8597cb7b
Updated fabric.util.getElementOffset(). Returns correct offset when using requestFullscreen(parentElement)
2013-05-10 14:14:38 +10:00
kangax
2b6b64dd02
Add support for removing SVG export functionality during build (via no-svg-export flag)
2013-05-09 14:21:10 -04:00
Kienz
6e612facc6
Fix isContainedWithinRect and isContainedWithinObject, Add fabric.Object.containsPoint
2013-05-09 19:41:04 +02:00
kangax
70cf7a6963
Tweak docs
2013-05-09 12:14:30 -04:00
Kienz
d2d1c50872
Check infinity in setCoords() if object has zero width
2013-05-09 12:14:00 +02:00
Juriy Zaytsev
9843d6642b
Merge pull request #611 from xxorax/nodeOnloadFilter
...
Fix callback called 2 times on Node
2013-05-08 21:05:35 -07:00
kangax
5f8ca2cbc9
Make background white when generating data url jpeg image. Closes #613
2013-05-07 11:37:00 -04:00
xxorax
dcfeb9c8ff
Fix callback called 2 times, recent versions of Node call onload on the
...
elements
2013-05-06 18:35:42 +02:00
kangax
a47128afa4
Add support for same options in fabric.Object#toDataURL as there are in fabric.Canvas#toDataURL. Closes #609
2013-05-06 11:52:16 -04:00
Stefan Kienzle
662b322cd1
Call setCoords() only on target object
...
Only update target's cornerCoords.
2013-05-06 18:11:42 +03:00
kangax
d6e292e482
Fix text rendering. Closes #590 . Version 1.1.12
2013-05-05 13:23:49 -04:00
kangax
fde521317e
Store result of setLineDash support check. Build distribution. Version 1.1.11
2013-05-04 20:29:59 -04:00
Kienz
e4287accb6
Fix typo
2013-05-04 18:32:22 +02:00
Kienz
8645378288
Implement dashed stroke + some fixes with stroke, fill, removeShadow and clipTo + fixes in brushes
...
- fabric.Rect (now uses fabric.util.drawDashedLine), fabric.Line, fabric.Triangle, fabric.Polygon, fabric.Polyline, fabric.Image now supports dashed stroke
- fabric.Circle and fabric.Ellipse actual only supports native dashed stroke (browser must support context.setLineDash)
- fabric.Image.toSVG() has stroke/dashed-stroke support
- fabric.Object#clipTo has now affect on fabric.Image's stroke
- fabric.Shadow#affectStroke is considered - _removeShadow is now called in _renderFill (check whether stroke is to be affected) and _renderStroke
- reset shadow styles (contextTop) in fabric.PencilBrush, fabric.CircleBrush and fabric.Spraybrush (fabric.BaseBrush.removeShadowStyles)
2013-05-04 18:25:57 +02:00
tka
85f18e36f5
when use nodejs load remote image with fullpath
...
sometime use server generate image, and passing parameter in url
so when send request should use full path, not only pathname
2013-05-03 15:24:18 +08:00
kangax
35d5cf220f
[BACK_INCOMPAT] Make fabric.Object#toDataURL synchronous. Fix fabric.Object#cloneAsImage to preserve angle. Closes #596
2013-05-01 14:49:42 -04:00
kangax
f5b88b4045
Make fabric.Canvas#isTargetTransparent public. Closes #595
2013-05-01 09:58:39 -04:00
kangax
e8825bc581
Doc fixes
2013-05-01 09:35:26 -04:00
kangax
775df6e836
Move state-related methods to stateful mixin
2013-05-01 09:29:57 -04:00
kangax
17974a55be
Reuse mt coordinate values in mtr coordinates. Closes #592
2013-05-01 03:06:04 -04:00
kangax
eeecde62a8
Normalize style values. Closes #598
2013-05-01 02:58:59 -04:00
Stefan Kienzle
6caf60670b
Fixed _renderFill - fallback for offsetX/offsetY
...
If object.fill.offsetX or object.fill.offsetY is undefined (e.g. fill = fabric.Gradient) browser might have problems (seen in firefox 3.6.28).
2013-04-30 16:27:01 +03:00
kangax
a6a5cb4a54
Load image via fabric.util.loadImage in cloneAsImage. Add fabric.util.createImage helper. Closes #593
2013-04-29 15:16:59 -04:00
kangax
f6da728aad
Add support for parsing "compressed" path data in SVG path's. Version 1.1.10
2013-04-29 11:12:20 -04:00
kangax
d755d64c76
Remove unnecessary renderAll calls. Thanks @Kienz. Closes #587
2013-04-26 21:49:13 -04:00
Stefan Kienzle
acfddabe16
Fire 'object:selected' only once
...
The event 'object:selected' should only be called on first activation.
Fixes #584
2013-04-26 11:55:13 +03:00
kangax
4e1a26cc11
Update docs
2013-04-25 14:21:32 -04:00
kangax
56e6107752
Doc fixes
2013-04-25 13:52:05 -04:00
kangax
c16dcf88a4
Change inline docs to conform to jsdoc3
2013-04-24 12:58:04 -04:00
kangax
40d5a52492
More robust rendering of text on Node.js; left-aligned text is now aligned consistently.
2013-04-24 12:50:38 -04:00
kangax
66c3c80d18
Fix doc
2013-04-22 09:26:57 -04:00
kangax
22de40dc54
Add support for pattern offsets (via fabric.Pattern#offsetX/offsetY). Version 1.1.8
2013-04-22 09:16:58 -04:00
kangax
dce3f6f6ca
Optimize _initDimensions to not create off-screen canvas every time. Closes #564
2013-04-20 12:04:45 -04:00
Juriy Zaytsev
9a34bbfba2
Merge pull request #568 from Kienz/patch-1
...
Return unselectable objects in canvas 'mouse:down' event
2013-04-20 08:58:41 -07:00
Kienz
d03da23d0a
- lockUniScaling now can't be overridden with shiftKey or uniScaleTransform property
...
- Pass event to object 'rotating'
- some refactoring
2013-04-20 15:01:09 +02:00
Stefan Kienzle
571887036f
Bugfix object.opacity == 0 in svg output
...
If object.opacity = 0 the svg output sets opacity to 1.
2013-04-19 14:35:52 +03:00
kangax
e56d37d9da
Fix text and line rendering in path group. Add support for multiple declarations in "transform" attribute. Fix stroke color of line. Version 1.1.7
2013-04-18 21:42:46 -04:00
Juriy Zaytsev
359df373c0
Merge pull request #569 from xxorax/master
...
Build canvas from json even if no object is sent
2013-04-18 15:13:55 -07:00
Martin Panel
4071fd7040
Fix backgroundImageLoaded not checked
2013-04-19 00:01:53 +02:00
Stefan Kienzle
53c8b074c2
findTarget now retuns unselectable objects
2013-04-18 17:51:53 +03:00
Stefan Kienzle
854d0db56c
Clear selection for unselectable object
...
Now objects are found even they are unselectable - expand _shouldClearSelection for unselectable objects.
Don't call findTarget() - new in parameter target.
2013-04-18 17:50:02 +03:00
Stefan Kienzle
99f31b5753
Return target on mouse:down (even for unselectable objects)
...
canvas 'mouse:down' event only returns selectable objects.
2013-04-18 17:42:47 +03:00
Tim Andres
3950298c75
Changed nestTransformMatrices to mutilplyTransformMatrices
2013-04-17 13:54:11 -04:00
Tim Andres
bd058e6a94
Fetched and merged upstream changes
2013-04-17 13:53:43 -04:00
Martin Panel
13acd4ee76
Build canvas from json even if no object is sent.
2013-04-17 02:11:56 +02:00
kangax
8879c73af7
Document lock* properties. Build distribution
2013-04-16 12:44:54 -04:00
Tim Andres
63809278d2
Documented new matrix multiplication utility
2013-04-16 02:26:22 -04:00
Tim Andres
e2bba99e98
Fixed path translation bug with SVG parsing
2013-04-16 01:49:42 -04:00
Stefan Kienzle
e73fe4625e
Return object reference in drawControls and drawBorders
...
Closes #556
2013-04-12 00:47:07 +03:00
kangax
e8c9c7b0f1
Fix group selection when animation is in progress. Thanks @Kienz
2013-04-10 16:46:16 +02:00
kangax
7f190662d1
Do not parse fill value if it's not a string (but, for example, a gradient or pattern)
2013-04-08 13:41:46 +02:00
Stefan Kienzle
185686738e
fabric.Rect.fromElement() are wrong positioned
...
If the left/top properties are 0 they are ignored - they are not normalized.
http://jsfiddle.net/Kienz/3SmUC
2013-04-08 09:25:33 +03:00
kangax
a0bc7b6904
Fix doc typo
2013-04-06 12:46:01 +02:00
kangax
fcc0c5cbbb
Only call change and complete callbacks once, when animating multiple properties. Closes #544
2013-04-06 12:44:10 +02:00
Stefan Kienzle
9c76ba0f92
Add svg element to async objects (reviver)
...
If async objects parsed (image), the reviver svg element is undefined.
You can see it here:
http://jsfiddle.net/Kienz/nhYww/
2013-04-05 19:06:02 +03:00
kangax
c22d9f0c18
req_handler -> reqHandler
2013-04-04 14:05:24 +02:00
kangax
97222fbaa1
Remove pathOffset from object/json output for now
2013-04-04 14:03:22 +02:00
kangax
4e74f4d7ab
Preserve group reference on objects in group after adding/removing some object from group. Closes #533
2013-04-04 13:58:08 +02:00
kangax
c294ae2b3a
[BACK_INCOMPAT] fabric.Text#strokeStyle -> stroke, for consistency with other objects. Closes #535
2013-04-04 13:58:08 +02:00
kangax
4be589019c
Fix positioning of line and image instances when part of a group
2013-04-04 13:58:08 +02:00
kangax
6e725ae18b
Support stroke on image instances. Closes #536
2013-04-04 13:58:08 +02:00
kangax
4d037e979a
Document strokeDashArray on fabric.Rect
2013-04-04 13:58:08 +02:00
Juriy Zaytsev
9e10349558
Merge pull request #531 from shiloa/master
...
Fix crash (segfault) on node.js if canvas loads images with secure url (https://...)
2013-04-04 04:55:14 -07:00
Juriy Zaytsev
2c7205fec1
Merge pull request #537 from Kienz/shadowBrush
...
Fix reset shadow of fabric brushes
2013-04-04 03:39:19 -07:00
Taher Haveliwala
bafc75b35c
The jsdoc params for fabric.Image.clone() were out of order, making
...
the jsdoc API reference for this method at
http://fabricjs.com/docs/symbols/fabric.Image.html
display an incorrect method summary (with the order of propertiesToInclude
and callback swapped).
2013-04-03 20:14:14 -07:00
Kienz
4e61f7eb2e
Fix reset shadow of fabric brushes
2013-04-03 21:09:31 +02:00
Kienz
f5eb524ddd
Don't set activeObject if clicked on activeGroup
...
canvas._activeGroup should be null if clicked on activeGroup.
Only set activeObject if target !== activeGroup.
2013-04-03 16:17:46 +03:00
Kienz
0fdb97f289
Activate clicked object if group selection is cleared
...
If group selection is cleared and pointer clicked other object
=> activate this object.
See issue #506
2013-04-03 16:07:27 +03:00
shilo
2c2206b951
rendering canvas on node.js - fixed issue with segfault occuring when downloading an image that comes from https (secure) url
2013-04-03 13:40:48 +03:00
Kienz
142a7a9779
Fire event 'removed' on object level
...
There is ```obj.fire('added')``` but not ```obj.fire('removed')```.
2013-04-02 16:05:51 +03:00
kangax
4c5df5ea0c
Specify that loadSVGFromURL uses XHR and conforms to SOP
2013-04-02 13:47:47 +02:00
kangax
c66707b3e5
Cleanup events and gestures modules
2013-03-30 01:36:27 +01:00
kangax
26c2590066
Group fixes. Closes #504 . Closes #505
2013-03-30 01:36:15 +01:00
kangax
b0a6d8cd7d
Fix pixelate filter. Thanks @Oleg. Closes #523
2013-03-30 01:30:46 +01:00
kangax
d24d6307e5
[BACK_INCOMPAT] fabric.Object.setActive(…) -> fabric.Object.set('active', …). fabric.Object.isActive is gone (use active instead)
2013-03-29 16:26:27 +01:00
kangax
75873ebf95
Only transform rect when part of path group not group. Closes #495
2013-03-29 13:20:35 +01:00
kangax
27c6f2529c
Mention that set doesn't update border/control and that setCoords should be called for that. Closes #518 .
2013-03-29 12:44:05 +01:00
Kienz
0b078cd4be
Include pathOffset in fabric.Path.toObject()
...
Include pathOffset in toObject() of fabric.Path and use it (if defined) in _initializePath().
This should fix issue #500 .
2013-03-28 16:07:00 +01:00
Kienz
dfec3dd2f0
fabric.StaticCanvas.clear() delete _activeObject
...
If canvas is cleared ```canvas._activeObject``` should be removed.
2013-03-28 09:06:36 +01:00
kangax
40bda07140
Fix fabric.Canvas#clipTo. Thanks @sn3p
2013-03-24 18:09:55 +01:00
kangax
81e8f9c2e2
Fix node-based url request
2013-03-24 00:05:13 +01:00
kangax
40490dc7f3
Add support for loading local files in fabric.loadSVGFromURL
2013-03-24 00:04:50 +01:00
kangax
4911cc036b
Make fabric.Image.fromURL use fabric.util.loadImage which fixes it under Node
2013-03-23 23:16:16 +01:00
Juriy Zaytsev
81993d21fb
Merge pull request #494 from Kienz/moveTo
...
Implement fabric.StaticCanvas#moveTo(object, index)
2013-03-23 14:55:14 -07:00
Juriy Zaytsev
e8de627f98
Merge pull request #493 from Kienz/viewBoxSVG
...
Add option to define viewBox in fabric.Canvas#toSVG
2013-03-22 11:18:01 -07:00
Kienz
3a0a2c7fd2
Implement fabric.StaticCanvas#moveTo to move object to specified level in stack of drawn objects
...
You can also move fabric.Group objects in the grub objects stack to a specified level.
Add unit tests for moveTo.
2013-03-22 15:10:44 +01:00
Kienz
9e79c487be
Add viewBox attribute to toSVG(options) to define the viewBox of sag output.
2013-03-22 12:57:33 +01:00
Kienz
4b1939e5d3
Add check if object is visible to fabric.Image and fabric.Path. Now all fabric instances with own render method should check for visible property.
...
Some doc updates - add noTransform to doc and set it optional
2013-03-22 12:10:34 +01:00
Juriy Zaytsev
97fdc215a8
Merge pull request #488 from Kienz/patch-2
...
Bugfixes for fabric.Object#visible
2013-03-20 16:13:41 -07:00
kangax
24735e6e31
Fix removal of event listeners in fabric.Canvas#dispose on touch-based devices. Version 1.1.3
2013-03-20 23:38:22 +01:00
Kienz
6379278384
fabric.Text#visible not working
...
Bugfix for text objects - only render visible objects
2013-03-20 19:20:05 +01:00
Kienz
292178474d
fabric.Object#visible bugfixes and improvements
...
Bugfixes if perPixelTargetFind = false => object are found if they are invisible with mouse hover.
Only consider visible objects in findTarget (improvement).
2013-03-20 19:17:39 +01:00
kangax
919f95a0a0
Move collection-related methods to fabric.Collection, shared by fabric.Canvas and fabric.Group.
2013-03-20 10:28:35 +01:00
kangax
8bea909a54
Merge master
2013-03-19 15:52:14 +01:00
kangax
2a5645fcd5
Fix scaling event not firing sometimes. Thanks @rcyrus.
2013-03-19 15:36:25 +01:00
kangax
7f19110967
Update docs on left/top being relative to object center
2013-03-19 13:20:21 +01:00
Kienz
4800b0729b
fabric.Group#visible = false did not work
...
The fabric.Object#visible attribute has no affect to fabric.Goup and its objects.
2013-03-18 14:32:05 +01:00
kangax
e8e32e80de
Fix gradient colorStops initialization. Thanks @Kienz
2013-03-18 13:11:31 +01:00
kangax
9bb38c144c
Fix toDataURL not honoring format. Thanks ebirbal.
2013-03-18 13:03:54 +01:00
kangax
7123ea357f
Fix JSHint warnings
2013-03-16 16:41:36 +01:00
kangax
2622a380bf
[BACK_INCOMPAT] fabric.Group#objects -> fabric.Group._objects (making it consistent with canvas._objects). Objects in group always have group reference to a group they're in. bringToFront, sendToBack, etc. now work in relation to group when called on objects within group.
2013-03-16 16:41:19 +01:00
kangax
85fd7ee852
Add support for clipping objects. Closes #64
2013-03-10 21:06:17 +01:00
kangax
012c333bbb
Fix gradient initialization
2013-03-10 21:05:24 +01:00
kangax
e886fee63d
Add docs for ellipse rx/ry
2013-03-10 21:04:44 +01:00
Juriy Zaytsev
c366e1d184
Merge pull request #470 from Kienz/visiblePropFix
...
Bugfix fabric.PathGroup if object is not visible
2013-03-09 15:04:58 -08:00
Kienz
5fec23e7c1
JSHint - remove extra comma at the end of the fabric.Color.colorNameMap object
2013-03-09 22:38:42 +01:00
Kienz
df46e3af26
Bugfix fabric.PathGroup if object is not visible
...
- if object is not visible and of type 'path-group' the object was still drawn
2013-03-09 22:15:31 +01:00
Kienz
e35e1a0191
[BACK_INCOMPAT] Implement fabric.Gradient#toSVG() and radialGradient
...
- Implement radial gradient and expand linear gradient (stop-opacity should now take into account)
- Gradients should now be included in the SVG output for the following fabric objects: circle, ellipse, line, path, polygon, polyline, rect and triangle (text is not yet implemented)
- Gradients (linear / radial) can be applied to stroke or fill property => change setGradientFill(options) to setGradient(type, options)
- Change toObject() that linear and radial gradients can be serialized
- Expand fabric.Color by 16 basic colors fabric.Color.colorNameMap => gradients with e.g. stop-color="blue" and stop-opacity="0.5 can be converted to RGBA color
- RGBA colors in svg has no affect (convert to RGB color), only stop-opacity has affect to color opacity
- Attached some test svg files http://kienzle.geschaeft.s3.amazonaws.com/projects/fabricjs/gradients/gradients.rarUpdate setGradient and addColorStop interface
Update setGradient and addColorStop interface
- setGradient('fill', {x1: 50, y2: 10, colorStops: {'0.7', 'rgba(0,153,153,0.5)'}});
- addColorStop({'0.4', 'blue'});
2013-03-09 21:00:54 +01:00
kangax
ece75b6065
Remove unused maxY variable
2013-03-09 15:28:30 +01:00
Juriy Zaytsev
79575b9dc7
Merge pull request #467 from xxorax/master
...
Fix backgroundColor render on nodejs
2013-03-08 15:59:02 -08:00
root
b6a178d8a1
Fix backgroundColor render on nodejs
2013-03-09 00:34:54 +01:00
root
246c45d57c
Merge branch 'master' of github.com:xxorax/fabric.js
...
Conflicts:
src/node.js
2013-03-09 00:32:11 +01:00
Atis
70d3c702b1
fix infinity check so that Closure Compiler does not choke on it
2013-03-08 19:41:33 +02:00
Martin Panel
dfb1e2a230
Fix backgroundColor render on nodejs
2013-03-07 22:14:30 +01:00
Martin Panel
f84a8628c3
Fix backgroundColor render on nodejs
2013-03-07 22:11:30 +01:00
kangax
e917b144aa
Remove unnecessary space in SVG output
2013-03-06 18:55:26 +01:00
kangax
506125bbe6
[BACK_INCOMPAT] fabric.Canvas.toDataURL now accepts options object instead linear arguments. fabric.Canvas.toDataURLWithMultiplier is deprecated; use toDataURL({ multiplier: … }) instead.
2013-03-06 18:47:50 +01:00
kangax
43dd170f5b
Add fabric.Object#visible property. Closes #342 . Version 1.0.13.
2013-03-06 18:45:18 +01:00
kangax
9f934d4dad
Minor style change
2013-03-05 19:33:16 +01:00
kangax
39fc445c07
Add fontStyle to delegated properties
2013-03-05 19:33:16 +01:00
llocust
ff8b09fb35
Update dom_event.js
...
Sorry.. Copy+Past from .min version...
e->event
2013-03-05 04:54:41 +04:00
llocust
5662472f81
Update dom_event.js
...
On a mobile (touchbased) platform at an event 'touchend' data are stored in the changedTouches array.
2013-03-05 04:14:43 +04:00
kangax
b260845af9
Fix hasControls value being lost after object is part of a group. Closes #445 .
2013-03-02 01:39:32 +01:00
kangax
af5a0ac74f
Make group getter respect delegated properties
2013-03-02 01:25:34 +01:00
kangax
638876f3f8
Add support for passing additional state properties into saveState
2013-03-02 01:25:08 +01:00
kangax
293227811f
Doc additions
2013-02-27 00:48:27 +01:00
Kienz
ae67d83216
Update setGradient and addColorStop interface
...
- setGradient('fill', {x1: 50, y2: 10, colorStops: {'0.7', 'rgba(0,153,153,0.5)'}});
- addColorStop({'0.4', 'blue'});
2013-02-25 18:26:20 +01:00
kangax
17a88e93e1
Doc fixes
2013-02-24 12:40:16 +01:00
Kienz
4c4f845bfe
[BACK_INCOMPAT] Implement fabric.Gradient#toSVG() and radialGradient
...
- Implement radial gradient and expand linear gradient (stop-opacity should now take into account)
- Gradients should now be included in the SVG output for the following fabric objects: circle, ellipse, line, path, polygon, polyline, rect and triangle (text is not yet implemented)
- Gradients (linear / radial) can be applied to stroke or fill property => change setGradientFill(options) to setGradient(type, options)
- Change toObject() that linear and radial gradients can be serialized
- Expand fabric.Color by 16 basic colors fabric.Color.colorNameMap => gradients with e.g. stop-color="blue" and stop-opacity="0.5 can be converted to RGBA color
- RGBA colors in svg has no affect (convert to RGB color), only stop-opacity has affect to color opacity
- Attached some test svg files http://kienzle.geschaeft.s3.amazonaws.com/projects/fabricjs/gradients/gradients.rar
2013-02-23 17:02:52 +01:00
kangax
7d9c91de70
res -> response and remove unnecessary semicolon
2013-02-22 17:24:22 +01:00
Juriy Zaytsev
4651d6ecd9
Merge pull request #413 from uruz/feature/fix-failing-test
...
Fix failing test: fabric.util.loadImage
2013-02-22 08:22:09 -08:00
kangax
be4db2f409
Fix doc. Thanks @rodrigopandini
2013-02-20 23:42:38 +01:00
Juriy Zaytsev
a0c31a2628
Merge pull request #437 from Kienz/svgOutputValidation
...
Ensure valid SVG output (http://validator.w3.org/ )
2013-02-20 04:28:32 -08:00
kangax
9be89b2f2f
drawCorners -> drawControls, for consistency. Remove unused hasCorners and use hasControls instead of hideCorners. Version 1.0.12
2013-02-20 13:19:22 +01:00
Kienz
686b926955
Valid svg output ( http://validator.w3.org/ ):
...
- delete width/height attributes from g (http://www.w3.org/TR/SVG/struct.html#GElement ) and path element (http://www.w3.org/TR/SVG/paths.html#PathElement )
- update DOCTYPE for svg version 1.1
2013-02-19 19:48:07 +01:00
kangax
80469a23eb
Fix createCanvasElement canvas initialization. IE<9 now works again.
2013-02-19 13:34:50 +01:00
Kienz
ec28167906
Fix for issue #433 - wrong width/height of image objects
...
If svg with image objects was parsed the width/height props
of the image were overridden by width/height of the svg file.
2013-02-19 09:19:46 +01:00
kangax
9df85553b9
[BACK_INCOMPAT] Add fabric.util.createAccessors. Add accessors for fabric.Text -specific properties (setTextDecoration, setFontWeight, setFontStyle, etc.). Make text object dimensions change when setting dimension-affecting properties. fabric.Text#setFontsize becomes setFontSize. Version 1.0.11.
2013-02-18 16:22:48 +01:00
kangax
5a91472bdc
Remove trailing comma
2013-02-17 13:26:45 +01:00
Kienz
b172a47ebe
Fixed svg output for backgroundColorPattern with repeat: 'no-repeat'
2013-02-16 18:55:00 +01:00
kangax
a77cbfe2be
Text fixes for node-canvas. Version 1.0.9
2013-02-15 14:11:58 +01:00
Kienz
d9f88d061d
fabric.Group objects toSVG() order changed
...
Changed the sort order in toSVG() from "first..last" to "last..first".
If they rendern on canvas the same order is used https://github.com/kangax/fabric.js/blob/master/src/group.class.js#L243
2013-02-15 13:17:12 +01:00
Kienz
5e81f7ab09
Add backgroundColor to svg output
...
Add backgroundColorPattern to svg output
Bugfix backgroundImage in sag output - width/height are depend on backgroundImageStretch
Bugfix in setBackgroundColor - rename pattern to repeat
2013-02-14 22:06:01 +01:00
Kienz
2cd3525147
Bugfix for wrong offset if object is cloned. Same bug as issue #416
2013-02-13 19:22:19 +01:00
kangax
160e7e5ded
Alias fabric.Observable.fire to trigger, similar to jQuery, Backbone, etc. Closes #401
2013-02-11 13:22:30 +01:00
kangax
97fa81aa77
Fix polygon boundaries. Closes #416
2013-02-11 13:21:33 +01:00
kangax
d9291fbfe5
Add shadow support to brushes
2013-02-06 23:55:15 +01:00
kangax
b55c35f865
Merge master
2013-02-06 23:28:17 +01:00
kangax
a0dcad78a1
Specify that fontSize is in pixels
2013-02-06 22:36:39 +01:00
kangax
776d966bdb
Remove polygon offsetting fix which broke some SVG shapes
2013-02-06 21:04:14 +01:00
kangax
4995fd9ed1
Fix free drawing path initialization
2013-02-06 20:41:58 +01:00
kangax
a4340fda45
Doc fixes
2013-02-06 16:20:53 +01:00
kangax
c49cbd33bc
Fix bug in loadFromJSON
2013-02-06 16:20:53 +01:00
kangax
e4719d4300
Add support for animating 2nd level object properties
2013-02-06 16:20:53 +01:00
Arthaey
48ab4607b9
Add option to suppress XML preamble in toSVG method.
2013-02-05 22:20:56 -08:00
Alexey Boriskin
137aa0eaa5
Fixed failing test: fabric.util.loadImage
2013-02-05 20:51:01 +04:00
kangax
5ee9b13a92
Add support for shadows (via fabric.Shadow)
2013-02-04 20:49:05 +01:00
kangax
8b04e286a8
Log full errors instead of just its messages
2013-02-04 20:49:05 +01:00
kangax
d645c4e7dc
Add ability to specify pattern repeat via options
2013-02-04 20:49:05 +01:00
Kienz
cfb97f3f83
Fix backgroundColor (backgroundPattern) in loadFromJSON / loadFromDatalessJSON
2013-02-04 15:40:18 +01:00
kangax
7fd1a09174
Fix typo in serialization module
2013-02-03 02:17:46 +01:00
kangax
5f8bff50a7
Some free drawing refactoring
2013-02-03 02:15:29 +01:00
kangax
6777c50012
Add support for patterns
2013-02-03 02:15:29 +01:00
kangax
cb0815022d
Change pattern brush to work with fabric.Pattern
2013-02-03 02:14:47 +01:00
Kienz
ddaf8ba796
Fix touch events if canvas is inside a scrolled container (see issue #123 ).
...
Fix bug if mouse moves over absolute scrolled element while object scaling (see issue #385 ). Also if mouse is moved over documentElement (fabric.document) while scaling object is fixed (same issue like #385 ).
Tested with Safari 5.1.7, 6.1, Firefox 18, 3.6.28, Chrome 24/25beta, Opera 12.12 and iPhone iOS 6.1, iPad iOS 6.1 in non-scrolled and scrolled containers.
2013-02-01 18:27:20 +01:00
kangax
69f1b20a8e
Add fabric.Object#getBoundingRect. getBoundingRectWidth/getBoundingRectHeight are deprecated.
2013-01-29 18:06:44 +01:00
kangax
42c857c18c
Pass event to "object:rotating" callback
2013-01-29 18:06:43 +01:00
Kienz
64bdb13836
Clear contextTop before call renderAll() in _finalizeAndAddPath
2013-01-26 15:08:53 +01:00
kangax
87a1bb31bf
Amalgamate canvas creation + VML initialization into one place. Add new method fabric.util.createCanvasElement. Version 1.0.3.
2013-01-25 14:23:13 +01:00
kangax
268dbb2114
Clear top context in toDataURL* methods. Closes #399
2013-01-25 14:20:53 +01:00
Fabian Hickert
18b7e05eb2
Fixed event handling for touch-supported devices.
2013-01-24 11:32:58 +00:00
Juriy Zaytsev
74855f6fd1
Merge pull request #388 from FremyCompany/patch-1
...
Add 'object:removed' and 'canvas:cleared' events
2013-01-23 14:02:44 -08:00
Kienz
33bacb0cd6
Bugfix for canvas.toDataURL() - canvas.clearContext(canvas.contextTop) in after:render clears context if canvas.toDataURL() is called.
...
Observe before:render and clear contextTop.
2013-01-21 22:15:28 +01:00
kangax
6da2ed6d65
More canvas refactoring
2013-01-20 20:40:26 +01:00
kangax
70119f7095
Refactor some logic from canvas and object classes into mixins
2013-01-20 20:40:26 +01:00
kangax
8a74303443
Refactor brushes
2013-01-20 17:28:06 +01:00
FremyCompany
7f2e8030c7
Added: 'canvas:cleared' event
...
When the canvas is cleared, it doesn't fire any 'object:removed' event, on purpose
2013-01-18 17:27:21 +01:00
FremyCompany
fd4a9733d4
Added: 'object:removed' event
...
Inlined removeFromArray call (because it didn't return whether indexOf returned -1 or not so I couldn't know if 'object:removed' had to be fired or not
2013-01-18 16:16:40 +01:00
Cedric Wienold
958f37d8fb
Add createJPEGStream support for fabric canvas
...
Node Canvas already has support for createJPEGStream. Create a route to
take advantage of that through fabric.js canvas.
2013-01-17 12:48:41 -08:00
kangax
b721667b7b
Discard active group when clearing canvas
2013-01-17 19:00:20 +01:00
kangax
7a527437c9
Avoid expensive regex when modifying data url string
2013-01-17 19:00:20 +01:00
kangax
21ee892c28
Merge master
2013-01-15 00:06:54 +01:00
Kienz
2715ef306c
Bugfix for controlsAboveOverlay (issue #380 )
...
Only if pointer is over targetCorner lastRenderedObjectWithControlsAboveOverlay is used as targetObject.
See issue #380 .
2013-01-14 17:09:50 +01:00
kangax
85c9b34d04
Discard active group when clearing canvas
2013-01-14 12:08:54 +01:00
kangax
ddacd57cc8
Avoid expensive regex when modifying data url string
2013-01-14 12:08:39 +01:00
kangax
d6307d1aeb
Add circle brush
2013-01-11 19:38:22 +01:00
kangax
1f206d039e
Move gesture-based logic into a separate module
2013-01-10 18:23:23 +01:00
kangax
84270a47b2
Merge remote-tracking branch 'jaffer/master'
2013-01-10 14:31:59 +01:00
kangax
7be14a6a70
First implementation of brushes
2013-01-10 14:27:13 +01:00
kangax
082bee8279
Add fabric.Canvas.prototype.freeDrawingCursor
2013-01-10 14:22:02 +01:00
kangax
157ff19d47
Fix overlayImage not being applied in loadFromJSON under Node
2013-01-10 14:21:21 +01:00
kangax
4a84bf92a7
Clone options object of animate (to avoid conflicts)
2013-01-10 14:20:52 +01:00
kangax
d47ed61d49
Remove unnecessary e
2013-01-10 14:20:36 +01:00
kangax
3194c1903a
Do not show corners in groups
2013-01-10 14:20:25 +01:00
kangax
dffe675eb2
Fix toDataURL doc
2013-01-10 14:20:13 +01:00
Jaffer Haider
20a87c6609
Support for pinch gesture to scale and rotate objects using Event.js.
2013-01-08 16:04:38 +05:00
kangax
a870e11a57
Fix fabric.util.loadImage in node
2013-01-04 19:15:18 +01:00
Josh Pearce
d56bf59137
Add image load onerror handler
...
Make sure, when loading from json, that
a bad image path doesn't fail the desserialization
Signed-off-by: kangax <kangax@gmail.com>
2013-01-04 19:14:24 +01:00
kangax
dc2e5210ae
Work around VML's clearRect bug
2013-01-03 01:18:29 +01:00
kangax
c4bec70455
Performance optimizations
2013-01-02 23:25:13 +01:00
kangax
fb915851db
Fix lost event in IE7/8. Closes #364 .
2012-12-29 20:00:24 +01:00
kangax
2735d543e2
Merge master. Enable hasRotatingPoint by default (now that objects are not rotated via corners)
2012-12-26 11:18:17 +01:00
kangax
c11abb377f
Fix tests. Build distribution. Version 0.9.35.
2012-12-23 15:28:08 +01:00
kangax
06e6365068
Fix unnecessary JS error when calling require
2012-12-23 15:19:21 +01:00
kangax
a7a6c38384
Fix incorrect parsing of fontSize which made text not appear when loaded from SVG. Closes #331 .
2012-12-23 15:18:46 +01:00
kangax
a37fcc92d4
Fix incorrect rendering of text + path SVG. Closes #355 .
2012-12-23 15:17:45 +01:00
kangax
4ae8b9d725
Simplify object straightening logic. Thanks @woutercommandeur. Closes #362 .
2012-12-22 20:20:54 +01:00
kangax
299273d7bd
[BACK_INCOMPAT] fabric.Object#cornersize -> fabric.Object.cornerSize
2012-12-22 16:37:43 +01:00
kangax
882d7085d8
Fix fabric.Object#cloneAsImage on node. Closes #336 . Version 0.9.34
2012-12-20 19:49:51 +01:00
kangax
f0d2235053
Fix group loading in dateless json. Closes #322
2012-12-20 16:23:31 +01:00
Andrey Kravtsov
216b3234aa
Changed approach for relative animations.
...
Issue #356
2012-12-19 19:36:42 +04:00
kangax
e12b6598cd
Merge master
2012-12-18 18:12:08 +01:00
kangax
8c14478340
Add support for "text-align: justify". SVG representation is not yet working.
2012-12-18 18:01:30 +01:00
kangax
71dd5a9ec0
Pass original event to all fabric custom events (that are triggered via mouse/touch)
2012-12-18 11:52:18 +01:00
kangax
203ea6b51f
Doc fixes
2012-12-18 11:46:51 +01:00
kangax
c8172be31d
Final doc additions. Every public method is now documented!
2012-12-16 20:44:26 +01:00
kangax
b5b901e99e
Fix isMoving not set to false sometimes. Closes #350 . Version 0.9.31.
2012-12-15 17:29:40 +01:00
kangax
7eae38db57
Doc additions.
2012-12-15 17:29:40 +01:00
kangax
6ed3dda6f5
Merge master
2012-12-15 17:16:39 +01:00
kangax
4bcc0bd80f
Add uniScaleTransform and centerTransform parameters to canvas, which control how objects are transformed
2012-12-15 17:13:40 +01:00
kangax
fcfe5052f8
Use toFixed to cutoff some of the values. Closes #352 .
2012-12-15 17:09:37 +01:00
kangax
f6cbb259f3
Doc additions.
2012-12-15 17:05:23 +01:00
Kienz
aefa280bb3
strokeText bugfix for Firefox < 4
2012-12-14 18:31:01 +01:00
Juriy Zaytsev
564e37eb5f
Merge pull request #348 from Kienz/freedrawingFix
...
Fix another freedrawing bug in Firefox 3.6.1 - 3.6.24
2012-12-13 12:44:50 -08:00
Kienz
39c2b48ade
Another freedrawing bug in Firefox 3.6.1 - 3.6.24
...
In Firefox 3.6.28 it works correct.
canvas 2d context arc() requires optional parameter anticlockwise - bugzilla issue https://bugzilla.mozilla.org/show_bug.cgi?id=617319 .
2012-12-13 19:08:34 +01:00
Juriy Zaytsev
b8c573530a
Merge pull request #346 from Kienz/freedrawingFix
...
Freedraw bugfix for Firefox 3.6.x
2012-12-13 06:47:54 -08:00
kangax
eb35434a97
Fix x/y not being set on rectangle sometimes. Closes #344 .
2012-12-13 15:46:06 +01:00
kangax
3416d8a090
Documentation additions.
2012-12-13 15:46:06 +01:00
Kienz
d8831feb0e
Freedraw bugfix for Firefox 3.6.x
...
The pointer flies away on starting freedrawing - line is drawing.
Here you can see a screenshot:
<img src="https://s3-eu-west-1.amazonaws.com/kienzle.geschaeft/projects/sketch/fabric_freedraw_problem_firefox_3.6.x.png "/>
jsFiddle:
http://jsfiddle.net/r2ZE7/95/
2012-12-13 11:57:16 +01:00
Kienz
3fa2a01faa
Fix freedrawing for Firefox:
...
TypeError: Not enough arguments to CanvasRenderingContext2D.arc.
[Bei diesem Fehler anhalten]
this.canvas.contextTop.arc(originLeft, originTop, 3);
2012-12-10 15:59:26 +01:00
Juriy Zaytsev
fab0de8b5b
Merge pull request #340 from shiloa/master
...
Change toSVG in image.class.js to properly close <image> tag.
2012-12-10 06:37:11 -08:00
Kienz
4b56e3f8ae
Fix for touch devices - only works if page is has no scrolling. I've tested it no iPad with iOS 6.01.
2012-12-10 13:44:26 +01:00
shilo
4fba531e6f
close <image> tag XML style to allow access to native SVG document
2012-12-10 14:40:26 +02:00
kangax
a1a54fea0b
Merge master
2012-12-09 10:17:12 +01:00
Kienz
1599ab3484
loadFromJSON now handles json as String or Object - same behavior like loadFromDatalessJSON.
2012-12-08 10:40:29 +01:00
kangax
a6a7b72dcd
Padding-related fixes and some canvas.class refactoring.
2012-12-07 19:19:04 +01:00
kangax
913a4970bc
Merge master
2012-12-07 15:43:57 +01:00
kangax
2b33b7f570
Locking properties (lockMovementX, lockMovementY, lockRotation, etc.) are now respected in groups. Closes #152 .
2012-12-07 15:39:47 +01:00
Juriy Zaytsev
e276743176
Merge pull request #335 from TimNZ/master
...
Allow `fabric.util.loadImage` to support data url in Node.js.
2012-12-06 10:49:29 -08:00
kangax
352dd44b3c
Implement smooth free drawing. Free drawing is now a separate module. Thanks @coulix!
2012-12-06 19:47:34 +01:00
kangax
0c1fd43fc1
First stab at dynamic origin of transformation (based on the excellent work of https://github.com/stormbreakerbg ).
2012-12-06 19:12:54 +01:00
kangax
832e754d9e
Prevent FF<4 from throwing errors on getComputedStyle.
2012-12-04 14:14:08 +01:00
TimNZ
a119d39e85
Set img._src on loadImage for data url
2012-12-04 17:28:01 +13:00
TimNZ
e9fe12a6d0
Allow loadImage to support data:image url
2012-12-04 17:21:08 +13:00
Kienz
8e45dd8046
[BACK_INCOMPAT] Cufon rendered fabric.Text now has two properties: backgroundColor (whole bounding-box) and textBackgroundColor (textlines, same behavior as "old" fabric.Text#backgroundColor)
2012-12-03 19:38:35 +01:00
kangax
57d7861fc4
Fix gradient fill on fabric.Text objects. Fix #278 .
2012-12-03 08:57:44 +01:00
Kienz
dfe2762394
Prevent drawing textBackground for empty textlines
2012-12-02 14:08:13 +01:00
Kienz
1d73cc6e9a
fabric.Text backgroundColor vs. textBackgroundColor
2012-12-02 13:58:34 +01:00
kangax
c105212c9c
Doc fixes. Version 0.9.26
2012-12-02 11:53:38 +01:00
Steve Pemberton
a24e0e79fc
Fix to allow path to be immediately positioned on creation
2012-12-01 20:57:21 +00:00
kangax
1633bce401
Add most of the unit tests for fabric.util methods. Fix #35 .
2012-12-01 17:52:03 +01:00
Kienz
f85e7a0335
Bugfixes for new parameter propertiesToInclude
...
Doc additions, fixes.
fabric.Group.toObject() now passes object propertiesToInclude also to objects inside the group
fabric.Image.clone() has now parameter propertiesToInclude
fabric.Object.clone() has now parameter propertiesToInclude
2012-12-01 13:57:27 +01:00
coulix
a0cf70994d
No need for free drawing to extend fabric Objecti + freedrawing module presence check before instantiation
2012-12-01 00:34:33 +01:00
kangax
2329ef59fe
Add support for specifying additional properties to return in toObject, toJSON. Fix #272 .
2012-11-30 23:46:09 +01:00
coulix
8f8322fb46
Merge master
2012-11-30 18:57:49 +01:00
coulix
16422bed01
Refactoring
2012-11-30 18:42:02 +01:00
kangax
f75934ec7c
Fix error in fabric.StaticCanvas#toDataURLWithMultiplier. Closes #327 .
2012-11-29 13:53:13 +01:00
Steve Pemberton
7594a19e7b
ParseDimensions changes
2012-11-29 00:50:03 +00:00
Steve Pemberton
4d40b7b080
Path fixes
2012-11-29 00:46:16 +00:00
kangax
63c5c02560
Add support for dashed selection. Thanks @coulix! Version 0.9.24.
2012-11-28 13:04:39 +01:00
coulix
61db93d5ec
Smooth live free drawing on contextTop canvas
2012-11-28 11:55:30 +01:00
Greg Tappero
d0952172a3
Dashed selection borders
...
Wip dashed selection nearly there
fix dashed selection merge
2012-11-28 11:44:29 +01:00
kangax
d693130115
Add canvas reference to active group. Version 0.9.23.
2012-11-27 16:25:07 +01:00
kangax
315a2c9bf3
Move callSuper out of fabric.Object.prototype and create it dynamically in createClass.
2012-11-23 13:39:50 +01:00
kangax
f0b5329157
Doc additions, fixes.
2012-11-23 13:38:26 +01:00
kangax
2e1d02148b
Get rid of _theta and update "angle" property dynamically. Version 0.9.22. Fix #283 .
2012-11-15 14:20:45 +01:00
kangax
01982a446c
Do not use uniqueID in IE as it's not always unique. Fix #311 .
2012-11-15 12:49:10 +01:00
kangax
e3700484ea
Fix minor issues found by JSHint.
2012-11-13 18:06:53 +01:00
kangax
a83b97a4e4
Add Convolute and Pixelate filters. Fix bug with consecutive "m"/"M" commands and "s" command. Version 0.9.21.
2012-11-03 16:14:05 +01:00
kangax
cdeac75435
Do not show rotating corner points when objects inside active group.
2012-11-03 16:11:00 +01:00
kangax
b763330289
Make active group respect clipping/overlay.
2012-11-03 16:11:00 +01:00
Steve Pemberton
3b3c439b00
Added code to resize cache canvas.
...
_setDimensions will now correctly alter the cache canvas size when the
other canvases are resized. This ensures per pixel hit testing will
still function.
2012-10-30 23:34:52 +00:00
kangax
dbe5ad2149
Adjust positioning of text objects created via fromElement. Fix #303 . Version 0.9.20.
2012-10-31 00:19:13 +01:00
kangax
3541f4a45d
More robust drawControls.
2012-10-30 18:43:55 +01:00
kangax
002cdb4eb5
Add contribution note. Fix #302 .
2012-10-29 22:32:20 +01:00
kangax
a816fb9740
Fix object controls detection when controlsAboveOverlay=true. Fix #256 .
2012-10-28 13:56:07 +01:00
kangax
aaee929373
Make overlay image part of canvas object/json representation. Some renderAll cleanup. Fix #265 .
2012-10-28 12:21:44 +01:00
kangax
48443c193b
Fix sendBackwards/bringForward methods to work with larger objects covering smaller ones. Fix #241 .
2012-10-28 11:21:47 +01:00
kangax
5998dfc1a5
toSVG now displays flipped objects correctly. Fix #297 . Version 0.9.18.
2012-10-26 15:26:44 +02:00
kangax
17fe1a2929
Allow to change number precision in sag transform values. Thanks Will McNeilly.
2012-10-24 22:05:19 +02:00
Steve Pemberton
e8a696c4b1
fix for retreiving scrolled & Fixed Descendants, Mouse Position
2012-10-24 19:56:48 +01:00
kangax
b9da2c4da2
Use "alphabetic" as textBaseline value. This normalizes vertical text position across browsers. Thanks Eric Lesch.
2012-10-23 22:58:44 +02:00
kangax
df22b0f9b1
Default "fontWeight" is now corresponding to "normal" — 400, instead of 100 (which makes some fonts appear light).
2012-10-23 21:12:48 +02:00
Steve Pemberton
e8cdf8e2fe
Fixes for shift selecting/unselecting groups
...
Shift selecting/deselecting no longer causes the group to have its
transform re-applied.
You can no longer drag a shift added object separately from the group.
This also fixes the issue of the object jumping on addition to a group.
Objects in a group are now rendered to the upper-canvas in the order
they are in on the lower canvas.
2012-10-21 15:31:11 +01:00
kangax
f576ec797b
Documentation additions.
2012-10-20 20:12:28 +02:00
kangax
1744469063
Fix opacity of rect, circle, ellipse objects. Fix #289 .
2012-10-20 20:12:19 +02:00
kangax
39efd11c4c
Add overlayImageLeft, overlayImageTop properties to control position of canvas overlayImage. Add "before:render" event.
2012-10-20 20:11:55 +02:00
kangax
70784f55d9
Add support for off method to remove all handlers for event when not given any handlers.
2012-10-20 20:11:16 +02:00
kangax
8494350baf
Remove onFpsUpdate as it's such a rarely used functionality (and could be accomplished on application level).
2012-10-20 20:10:32 +02:00
kangax
0243009218
Doc fixes.
2012-10-17 11:02:53 +02:00
kangax
1cc4a5c799
Merge origin/master.
2012-10-17 01:27:47 +02:00
kangax
15b1dcc555
Remove redundant bordervisibility/cornervisibility properties from image objects. Version 0.9.15.
2012-10-17 01:25:01 +02:00
kangax
1f10671202
Fix comment. Fix #286 .
2012-10-17 01:18:54 +02:00
kangax
514f064710
Normalize option setting in all classes. Fix #287 .
2012-10-17 01:17:51 +02:00
Steve Pemberton
f11f83b0db
Fix for negative width on objects
2012-10-14 18:30:08 +01:00
Steve Pemberton
da28b363e4
Revert "Fix for negative width on objects preventing selection"
...
This reverts commit 55853039cd .
2012-10-14 18:23:39 +01:00
Steve Pemberton
55853039cd
Fix for negative width on objects preventing selection
2012-10-14 13:27:41 +01:00
kangax
84a956c4b6
Lint everything with JSHint. Version 0.9.14.
2012-10-14 02:53:12 +02:00
kangax
33c8a34399
Fix gradient setting in loadFromJSON. Fix #246 again.
2012-10-13 19:56:54 +02:00
kangax
07698a22ae
Add support for finding target per-pixel (ignoring transparent ones). This allows to drag shapes by non-transparent pixels only. Thanks Steve Pemberton for initial work. Version 0.9.13.
2012-10-11 00:40:03 +02:00
kangax
eacc459cf0
Add support for switching between filled and stroked corners.
2012-10-11 00:36:49 +02:00
kangax
307c9503d4
Fix fabric.Group#toObject not serializing children image objects. Fix #260 .
2012-10-08 21:01:29 +02:00
kangax
999f7f5231
Account for bounding box in scaleToWidth/scaleToHeight. Fix #271 . Version 0.9.12.
2012-10-08 19:35:37 +02:00
kangax
4ac8b68d78
Show rotating point handle only if hasControls=true. Remove "hideCorners" since there's already "hasControls" property (consistent with "hasBorders" one). Version 0.9.11.
2012-10-07 16:12:37 +02:00
kangax
2b3994f4c7
Fix corner detection. Thanks Josh Pearce. Fix #275 . Fix #269 .
2012-10-03 23:45:49 +02:00
kangax
b555245780
Add support for animating multiple properties.
2012-10-03 23:45:49 +02:00
Kienz
0595577c6e
support check for toDataURL with quality parameter
2012-09-29 09:51:47 +02:00
kangax
0ead6db114
Path groups now have empty fill by default.
2012-09-10 19:54:47 -04:00
kangax
462041d2ce
Fix group setter to not mess up children fill value. Fix #191 .
2012-09-10 19:46:22 -04:00
kangax
f8ecc529f5
Fix fontFamily setting.
2012-09-10 19:45:25 -04:00
kangax
e8278236d6
Do not show middle controls when lockUniScaling is on. Closes #228 .
2012-09-08 23:27:05 -04:00
kangax
44dc5f7fe7
Update text dimensions after changing text. Closes #257 . Version 0.9.7.
2012-09-07 13:30:32 -04:00
kangax
7cf01772a4
Fix fabric.Text#set.
2012-09-07 13:15:42 -04:00
kangax
0171b665be
Fix SVG rendering of lines and images in groups.
2012-09-06 16:41:31 -04:00
kangax
06b0746258
Fix transform matrix bug. Closes #33 .
2012-09-06 12:00:36 -04:00
kangax
77c7bd134f
Fix object padding.
2012-09-05 17:25:37 -04:00
kangax
762cfb7b8a
Fix unit tests. Add loadFromJSON test for previous fix. Version 0.9.5.
2012-09-02 12:28:52 -04:00
kangax
5f19d75a03
[BACK_INCOMPAT] Move NUM_FRACTION_DIGITS & MIN_SCALE_LIMIT to fabric.Object.
2012-09-02 11:50:07 -04:00
kangax
f646bdc735
object.theta --> object._theta
2012-09-02 11:34:48 -04:00
kangax
232f671b24
Fix loadFromJSON with async content.
2012-09-02 10:39:07 -04:00
kangax
f01736183a
Fix straight-line polyline/polygon rendering.
2012-09-01 23:22:16 -04:00
kangax
1d3de62a9c
Add "controlsAboveOverlay" option to canvas.
2012-09-01 23:22:16 -04:00
Kienz
77fe7884c0
RotatingPoint not working since strokeWidth is included in boundingBox of objects.
...
This should fix this.
Jsfiddle example:
http://jsfiddle.net/r2ZE7/23/
2012-08-27 19:51:28 +02:00
kangax
204923e86c
Object boundaries now take "strokeWidth" into consideration. Closes #166 .
2012-08-26 23:25:16 +02:00
kangax
eb4ac004aa
Gradients now render properly in IE9 (thanks Kienz).
...
Closes #110 , #247 . Version 0.9.3.
2012-08-26 21:14:34 +02:00
Juriy Zaytsev
b8983f9760
Merge pull request #244 from willmcneilly/image-render-fix
...
Add transform matrix to render method, reset image width and height.
2012-08-26 11:51:35 -07:00
kangax
deb33940a2
Avoid rendering dot in FF on click in free drawing mode.
2012-08-23 15:15:11 +02:00
kangax
dc8224138d
Fix gradient rendering in path objects.
2012-08-21 19:31:39 +02:00
Will McNeilly
2a22e1dba6
add transform matrix to render method, reset image width and height
2012-08-21 17:19:55 +01:00
kangax
9cde32897a
Clear dummy DOM element used for Cufon rendering.
2012-08-21 16:00:09 +02:00
kangax
0bbaddf859
Fix _initGradient with non-empty non-gradient values.
2012-08-20 18:39:04 +02:00
kangax
189b0efd34
Bump version to 0.9.0.
2012-08-20 18:34:37 +02:00
kangax
db37e1e855
Add convenience methods to objects, utilizing new object.canvas property — reference to a canvas to which an object was added last. Add unit tests for new methods.
2012-08-20 18:23:54 +02:00
kangax
9a7d40d7d7
Change the way gradients are initialized.
...
They no longer need `ctx` property, which is now taken from object directly during rendering time.
Add unit tests for gradients.
2012-08-20 18:23:53 +02:00
kangax
3fbdd508ba
Fix inline docs.
2012-08-20 18:23:53 +02:00
kangax
fc194eeec1
Unify object initialization logic used in add and insertAt.
2012-08-20 18:23:53 +02:00
kangax
9594ba330f
gradient.js --> gradient.class.js
2012-08-20 18:23:53 +02:00
joshpearce
5923e008f7
Update src/parser.js
2012-08-19 21:36:37 -03:00
Josh Pearce
cf7a6d1482
Added reviver method in parser
...
The optional method is used when asking fabric to
load an SVG file and parse it, instantiating fabric objects.
After each fabric object is created, reviver(ele, obj) is
called so you can parse our custom attributes, or do
anything else custom.
2012-08-19 16:07:28 -04:00
kangax
90d7f7acf3
Fix native text rendering under node-canvas.
2012-08-16 18:08:24 +02:00
Will McNeilly
a4929cdbd4
shorthand quadratic curveto rendering fixes, dealing with coincident points.
2012-08-16 13:58:10 +01:00
Kienz
34be62682f
Add quality parameter for toDataURL and toDataURLWithMultiplier
2012-08-15 20:42:28 +02:00
kangax
8e429ceaf9
Fix loadFromDatalessJSON when native text is present in data. Bump allowed node version to 0.8.6.
2012-08-15 15:30:59 +02:00
kangax
dc6d262b01
User renderOnAddition in canvas#insertAt. Closes #233 .
2012-08-14 15:39:21 +02:00
kangax
9d2f3d261b
Fix rendering bug with objects in group that also have transform attribute.
2012-08-14 14:37:27 +02:00
kangax
a0d05624ed
Remove incorrect offsets in polygon rendering and fix <rect> position when part of a group. Closes #113 . Closes #229 .
2012-08-14 14:03:20 +02:00
Juriy Zaytsev
b4f2f64ff1
Merge pull request #224 from davidjrice/path-fixes
...
Add fixes for "q" and "t" quadratic curves, as well as support for consecutive "t" curves.
2012-08-11 12:53:46 -07:00
kangax
3ce8507932
Implement fabric.Text.fromElement. Closes #182 .
2012-08-11 18:59:53 +02:00
Will McNeilly
1ba26ad05f
Add fixes for q and t quadratic curves and add support for consequtive t curves
2012-08-09 15:07:24 +01:00
kangax
956d8708ed
Add fabric.Group#toSVG.
2012-08-09 13:07:26 +02:00
kangax
daa6b4cbbf
Fix fabric.Line#set method to call _setWidthHeight after coordinates update.
2012-08-09 12:24:22 +02:00
kangax
0fcd356bf6
Initial support for "strokeDashArray" (WIP; works for rectangles only for now).
2012-08-08 00:04:01 +02:00
kangax
3e6b880086
Fix set({ key1: value1, key2: value2 }) not working with groups.
2012-08-08 00:04:01 +02:00
Cat Sync
2cfe384d57
Fix for polygon bounding box being offset (issue #147 )
2012-08-05 16:58:27 -04:00
kangax
04d770aa35
No longer allow to resize inactive objects (this also means cursor doesn't appear when hovering over resizing controls of inactive (non-selected) objects).
2012-08-02 21:19:06 +02:00
Juriy Zaytsev
6bf298d59c
Merge pull request #205 from aggrosoft/master
...
Fix `applyFilter` dimensions and add new Tint Filter.
2012-07-31 13:16:55 -07:00
kangax
581d5a54b9
Fix compatibility with Node (including loadSVGFromString).
2012-07-31 20:55:49 +02:00
kangax
e85045d86a
Rename fabric_node.js to node.js
2012-07-31 20:50:06 +02:00
Juriy Zaytsev
c51c10b3ec
Merge pull request #214 from Kienz/cursor
...
Add moveCursor and fix "defaultCursor" typo.
2012-07-29 03:09:25 -07:00
Kienz
35e8addd88
moveCursor and typing error defaultCursor
...
Property moveCursor, _setCursor(this.moveCursor) when moving object,
typing error defaultCursor
2012-07-29 11:05:07 +02:00
Kienz
e4f9e405c2
defaultCursor typing error
2012-07-29 10:14:05 +02:00
Kienz
6feafb4a91
Native textShadow bug - offsetX, offsetY und blur are wrong
...
The definition of offsetX, offsetY and blur are wrong.
You can see this in this jsfiddle:
http://jsfiddle.net/TeBdn/2/
2012-07-29 09:53:40 +02:00
kangax
38ffacfbec
Fix bug with text shadows parsed incorrectly when using native text rendering. Thanks @Kienz. Closes #211 .
2012-07-28 17:59:04 +02:00
kangax
82ba3169f7
Make sure text objects have dimensions before they're added to canvas. Closes #158 .
2012-07-27 02:56:52 +02:00
kangax
9d82685431
Merge native-text branch
2012-07-27 00:33:49 +02:00
kangax
884d02881b
Fix SVG export failures when rendering text via native methods.
2012-07-27 00:26:54 +02:00
kangax
02a13062ee
Fix bug when exponent notation (e.g. "q 10.47e-3") would trip up path parsing mechanism.
2012-07-26 00:17:04 +02:00
aggrosoft
ce86c0470c
Fixing broken size of scaled images
...
Size of original image will be taken into account where the scaled size should be used when calling applyFilter.
This fixes this.
2012-07-25 13:24:45 +03:00
aggrosoft
89402af132
New Tint filter
...
Added new Tint filter that will recolor a semi transparent image
2012-07-25 13:22:07 +03:00
kangax
af7679cee1
Implement most of the remaining text rendering functionality when using native methods. This includes background, text decoration (underline/strike-through/overline), multiline text support, text alignment (left/center/right) in multiline text, text shadow, line height. SVG export is still partially broken when using native rendering methods.
2012-07-24 11:21:32 +02:00
kangax
d9a64e4529
Replace element in applyFilters directly, to avoid messing up image instance dimensions.
2012-07-20 21:16:14 +02:00
kangax
971f82fb7d
Merge ollym/text-fixes.
2012-07-20 19:13:36 +02:00
kangax
ea699a776a
Width/height passed to fabric.Image during initialization now take precedence over actual image width/height.
2012-07-19 11:45:04 +02:00
kangax
edbce2b32a
Documentation fixes.
2012-07-19 11:43:46 +02:00
kangax
57484274ba
Fabric events related to objects can now be observed on objects themselves.
...
For example, instead of:
canvas.observe('object:selected', function(o) {
console.log('selected', o.target);
})
you can now do:
object.on('selected', function() {
console.log('selected', object);
});
Events that are fired on objects are:
- mouseup
- mousedown
- mousemove
- rotating
- scaling
- moving
- modified
- selected
- added
2012-07-18 18:29:27 +02:00
kangax
9590fe597c
In fabric.Observable, observe is now on, stopObserving — off. observe and stopObserving are deprecated.
2012-07-18 18:25:51 +02:00
kangax
fc7ce11cd3
Mark fabric.Text as synchronous. Closes #198 .
2012-07-18 17:03:28 +02:00
Oliver Morgan
b4abf1d96f
Removed Cufon dependency
...
Fixes #194
2012-07-14 21:35:45 +01:00
kangax
5ce8df3c67
Remove invisible rotating point and fix few other bugs with it. Add fabric.Object#rotatingPointOffset offset. Closes #190 .
2012-07-11 16:29:10 +02:00
kangax
ae45281d18
Fix setBackgroundImage option setting.
2012-07-09 19:02:24 +02:00
kangax
aab5adcd11
Fix rendering artifact with rounded rectangles. Thanks Anne Poveda.
2012-07-09 18:11:18 +02:00
kangax
c988e5a8c3
Fix fabric.Line regression.
2012-06-28 21:14:19 +02:00
kangax
8581f94341
Fix polyline/polygon rendering in IE8. Closes #124 .
2012-06-28 21:12:30 +02:00
kangax
f1cd5ebe1d
Fix lines not respecting left/top when loaded from object. Closes #151 .
2012-06-28 20:36:55 +02:00
kangax
ab11c82b18
Fix callback to be invoked after background image is set.
2012-06-26 16:43:35 +02:00
kangax
be5e8a600f
Remove redundant "//= require" statements.
2012-06-26 16:42:45 +02:00
kangax
b669085c97
Fix groups being lost after toDataURLWithMultiplier.
2012-06-26 16:41:43 +02:00
kangax
30f24f7f35
Fix loadFromJSON not invoking callback. Closes #184 .
2012-06-25 15:27:10 +02:00
kangax
4dcf268d67
Prevent error in initFilters when filter is null (filters array is with holes).
2012-06-24 11:52:00 +02:00
kangax
249c330ed6
Add fabric.util.groupSVGElements for creating fabric.<Element> or fabric.PathGroup out of a group of elements.
2012-06-23 19:28:53 +02:00
kangax
83582467d6
Merge master
2012-06-23 18:18:02 +02:00
kangax
9926d8389a
[BACK_INCOMPAT] Remove CANVAS_WIDTH, CANVAS_HEIGHT properties from fabric.Canvas.prototype (as they're no longer used anywhere). Lowercase some of the fabric.Canvas.prototype properties, for consistency: CURSOR -> defaultCursor, ROTATION_CURSOR -> rotationCursor, HOVER_CURSOR -> hoverCursor, CONTAINER_CLASS -> containerClass.
2012-06-23 00:18:41 +02:00
kangax
9d36e26d71
Fix "mouse:down", "mouse:move", "mouse:up" events not firing during free drawing mode.
2012-06-22 17:25:15 +02:00
kangax
5d803c9778
Fire "mouse:down", "mouse:move", "mouse:up" events during free drawing mode.
2012-06-22 17:05:07 +02:00
kangax
dd43c23e86
Check for callback presence in fabric.Group.fromObject.
2012-06-21 09:59:48 +02:00
kangax
126c2aa507
Merge master
2012-06-20 17:43:39 +02:00
kangax
d6f7c9effb
fabric.Canvas#setOverlayImage now correctly returns a reference to a canvas instance.
2012-06-19 20:33:46 +02:00
kangax
1706361616
Fix bug with rendering of subsequent "S" commands, where reflection of control point would be considering 1st control point of previous command, not 2nd one. Closes #177 .
2012-06-17 13:25:17 +02:00
kangax
da2ed018d8
Fix fabric.util.requestAnimFrame erroring out due to wrong "context".
2012-06-15 17:35:05 +02:00
kangax
cd59885370
Fix port recognition from URL when loading SVG's via node.
2012-06-14 14:12:42 +02:00
kangax
5e29a2b319
Fix bugs in fabric.Object#animate (thanks Anton Ignatov).
2012-06-13 13:30:53 +02:00
kangax
b5d76f752d
Add more image filters (Sepia, Sepia2, Brightness, Noise, GradientTransparency) based on Stoyan's demo — http://www.phpied.com/pixel-manipulation-in-canvas/ Fix bug with fabric.Image and filters.
2012-06-11 19:17:24 +02:00
kangax
b701627f42
Fix "stroke-width" being ignored in style attribute.
2012-06-10 12:13:12 +02:00
kangax
09585654a8
Cloned canvas now preserves background image (and all of its properties) properly.
2012-06-07 16:24:44 +02:00
kangax
e17fe9ddef
Prevent error in fabric.Object#toDataURL when called before setCoords.
2012-06-07 16:24:44 +02:00
kangax
9e605340c1
Fix subclassing mechanism to work correctly with 2+ level deep inheritance. Closes #134 . Closes #141 .
2012-06-07 16:24:44 +02:00
Tim de Koning
a64ae3d9eb
XML entities should be escaped globally!
2012-06-07 15:24:00 +02:00
kangax
bb389e4723
Removing active object now fires "selection:cleared" events. Closes #121 .
2012-06-07 12:47:15 +02:00
kangax
9130ab7f60
Add "object:added" event. Fires when object is added to canvas (either via canvas.add or canvas.insertAt).
2012-06-07 12:32:58 +02:00
kangax
7791e9c2e0
IE fix for gradient parsing.
2012-06-07 12:32:58 +02:00
kangax
1bfa25acf4
Render canvas after setting background image.
2012-06-07 12:32:57 +02:00
Juriy Zaytsev
a239bdd2a8
Merge pull request #168 from garg/master
...
Fix `fabric.Object#toDataURL` to take bounding rectangle dimensions into consideration. Add `fabric.Object#getBoundingRectWidth`, `fabric.Object#getBoundingRectHeight`.
2012-05-31 14:50:06 -07:00
kangax
78eda278d1
Fix double tap issue in iOS. Closes #146 .
2012-06-01 01:42:11 +04:00
garg
49a51b1388
Added getBoundingRectHeight and getBoundingRectWidth and changed toDataURL to use those instead of getHeight and getWidth.
2012-05-30 20:30:42 -03:00
Maciej Gajewski
752339aa3e
Rotation point now works after flipY.
2012-05-29 13:04:25 +02:00
Maciej Gajewski
1d037645b9
Added ability to set cursor for rotation point just as default cursor.
2012-05-29 12:42:41 +02:00
kangax
e4dbab85f1
Fix xml parser initialization.
2012-05-29 12:29:20 +04:00
kangax
ecdd0fb980
Try using "xmldom" instead of "o3-xml".
2012-05-28 17:22:37 +04:00
kangax
af67423df9
fabric.Image now renders image according to current width/height (not width/height of original image).
2012-05-27 23:48:00 +04:00
kangax
35afa0c9c1
Fix size of selection border of scaled circles. Closes #157 .
2012-05-25 15:34:01 +04:00
kangax
0e79544c12
Preserve hasControls, hasBorders, hasRotatingPoint values during serialization. Closes #163 .
2012-05-21 14:24:33 +04:00
kangax
c7f31d9d0e
Export backgroundImage, backgroundImageOpacity, backgroundImageStretch in SVG. Closes #125 .
2012-05-16 15:25:18 +04:00
kangax
9584ae2759
"backgroundImage", "backgroundImageOpacity", and "backgroundImageStretch" are now preserved correctly (when saving canvas to JSON/loading from JSON). Closes #139 .
2012-05-16 14:51:10 +04:00
kangax
09d6a6451d
Revert circle as rotating control for now (will need to figure out why scaling occurs there).
2012-05-15 18:36:34 +04:00
kangax
c5bf683d63
Display circle as rotating control, rather than square.
2012-05-15 18:01:57 +04:00
kangax
7451d8978a
Set cursor to "crosshair" when hovering over rotating control.
2012-05-15 18:01:38 +04:00
kangax
5cbd8bdb8a
Merge remote-tracking branch 'Kienz/master'
2012-05-15 16:53:57 +04:00
Kienz
b3b99e6aee
Fix problem when hasRotatingPoint = 'false'. In this case the behavior is the same as before: corner-controls: scale + rotate.
2012-05-15 15:36:19 +03:00
kangax
a5efac75bb
Merge remote-tracking branch 'Kienz/master'
2012-05-15 16:14:15 +04:00
Kienz
475e3ae1ce
Bugfix seperate rotating point
2012-05-15 14:56:55 +03:00
Kienz
7c0a2e65cd
Bugfix seperate rotating point
2012-05-15 14:54:39 +03:00
kangax
60f6bdfa60
Merge remote-tracking branch 'Kienz/master'
2012-05-15 15:08:03 +04:00
Kienz
ee380cc3a0
Revert "Revert "Separate rotating corner""
...
This reverts commit cc41222b0d .
2012-05-15 00:46:05 +02:00
Kienz
cc41222b0d
Revert "Separate rotating corner"
...
This reverts commit d95894f5c2 .
2012-05-15 00:44:38 +02:00
Kienz
d95894f5c2
Separate rotating corner
...
These changes are based on the easel.ly project. The separate rotate
corner can enabled/disabled by the option hasRotatingPoint
(true/false). By default the option is set to false.
Maybe you can have a look at these changes.
2012-05-15 00:35:20 +02:00
Kienz
33c7cda3aa
Group selection by holding shift key if canvas.selection = false no longer possible
2012-05-14 12:25:02 +03:00
Juriy Zaytsev
351ec5d48f
Merge pull request #155 from balthazar/master
...
Add easing functions.
2012-05-13 07:43:06 -07:00
kangax
7c95155c2e
Add fabric.Canvas#getSelectionElement for retrieval of canvas element on which object selection is drawn.
2012-05-13 18:37:28 +04:00
kangax
5a2eb2e3df
[BACK_INCOMPAT] fabric.Canvas#getContext now returns context of canvas element on which all objects are drawn. fabric.Canvas#getSelectionContext returns context of canvas element on which object selection is drawn.
2012-05-13 18:30:12 +04:00
kangax
35fcc980da
Output rx/ry in object, JSON, and SVG representations of fabric.Rect.
2012-05-12 14:30:23 +04:00
kangax
8a84affd6c
[BACK_INCOMPAT] Remove "memo" from event objects. e.memo.xxx is now e.xxx.
2012-05-12 13:44:26 +04:00
kangax
cba1d4ca21
[BACK_INCOMPAT] Move object straightening methods into its own, optional module (fabric.Object#straighten, fabric.Object.fxStraighten, fabric.Canvas#straightenObject).
2012-05-11 15:31:30 +04:00
kangax
5e4811ea20
Fix bug in SVG rendering.
2012-05-09 19:14:42 +04:00
Balthazar Auger
d3abeeb957
Merge branch 'master' of github.com:balthazar/fabric.js
...
Conflicts:
build.js
2012-04-26 00:07:52 -03:00
Balthazar Auger
8724fa2bc1
Update default easing function
2012-04-26 00:01:42 -03:00
Balthazar Auger
383665d236
Debug and test remaining equations.
2012-04-24 17:35:53 -03:00
Balthazar Auger
4945372f05
Add most common easing functions
...
TODO: find out why easeOutBack and easeInOutBack mess up build
2012-04-24 02:29:38 -03:00
Balthazar Auger
f2a37a3bc0
Adapt fabric.util.animate to work with general easing equations
2012-04-24 02:28:45 -03:00
Balthazar Auger
b2853e8717
Study how to insert easing functions
2012-04-24 00:27:18 -03:00
kangax
6aef8a009d
Fix bug where static canvas couldn't render overlay image.
2012-04-20 13:37:47 +02:00
kangax
0a0ab70f68
Add fabric.Canvas#cloneWithoutData. Fix broken unit tests. Bump version to 0.8.
2012-04-20 13:37:46 +02:00
kangax
b3768bcdd3
Check event.touches[0] exists before accessing a property. Thanks @zj831007. Closes #149 .
2012-04-08 18:20:19 +02:00
kangax
83e3c8bd9e
Initial implementation of generic groups. See https://github.com/kangax/fabric.js/wiki/Working-with-groups for more info.
2012-04-08 15:15:31 +02:00
kangax
6cdee94cc6
Fix typo in docs.
2012-03-29 15:35:58 +02:00
Juriy Zaytsev
c551e1bcbe
Merge pull request #144 from sunrei/master
...
Fixed bug with `loadFromDatalessJSON` not loading text objects when those objects have no "path" property.
2012-03-28 05:09:55 -07:00
kangax
8411165bcd
Revert "Fix rendering of lines where x1,y1 are less than x2,y2."
...
This reverts commit c7006df133 .
2012-03-26 00:30:29 +02:00
Dmitriy
f780babe2f
fixed bug when text object are not being loaded with loadFromDatalessJSON method
2012-03-23 14:34:47 +02:00
kangax
c7006df133
Fix rendering of lines where x1,y1 are less than x2,y2.
2012-03-19 13:17:03 +01:00
kangax
feaddda1c0
Ditch o3-xml-fork for now (it fails even on node 0.4.x) when parsing SVG.
2012-02-15 16:26:58 -05:00
kangax
93565f135d
Fix text offset issue when exporting to SVG.
2012-02-10 00:37:06 -05:00
kangax
905ab44665
Remove unused functionality in fabric.Image (maxwidth/maxheight). If we do add this in the future, it should really be on fabric.Object not only on fabric.Image.
2012-02-10 00:13:28 -05:00
Tim de Koning
513766d63c
fixed issue where canvas is messed up when no backgroundImage or backgroundColor is configured and something is dragged around on the canvas.
2012-02-09 11:00:30 +01:00
Tim de Koning
0ed5f80248
escape XML in SVG strings
2012-02-09 09:54:30 +01:00
kangax
e5d92f71d5
Check that allOnTop is true not just any truthy value (so that we can pass it as callback to methods like "onChange"). See https://github.com/kangax/fabric.js/pull/104#issuecomment-3493677
2012-02-05 13:54:58 -05:00
Juriy Zaytsev
7169b53a46
Merge pull request #109 from gburlet/bgImg
...
Add "backgroundImageStretch" and "backgroundImageOpacity" options to canvas.
2012-02-05 10:48:50 -08:00
kangax
89cdfa3884
Merge remote-tracking branch 'Kingsquare/master'
2012-02-05 13:18:22 -05:00
kangax
13049361b0
Preserve image src for use in node.js. Add support for overriding src of images when exporting to SVG.
2012-02-03 23:27:45 -05:00
Tim de Koning
c31e519bd2
Fixed SVG new line issues in IE7 and IE8
2012-02-03 18:13:08 +01:00
kangax
19dbb74307
Fix trailing commas. Closes #118 .
2012-02-03 09:18:35 -05:00
kangax
e9dee5a37d
Make SVG export of text more reliable (rgba()-based colors now work in Illustrator). Cut off decimal parts of values in SVG output, which slims down the size.
2012-02-01 18:43:52 -05:00
kangax
6ce924b38d
Use a fork of "o3-xml" package that allows to run under latest Node.js 0.6.8. Note that SVG parsing doesn't work when running under latest Node. Here's why — https://github.com/ajaxorg/node-o3-xml/issues/23#issuecomment-3705238
2012-01-29 12:30:39 -05:00
Gregory Burlet
29e128faa0
variable name changes
...
changed backgroundOpacity to backgroundImageOpacity etc.
2012-01-27 09:19:40 -05:00
kangax
3d6ae8442f
Fix object controls not working in IE8. Closes #92 .
2012-01-26 19:39:30 -05:00
Gregory Burlet
78c2345bb8
added options for setBackgroundImage
...
optional arguments to the function can be supplied
2012-01-23 12:20:34 -05:00
Gregory Burlet
136539f9d9
background image changes
...
Allow the user to set the background image opacity, and whether the image should be stretched to fit the canvas
2012-01-23 11:48:37 -05:00
Juriy Zaytsev
c57791e633
Merge pull request #105 from Kingsquare/master
...
Fix unit tests in < IE8.
2012-01-23 05:15:56 -08:00
kangax
0bb80dddf0
Fix fabric.Canvas#setOverlayImage('') not removing overlay image.
2012-01-21 23:07:16 -05:00
kangax
4565e0dd6a
Fix parsing of gradients with stops that have absolute values (rather than percents).
2012-01-21 13:33:49 -05:00
kangax
c057b8b6d5
Fix vertical gradient rendering. Closes #108 . Thanks aarr0n.
2012-01-21 12:59:30 -05:00
Tim de Koning
804de6094c
Why shouldn't we allow GET parameters? Dynamicly generated SVG files (based on GET params) should be supported to
2012-01-20 11:29:51 +01:00
Tim de Koning
c34bc926ed
Fir fox IE7 and IE8 multiline strings
...
IE7 and IE8 are the only browsers to strip newlines and spaces in the DOM tree. This is an ugly fix to work around this issue and make mulitline strings possible in IE.
2012-01-18 15:36:17 +01:00
Tim de Koning
2fab0b1ed7
Font rendering fix for < IE9
...
Fabric expects text to be rendered as Canvas elements. Cufon however falls back to VML rendering when canvas is not available in the browser. This mod of the Cufon library ALWAYS enabled the canvas rendering engine for Cufon. This way font-rendering is available on IE7 and IE8 when excanvas is available.
2012-01-18 12:00:59 +01:00
Tim de Koning
f71f634afd
IE8 and lower now actually render and show any loaded SVG
2012-01-18 10:44:03 +01:00
Tim de Koning
3795149dda
Allow excanvas to kick in for IE8 and lower
2012-01-18 10:01:34 +01:00
Tim de Koning
364e76713c
fabric.loadSVGFromString should work on IE8 and lower...
2012-01-17 17:29:45 +01:00
Tim de Koning
da9c75c073
improved doctype removal regex
2012-01-17 16:30:23 +01:00
Tim de Koning
17931fb764
fix for unittest "fabric.Parser.parseStyleAttribute" compliance in < IE8
2012-01-17 15:24:25 +01:00
Tim de Koning
26d6176928
fix for unittest fabric.util.loadSVGFromString in < IE8
2012-01-17 14:41:58 +01:00
kangax
1c8b5c122d
Avoid sub-pixel antialiasing when drawing straight vertical or horizontal lines.
2012-01-15 12:46:52 -05:00
kangax
23c4ec2068
[BACK_INCOMPAT] Remove fabric.Object#getCenter as it doesn't make sense (getLeft/getTop already return object center coordinates).
2012-01-10 14:16:16 -05:00
kangax
de8684cfda
Fix text shadow rendering in exported SVG.
2012-01-06 19:58:21 -05:00
kangax
e20a37ba6a
Add fabric.Image.filters.Invert (thanks Travis Paul).
2012-01-05 17:38:35 -05:00
kangax
c451f32c9f
Fix text alignment in SVG export. Center- and right-aligned text now displays properly. Add more tests to SVG export test suite.
2012-01-04 17:18:42 -05:00
kangax
9814cf12b5
Add support for text background color in SVG representation.
2012-01-04 12:31:37 -05:00
kangax
d870410a7d
First (and almost complete) implementation of fabric.Canvas#toSVG.
2012-01-02 16:14:20 -05:00
kangax
3544410689
Fix bug in canvas initialization in node. Thanks Urs.
2011-12-10 13:26:52 -05:00
kangax
cb7a4bdf86
Remove reference to window in util/misc.js for node compat.
2011-12-09 16:24:37 -05:00
kangax
326d662eec
Fix JS error in older browsers (e.g. FF4) when fabric.Rect's x/y are undefined. Closes #84 . Thanks Kienz.
2011-12-08 10:31:30 -05:00
kangax
d72fceb14b
Documentation tweaks.
2011-12-08 09:44:05 -05:00
kangax
a8758ffbe1
Use requestAnimFrame polyfill instead of setInterval in fabric.util.animate. Add fabric.util.requestAnimFrame.
2011-12-08 09:44:05 -05:00
kangax
ea99a1fc7c
Pass actual event when firing synthetic "object:selected" one.
2011-12-05 12:55:31 -05:00
jarek
f4a9a7719e
Merge remote-tracking branch 'upstream/master'
2011-12-02 09:53:33 +01:00
kangax
eb9d64f89a
Fix Opera <12 bug with canvas not getting correct prototype.
2011-11-28 19:47:41 -05:00
kangax
b8ea6b7cec
[BACK_INCOMPAT] Add support for static canvases — fabric.StaticCanvas. fabric.Canvas#loadImageFromURL -> fabric.util.loadImage. Add fabric.Canvas#centerObject.
2011-11-27 23:57:28 -05:00
jarek
f8045a84b9
fixed problem with drawing text object with non default fontWeight
2011-11-24 12:44:00 +01:00
kangax
6d376dd588
Fix gradient positioning in fabric.Gradient.forObject.
2011-11-20 12:34:36 -05:00
kangax
f3a3e81ea2
[BACK_INCOMPAT] Fix JS error when calling fabric.Image#toDataURL. toDataURL is now asynchronous, and passes data url to callback (first argument) instead of returning it. Closes #79 .
2011-11-18 10:44:53 -05:00
kangax
aff78a0d1d
Fix wrong opacity setting in fabric.Color. (thanks Javier Valero)
2011-11-14 15:10:35 -05:00
kangax
7adb4309de
Add support for customizing canvas default cursor.
2011-11-11 15:01:20 -05:00
kangax
343a5a2605
Add fabric.util.makeElementSelectable (the opposite of makeElementUnselectable).
2011-11-08 12:35:20 -05:00
kangax
2e42f9bd9d
fabric.Image#setElement now updates instance' width/height properly.
2011-11-03 18:12:53 -04:00
kangax
d16e166e54
Fix element replacement in applyFilters (when no filters are present).
2011-11-02 17:25:20 -04:00
Diogo Campos
a8166b355b
Remove unnecessary test in fabric.util.animate
2011-10-29 17:04:20 -02:00
kangax
ae9025ce5c
Fix image filter initialization in node.
2011-10-29 14:36:09 -04:00
kangax
d226102fbb
Make fabric.Image#applyFilters work in node.
2011-10-29 14:11:44 -04:00
kangax
6c463afda5
Fix fabric.Canvas#backgroundImage bug.
2011-10-28 17:10:01 -04:00
kangax
94db7bfc8f
fabric.Image.GrayscaleFilter --> fabric.Image.filters.Grayscale as per users request; Make image filters serializable.
2011-10-27 20:06:19 -04:00
kangax
ea0da5a987
Make sure fabric.Image#filters can be a sparse array.
2011-10-26 20:03:51 -04:00
kangax
1a8b82b8e3
[BACK_INCOMPAT] Add support for image filters. Add fabric.Image.GrayscaleFilter and fabric.Image.RemoveWhiteFilter "classes". Filters should be used by adding them to filters array of image instances. For example, myImage.filters = [ new fabric.Image.GrayscaleFilter(), new fabric.Image.RemoveWhiteFilter({ threshold: 30, distance: 50 }) ].
2011-10-26 01:34:54 -04:00
kangax
fe03bf19d5
Fix broken fabric.Text#textDecoration.
2011-10-16 12:53:37 -04:00
Jhonny Everson
40edcb8e8b
fontSize not being used from options in fabric.Text
2011-09-30 07:46:41 -03:00
kangax
2b08618742
Fire "object:scaling" and "object:rotating" events.
2011-09-29 09:31:57 -04:00
kangax
36aeed700a
[BACK_INCOMPAT] fabric.Canvas#selection boolean property now only affects _group_ selection (i.e. blue area that allows to select multiple objects no longer appears). Objects can still be selected by clicking on them. To make _everything unselectable_ — set "selectable" property of each object to false AND fabric.Canvas#selection to false.
2011-09-26 14:43:00 -04:00
kangax
5627b5b06c
Fix reference error.
2011-09-26 14:40:27 -04:00
kangax
19f7736658
Update documentation and fix JSDoc templates.
2011-09-22 12:40:31 -04:00
kangax
5fa051ccb9
Do not add/remove touch listeners in non-supporting environments.
2011-09-22 11:56:19 -04:00
kangax
efd2aba325
Add basic touch event support.
2011-09-21 19:29:00 -04:00
kangax
36fe5e3a6f
Fix bug w. fabric.Text not accounting for fontSize.
2011-09-21 11:18:58 -04:00
kangax
99e64c30ee
Closes #52 . Fix initialization of fabric.Group with undefined "paths".
2011-09-20 14:25:25 -04:00
kangax
db456d2b68
Closes #49 . Fix z-index issues with JSON loading.
...
`fabric.Canvas#insertAt` now accepts third (boolean) argument, indicating whether splicing can be used of insertion or not.
2011-09-19 20:23:00 -04:00
kangax
475578276e
Fix fabric.Line to update width/height when changing x1,y1,x2,y2 coordinates.
2011-09-19 17:48:16 -04:00
kangax
5dc7220425
Closes #51 again. Fix background scaling in toDataURLWithMultiplier.
2011-09-07 16:30:25 -04:00
kangax
952a31262e
Closes #51 . Fix canvas background becoming smaller when "rasterizing" canvas via toDataURLWithMultiplier.
2011-09-06 14:03:28 -04:00
kangax
8ea5f0d52c
Closes #47 . More conforming Function.prototype.bind.
2011-08-29 12:09:32 -04:00
kangax
709348f96f
More compliant Array.prototype.indexOf.
2011-08-28 21:28:46 -04:00
kangax
a3d693302c
Closes #38 . Add support for fabric.Canvas#backgroundImage.
2011-08-28 14:55:33 -04:00
kangax
09fd6210b1
"mousemove" event listener on document is now only attached after "mousedown" on canvas. This avoids unnecessary work when moving mouse outside of canvas (especially with multiple canvas instances on a page).
2011-08-26 12:58:01 -04:00
kangax
2deedd02dd
Fix regression in rendering with some of the path groups.
2011-08-26 12:54:49 -04:00
kangax
48da79220f
Fix fabric parser to workaround o3-xml bug with gEBTN("*")
2011-08-16 19:05:17 -04:00
kangax
b53d794af6
[BACK_INCOMPAT] Custom fabric build is now created with node.js and is much more flexible. Sprockets is no longer required to build fabric. Parser and node are now optional modules, which means that parseSVGDocument is no longer included in default fabric build.
2011-08-14 17:35:36 -04:00
kangax
a41fd5dffd
Closes #43 . fabric.Text#set can now accept object with property/values.
2011-08-12 13:46:17 -04:00
kangax
8f819bb760
Fabric can now run under node.js
2011-08-11 15:18:18 -04:00
kangax
35ad4bf6e3
Preparing fabric to run on node.js
2011-08-05 19:00:26 -04:00
kangax
a5b22895e7
canvas.fx --> canvas.animation
2011-08-04 21:00:44 -04:00
kangax
27999a327c
Add unit tests for fabric.loadSVGFromString.
2011-08-04 20:48:25 -04:00
kangax
044866cf44
Document fabric.loadSVGFromString. Replace canvas.loadSVGFromURL with fabric.loadSVGFromURL.
2011-08-04 11:05:40 -04:00
kangax
ace016c694
[BACK_INCOMPAT] fabric.Canvas#loadSVGFromURL --> fabric.loadSVGFromURL. Add fabric.loadSVGFromString.
2011-08-04 10:59:32 -04:00
kangax
04bb0aad66
Add "hasControls" and "hasBorders" options to fabric.Object. "hasControls", when set to false allows to fully disable controls rendering (and mouse detection); hasBorders does the same for object borders. Fix failing unit tests. Update QUnit.
2011-08-02 19:35:02 -04:00
kangax
b9dcfcf2c8
Fix bug when text objects were rendered with blue background when part of the selection.
2011-08-02 18:15:20 -04:00
kangax
9690f0849e
Fix bug with fabric.Text which would make text objects render with "drag handles" when part of the selection.
2011-08-02 17:50:13 -04:00
kangax
b33b722a3b
Fix missing references in canvas.serialization module.
2011-07-27 18:09:43 -04:00
kangax
73004e388f
Fix loadImageFromURL not invoking callback for cached images in Chrome.
2011-07-26 15:40:29 -04:00
kangax
6e8d9da003
Pass original event to "mouse:down" and "mouse:up" ones. Pass target to "mouse:move". This normalizes what's passed to events — target and event.
2011-07-26 14:06:04 -04:00
kangax
29ae6b8f0f
Closes #40 . Objects, boundaries of which are fully contained within boundaries of other objects are now sent to back/forward properly (via canvas.sendBackwards/canvas.bringForward).
2011-07-26 00:20:57 -04:00
kangax
aa885ee458
Change default font family of fabric.Text objects to "Times New Roman".
2011-07-26 00:19:47 -04:00
kangax
76b67aa34c
[BACK_INCOMPAT] More consistent option names in fabric.Text: fontfamily --> fontFamily, fontsize --> fontSize, fontweight --> fontWeight (similarly to other options, like textShadow, textDecoration, fontStyle, etc.)
2011-07-21 20:32:02 -04:00
kangax
7c03c115ac
Fix bug with extend not being defined.
2011-07-21 16:49:43 -04:00
kangax
e3dd685f1b
Add support for "textAlign" in fabric.Text. Could be any of "left", "center", or "right" values. Works with multiline text.
2011-07-21 14:53:48 -04:00
kangax
3bd5d8c1a3
Add grayscale example to customization demo. Add "mouse:move" event to fabric.Canvas and a corresponding demo.
2011-07-18 14:36:17 -04:00
kangax
b99a456989
Build files are now organized in such way that it's possible to build fabric w/o support for text and/or serialization.
2011-07-15 18:16:14 -04:00
kangax
89c030ebdf
Closes #18 . Less confusing method names: removeActiveObject --> discardActiveObject, removeActiveGroup --> discardActiveGroup (since both of those methods don't actually _remove_ objects). [BACK_INCOMPAT]
2011-07-15 11:39:48 -04:00
kangax
c046bbd5f1
Closes #34 — Support multiple sequences of command arguments in SVG paths.
2011-07-09 15:50:44 -04:00
kangax
15aef846e3
Move fx-related methods from canvas.class.js to a separate canvas.fx.js "module".
2011-07-09 12:18:51 -04:00
kangax
48a02e5ecb
Path objects that are part of the group now have 'group' property that references their parent group. Path that are part of the group are now positioned in better accordance with spec.
2011-07-09 11:10:40 -04:00
kangax
85a256a8e7
Make events more consistent.
...
"object:moved" --> "object:moving" (since it's a continuously fired event).
"object:scaled" is gone (since this case can be solved with "object:modified").
"group:modified" is gone (since this case can be solved with "object:modified").
"group:selected" --> "selection:created".
"before:group:destroyed" --> "before:selection:cleared" (only fires when there is active object or group).
"after:group:destroyed" --> "selection:cleared" (only fires when there is active object or group).
2011-07-06 15:12:44 -04:00
kangax
2b3a166d2f
fabric.util.animate is now defined in util/misc.js rather than util/dom_misc.js as it has nothing to do with DOM.
2011-07-06 14:38:56 -04:00
kangax
e3c311dfb5
Add support for elliptical arc commands (a, A) in SVG paths. Thanks @devongovett for initial code (and algorithm). Add 4 different arc test files (can be loaded in kitchensink demo).
2011-07-05 01:28:03 -04:00
kangax
5fc29b1dbb
Add fabric.Object#animate. Tests to come.
2011-07-04 23:28:32 -04:00
kangax
0e3831ed6f
Expose cursor style for hovered objects through fabric.Canvas#HOVER_CURSOR for customization purposes.
2011-07-02 01:33:43 -04:00
kangax
1bed43e3c4
Add unit tests for fabric.Observable. fabric.Canvas#observe can now accept object — canvas.observe({ event1: ..., event2: ... }).
2011-07-02 01:19:32 -04:00
kangax
dcb6ac67a5
"mouse:down" and "mouse:up" events are now being passed clicked target (when one exists). Add example with opacity and no boundaries (transparent boundaries) on an object.
2011-06-30 14:46:30 -04:00
kangax
a64f622e61
Bump version to 0.3. Experiment with using native canvas fillText for fabric.Text. Turns out multiline text is not supported natively. Will experiment more.
2011-06-30 14:37:39 -04:00
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
fbe3246e68
Merge remote-tracking branch 'cleercode/gh-pages' into gh-pages
2011-06-28 00:35:42 -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
Chris Lee
bef5e8310a
Activate mousedown only on left clicks
2011-06-03 11:15:56 -07:00
Chris Lee
0bf40b8bef
Fix for line width
2011-05-31 11:23:30 -07:00
Chris Lee
dce11e13ae
Global selection enable/disable through canvas.selection option
2011-05-31 10:56:09 -07:00