Comparing version 1.6.5 to 1.6.6
@@ -239,2 +239,4 @@ var fs = require('fs'), | ||
ifSpecifiedInclude('image_filters', 'src/filters/colormatrix_filter.class.js'), | ||
ifSpecifiedInclude('image_filters', 'src/filters/contrast_filter.class.js'), | ||
ifSpecifiedInclude('image_filters', 'src/filters/saturate_filter.class.js'), | ||
@@ -241,0 +243,0 @@ ifSpecifiedInclude('text', 'src/shapes/text.class.js'), |
@@ -0,1 +1,8 @@ | ||
**Version 1.6.6** | ||
- Add: Contrast and Saturate filters [#3341](https://github.com/kangax/fabric.js/pull/3341) | ||
- Fix: Correct registering and removal of events to handle iText objects. [#3349](https://github.com/kangax/fabric.js/pull/3349) | ||
- Fix: Corrected 2 regression of 1.6.5 (dataurl export and itext clicks) | ||
- Fix: Corrected path boundaries calculation for Arcs ( a and A ) [#3347](https://github.com/kangax/fabric.js/pull/3347) | ||
**Version 1.6.5** | ||
@@ -2,0 +9,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://fabricjs.com/", | ||
"version": "1.6.5", | ||
"version": "1.6.6", | ||
"author": "Juriy Zaytsev <kangax@gmail.com>", | ||
@@ -8,0 +8,0 @@ "contributors": [ |
@@ -167,5 +167,12 @@ ### Fabric | ||
$ npm test | ||
Make sure testem is installed | ||
$ npm install -g testem | ||
Run tests Chrome and Node (by default): | ||
$ testem | ||
See testem docs for more info: https://github.com/testem/testem | ||
### Demos | ||
@@ -172,0 +179,0 @@ |
@@ -53,3 +53,3 @@ (function() { | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('../fixtures/test_image.gif'), | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('test/fixtures/test_image.gif'), | ||
IMG_WIDTH = 276, | ||
@@ -490,2 +490,19 @@ IMG_HEIGHT = 110; | ||
test('toDataURL cropping', function() { | ||
ok(typeof canvas.toDataURL == 'function'); | ||
if (!fabric.Canvas.supports('toDataURL')) { | ||
window.alert('toDataURL is not supported by this environment. Some of the tests can not be run.'); | ||
} | ||
else { | ||
var croppingWidth = 75, | ||
croppingHeight = 50, | ||
dataURL = canvas.toDataURL({width: croppingWidth, height: croppingHeight}); | ||
fabric.Image.fromURL(dataURL, function (img) { | ||
equal(img.width, croppingWidth, 'Width of exported image should correspond to cropping width'); | ||
equal(img.height, croppingHeight, 'Height of exported image should correspond to cropping height'); | ||
}); | ||
} | ||
}); | ||
test('centerObjectH', function() { | ||
@@ -492,0 +509,0 @@ ok(typeof canvas.centerObjectH == 'function'); |
@@ -13,3 +13,3 @@ (function() { | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('../fixtures/test_image.gif'), | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('test/fixtures/test_image.gif'), | ||
IMG_WIDTH = 276, | ||
@@ -16,0 +16,0 @@ IMG_HEIGHT = 110; |
@@ -13,3 +13,3 @@ (function() { | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('../fixtures/test_image.gif'), | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('test/fixtures/test_image.gif'), | ||
IMG_WIDTH = 276, | ||
@@ -16,0 +16,0 @@ IMG_HEIGHT = 110; |
@@ -700,2 +700,30 @@ (function() { | ||
test('object removal from canvas', function() { | ||
canvas.clear(); | ||
canvas._iTextInstances = null; | ||
var text1 = new fabric.IText('Text Will be here'); | ||
var text2 = new fabric.IText('Text Will be here'); | ||
ok(!canvas._iTextInstances, 'canvas has no iText instances'); | ||
ok(!canvas._hasITextHandlers, 'canvas has no handlers'); | ||
canvas.add(text1); | ||
deepEqual(canvas._iTextInstances, [text1], 'canvas has 1 text instance'); | ||
ok(canvas._hasITextHandlers, 'canvas has handlers'); | ||
equal(canvas._iTextInstances.length, 1, 'just one itext object should be on canvas'); | ||
canvas.add(text2); | ||
deepEqual(canvas._iTextInstances, [text1, text2], 'canvas has 2 text instance'); | ||
ok(canvas._hasITextHandlers, 'canvas has handlers'); | ||
equal(canvas._iTextInstances.length, 2, 'just two itext object should be on canvas'); | ||
canvas.remove(text1); | ||
deepEqual(canvas._iTextInstances, [text2], 'canvas has 1 text instance'); | ||
ok(canvas._hasITextHandlers, 'canvas has handlers'); | ||
equal(canvas._iTextInstances.length, 1, 'just two itext object should be on canvas'); | ||
canvas.remove(text2); | ||
deepEqual(canvas._iTextInstances, [], 'canvas has 0 text instance'); | ||
ok(!canvas._hasITextHandlers, 'canvas has no handlers'); | ||
}); | ||
test('getCurrentCharColor', function() { | ||
@@ -702,0 +730,0 @@ var iText = new fabric.IText('test foo bar-baz\nqux', { |
@@ -17,3 +17,3 @@ (function(){ | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('../fixtures/test_image.gif'), | ||
var IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('test/fixtures/test_image.gif'), | ||
IMG_WIDTH = 276, | ||
@@ -379,3 +379,2 @@ IMG_HEIGHT = 110; | ||
equal(boundingRect.height, 0); | ||
cObj.set('width', 123).setCoords(); | ||
@@ -808,15 +807,10 @@ boundingRect = cObj.getBoundingRect(); | ||
var callbacks = { onComplete: onComplete, onChange: onChange }; | ||
ok(typeof object.fxStraighten == 'function'); | ||
equal(object.fxStraighten(callbacks), object, 'should be chainable'); | ||
equal(fabric.util.toFixed(object.get('angle'), 0), 43); | ||
setTimeout(function(){ | ||
ok(onCompleteFired); | ||
ok(onChangeFired); | ||
equal(object.get('angle'), 0, 'angle should be set to 0 by the end of animation'); | ||
equal(object.fxStraighten(), object, 'should work without callbacks'); | ||
start(); | ||
@@ -823,0 +817,0 @@ }, 1000); |
@@ -25,3 +25,3 @@ (function() { | ||
? require('path').join(__dirname, '../fixtures/', 'very_large_image.jpg') | ||
: getAbsolutePath('../fixtures/very_large_image.jpg'); | ||
: getAbsolutePath('test/fixtures/very_large_image.jpg'); | ||
@@ -28,0 +28,0 @@ var IMG_URL_NON_EXISTING = 'http://www.google.com/non-existing'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
11136320
72
54832
298