animate will now return a function to stop the animation Shachar Nencel
improvements to the optional eraser brush plugin Shachar Nencel
Version 4.5.0 and 4.5.1
Introduced fabric RTL support for text/itext and an optional mixin with an eraser brush.
Version 4.4.0
The highlights of this versions are:
We added target to each selection event, so you can stop using this, and you can use fat arrows function freely for event handling. This is a change of direction, so if you notice some event that can benefit from having the target specified rather than using the this keyword, please open an issue and we can address it.
A new property on pencil brush, limitedToCanvasSize will let you stop drawing outside the canvas.
There is a new property on objects that is currently an experiment.
We do want to support a more flexible way to select objects, so we added a property, called activeOn, that will let you specify up or down and this will let you select the object either on mousedown/touchstart or mouseup/touchend, to account for interactions with dragging for example.
Now this is an experiment, meaning that we want to add more flavours to it, like for example, can it be multi selected? Can it be shift selected, can it be drag selected?
You can experiment with this value, but you have to consider the behaviour may slightly change and you will have to correct your app later on.
Consider it a beta feature. We marked it as @private in the docs, and we clarified it as experimental.
There are an handful of fixes, some of them found and contributed back from developers outside the project.
Thank you @zhangshine, @rileygowan @CharlesRA.
Version 4.3.1
Improved feature: Text on a path now has better angles and better spread of chars over the curve.
Also 3 bugs fixed and small improvements.
A special thanks to those people for contributing in this release:
RajKastriot Salihu
Version 4.3.0
New feature: Text on a path!
This was a long time requested feature, with the name of curved text. We decided to go to path support, and leave developers figure out how to do a path that looks like a curve.
This feature is still in BETA, meaning that it renders correctly, with most features of static text.
It does not account for text editing or wrapping or multiline.
(check pr #6543)
Another new feature of this release is the ability to specify control size per control rather than per obejct.
fabric.Control.sizeX and fabric.Control.sizeY will take precedence on cornerSize.
(check pr #6562)
Just minor fixes, mouseup event can again have a different target compared to mousedown, and the textbox controls correctly fire a resize event rather than a scaling one.
Version 4.1.0
Added a before:path:created event, as a user request, in order to handle brushes objects before they get added to canvas.
Generic Path change of logic. Now complex SVG paths are simplified into an absolute only command version. On top of that, A, S, T, V and H commands are converted to C, Q and L. With this done, it is simpler to connect custom controls to path properties, and also it made it possible to add a path measure utility that we will need to implement the long requested text on a path feature.
Version 4.0.0
Added a new api to handle controls customizations. Read more here controls api
Just backporting some generic fixes from the 4.0 work.
Version 3.6.3
Mostly backporting work that happened after 4 beta to version 3 branch
Version 3.6.2
Version 3.6.1
Version 3.6.0
Version 3.5.1
Version 3.5.0
Version 3.4.0
Huge rewrite of gradient parsing! Now gradients have a property more called gradientUnits and allow to specify gradients with percentages.
A couple of deprecation for Object.setGradient. A new doc page explaining gradients from top to bottom coming soon.
Version 3.3.0
Rewrite pointer/touch events! It seems now that pointer events and touch events can work correctly with multi fingers.
Attention has been made in freedrawing with accidental multi touch usage and ability to work with pencils.
Also a small fix for the word boundaries in text.
Some deprecation on old event properties required another minor version bump.
Version 3.2.0
This version is mainly a bug fix release for the new feature. It gets a minor bump because of official deprecation of Object.transformMatrix.
Version 3.1.0
A new property to the pencil brush has been added. The decimate will allow you to remove extra points to the brush and simplify the outcoming path.
also when parsing floats from SVG, now scientific notation with uppercase E is supported.
Version 3.0.0
Support for Node 4 and 6 is removed, now fabricJS uses JSDOM 15.1 also as SVG parser under node, and uses node-canvas 2.5+.
This brings improved support under node, including better text support.
splitByGrapheme and strokeUniform have been properly fixed.
Some new properties: fabric.Shadow gets nonScaling that makes the shadow fixed during scaling operations, fabric.disableStyleCopyPaste
will control style copy/pasting during copy operations between IText and Textbox objects. Finally Canvas.enablePointerEvents will let you use
pointer events instead of mouse events.
For image filtering fabric.forceGLPutImageData will let you set a slower but more compatible webgl texture copy. This helps on computer running on old intel hardware.
Detecting the presence of the hardware is developer duty.
Finally fabric.Object.objectCaching set to false will disable objectCaching only if current setup does not require it. Is not more a preference than a mandatory setting.
If an object has a clipPath, objectCaching will be automatically activated.
Add: strokeUniform property, avoid stroke scaling with paths #5473
Fix: fix bug in image setSrc #5502
Add: strokeUniform import/export svg #5527
Fix: GraphemeSplit and toSvg for circle #5544
Improvement: support running in a XML document #5530```
Version 2.6.0
Mostly svg fixes for this release, on input and output
Fix: Shift click and onSelect function #5348
Fix: Load from Json from images with filters and resize filters #5346```
Version 2.4.6
Mostly svg fixes for this release, on input and output
Fix: Shift click and onSelect function #5348
Fix: Load from Json from images with filters and resize filters #5346```
Version 2.4.4
Fix: Shift click and onSelect function #5348
Fix: Load from Json from images with filters and resize filters #5346
Fix: Remove special case of 1x1 rect #5345
Fix: Group with clipPath restore #5344
Fix: Fix shift + click interaction with unselectable objects #5324```
Version 2.4.2
Clippath to SVG fixed, a couple of nice bugfixes for targeting in nested groups and svg loading in ie11
Fix: Avoid enterEditing if another object is the activeObject #5261
Fix: clipPath enliving for Image fromObject #5279
Fix: toDataURL and canvas clipPath #5278
Fix: early return if no xml is available #5263
Fix: clipPath svg parsing in nodejs #5262
Fix: Avoid running selection logic on mouse up #5259
Fix: fix font size parsing on SVG #5258
Fix: Avoid extra renders on mouseUp/Down #5256```
Version 2.4.0
Launched clipPath support, check tutorial for more info ClipPath tutorials
Version 2.3.6
Fixed a regression in spray brush created by the 2.3.5 group fix.
Make the image class aware of natural dimensions of the image element if available and restored two fingers events that were broken since we improved the normal events.
The issue of iText interaction fixed in 2.3.5 has been reopened with a less common interaction problem. We are working on automated interaction tests before fixing it.
Version 2.3.5
2 notable changes! From now canvas.getObjects() will return a copy of the array of objects. The documentation was never clear about what was given back. Not returning a copy was creating subtle strange bugs that often took hours to debug. Also resize filters and color filters should interact properly with each other now. On top of this minor improvements in svg import export.
Version 2.3.4
Lot of bug fixes and improvement by contributors. A big news: we have an automated visual tests suite that works across browser, node and travis.
Notable changes:
Version 2.3.3
Some well reported bugs got easily fixed. Generic fonts like serif, sans-serif, monospace works again. We were quoting the font name for all fonts in order to avoid problem with fonts starting with numbers or with spaces in the family name, but it looks like that you cannot do that for serif, sans-serif, fantasy, monospace and cursive. Those are sort of reserved name and must be used without quotes. Fabric was leaving trails of text selection if a fast zoom would happen when an itext had selected text or blinking cursor. While this is an edge case created by developers, the fix was fairly easy and so we fixed it. Also zero width characters were correctly measured but then wrongly retrieved from measuring cache. That whould mean that text would break and also that there was a performance hit ( very small ) since a 0 width joiner, spacer, non joiner was always measured and never returned from cache. All the fix have been handled in a single PR that you can check here: #5048
Version 2.3.2
Lot of small IText fixes and a group caching bug removed.
Add and improve more events for transformations and mouse interaction #4979
Improvement: whenever possible use cache for target transparency sampling #4955```
Version 2.2.4
Just fixes to brushes, filters and events mostly coming from contributors.
A new method is added isPartiallyOnscreen for objects, helps you identify when the object is crossing your viewport boundaries and an important bug in statefull processing is fixed that was causing type errors when comparing an array with null or an object with null or a string
Version 2.2.3
There are mixed changes. Most of them are about toSVG and fromSVG without new big features.
There 2 changes that may interests you and change how your code behaves:
When rotating an object by mouse, the origins are no more forced to be centered, that means that top and left of the rotating object
will not change to centerPoint without you asking for that. Top and Left will change accordingly to what you see on screen, like it happens
for scale, skew and translate. Is a good change, but it may be considered a behaviour change. I did not feel like leave it like this nor to issue
a major version for it.
Another change is that setSrc on image is also going to reset width and heigth to the one of the element. Since width and height now crop an image
or just render it with white space around if dimensions do not match, changing width and heigth back to default is something that i consider a bugfix.
If you built a feature between 2.0 and 2.2.2 that rely on swapping image sources and not changing widht and height, this may gonna break.
Version 2.2.2
Version 2.2.0
Version 2.1.0
New events! now objects and canvas can fire drop, dragover, dragleave and dragenter
Refer to our events demo for an introduction, specific demo coming soon: Events demo.
Also an important fix for styled textboxes, and more to come, since some methods are marked as broken in the current JSDOC sources.
Since it has been requested, the amd footer has been inserted in the standard fabricjs build, removing the need to have 2 files built every time.
Version 2.0.3
This time is contributors time!
@boomayao noticed that the pencilBrush was doing too much work and wrote a function to draw just the new segment, @stefanhayden fixed the clanStyle function for text styles, @scriptspry fixed a weird interaction between onBeforeScaleRotate and canvasZoom, @blucobalto reported the exact line and problem of a group subclass problem.
Version 2.0.2
Fix image toSVG export for images with cropping. Improved math around coordinates to avoid long decimals
Version 2.0.1
Fix a bad mutation problem for filters in Image restore from JSON, also the interaction between retina and dataURL. Both bugfixes coming from contributors.