Comparing version 2.3.1 to 2.3.2
@@ -0,1 +1,8 @@ | ||
**Version 2.3.2** | ||
- Fix: justify + charspacing + textDecoration Add and improve more events for transformations and mouse interaction. [#5007](https://github.com/fabricjs/fabric.js/pull/5007) [#5009](https://github.com/fabricjs/fabric.js/pull/5009) | ||
- Fix: Enter edit on object selected programmatically. [#5010](https://github.com/fabricjs/fabric.js/pull/5010) | ||
- Fix: Canvas.dispose was not removing all events properly. [#5020](https://github.com/fabricjs/fabric.js/pull/5020) | ||
- Fix: Make rgba and hsla regex work case insensitive. [#5017](https://github.com/fabricjs/fabric.js/pull/5017) | ||
- Fix: Make group transitioning from not cached to cached work. [#5021](https://github.com/fabricjs/fabric.js/pull/5021) | ||
**Version 2.3.1** | ||
@@ -2,0 +9,0 @@ - Improve nested svg import and text positioning, spikes. [#4984](https://github.com/kangax/fabric.js/pull/4984) |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://fabricjs.com/", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"author": "Juriy Zaytsev <kangax@gmail.com>", | ||
@@ -8,0 +8,0 @@ "contributors": [ |
@@ -176,2 +176,21 @@ (function(){ | ||
QUnit.test('fromRgb (uppercase)', function(assert) { | ||
assert.ok(typeof fabric.Color.fromRgb === 'function'); | ||
var originalRgb = 'RGB(255,255,255)'; | ||
var oColor = fabric.Color.fromRgb(originalRgb); | ||
assert.ok(oColor); | ||
assert.ok(oColor instanceof fabric.Color); | ||
assert.equal(oColor.toHex(), 'FFFFFF'); | ||
}); | ||
QUnit.test('fromRgba (uppercase)', function(assert) { | ||
assert.ok(typeof fabric.Color.fromRgba === 'function'); | ||
var originalRgba = 'RGBA(255,255,255,0.5)'; | ||
var oColor = fabric.Color.fromRgba(originalRgba); | ||
assert.ok(oColor); | ||
assert.ok(oColor instanceof fabric.Color); | ||
assert.equal(oColor.toHex(), 'FFFFFF'); | ||
assert.equal(oColor.getAlpha(), 0.5, 'alpha should be set properly'); | ||
}); | ||
QUnit.test('fromRgba', function(assert) { | ||
@@ -257,2 +276,23 @@ assert.ok(typeof fabric.Color.fromRgba === 'function'); | ||
QUnit.test('fromHsl (uppercase)', function(assert) { | ||
assert.ok(typeof fabric.Color.fromHsl === 'function'); | ||
var originalHsl = 'HSL(270,50%,40%)'; | ||
var oColor = fabric.Color.fromHsl(originalHsl); | ||
assert.ok(oColor); | ||
assert.ok(oColor instanceof fabric.Color); | ||
assert.equal(oColor.toHex(), '663399'); | ||
assert.equal(oColor.toRgba(), 'rgba(102,51,153,1)'); | ||
}); | ||
QUnit.test('fromHsla (uppercase)', function(assert) { | ||
assert.ok(typeof fabric.Color.fromHsla === 'function'); | ||
var originalHsla = 'HSLA(108,50%,50%,0.7)'; | ||
var oColor = fabric.Color.fromHsla(originalHsla); | ||
assert.ok(oColor); | ||
assert.ok(oColor instanceof fabric.Color); | ||
assert.equal(oColor.toHex(), '59BF40'); | ||
assert.equal(oColor.toRgba(), 'rgba(89,191,64,0.7)'); | ||
assert.equal(oColor.getAlpha(), 0.7, 'alpha should be set properly'); | ||
}); | ||
QUnit.test('fromHsla', function(assert) { | ||
@@ -259,0 +299,0 @@ assert.ok(typeof fabric.Color.fromHsla === 'function'); |
@@ -30,2 +30,11 @@ (function(){ | ||
}); | ||
QUnit.test('_mouseDownHandlerBefore set up selected property', function(assert) { | ||
var iText = new fabric.IText('test need some word\nsecond line'); | ||
assert.equal(iText.selected, undefined, 'iText has no selected property'); | ||
iText.canvas = { | ||
_activeObject: iText, | ||
}; | ||
iText._mouseDownHandlerBefore({ e: {} }); | ||
assert.equal(iText.selected, true, 'iText has selected property'); | ||
}); | ||
})(); |
@@ -1022,2 +1022,11 @@ (function(){ | ||
QUnit.test('_createCacheCanvas sets object as dirty', function(assert) { | ||
var object = new fabric.Object({ scaleX: 3, scaleY: 2, width: 1, height: 2}); | ||
assert.equal(object.dirty, true, 'object is dirty after creation'); | ||
object.dirty = false; | ||
assert.equal(object.dirty, false, 'object is not dirty after specifying it'); | ||
object._createCacheCanvas(); | ||
assert.equal(object.dirty, true, 'object is dirty again if cache gets created'); | ||
}); | ||
QUnit.test('isCacheDirty statefullCache disabled', function(assert) { | ||
@@ -1029,3 +1038,2 @@ var object = new fabric.Object({ scaleX: 3, scaleY: 2, width: 1, height: 2}); | ||
object.statefullCache = false; | ||
object._createCacheCanvas(); | ||
assert.equal(object.isCacheDirty(), false, 'object is not dirty if dirty flag is false'); | ||
@@ -1043,5 +1051,2 @@ object.dirty = true; | ||
object.setupState({ propertySet: 'cacheProperties' }); | ||
object._createCacheCanvas(); | ||
assert.equal(object.isCacheDirty(), true, 'object is dirty if canvas has been just created'); | ||
object.setupState({ propertySet: 'cacheProperties' }); | ||
assert.equal(object.isCacheDirty(), false, 'object is not dirty'); | ||
@@ -1048,0 +1053,0 @@ object.propA = 'B'; |
@@ -725,2 +725,9 @@ (function() { | ||
QUnit.test('clearFabricFontCache wrong case', function(assert) { | ||
fabric.charWidthsCache = { arial: { some: 'cache'}, helvetica: { some: 'cache'} }; | ||
fabric.util.clearFabricFontCache('ARIAL'); | ||
assert.equal(fabric.charWidthsCache.arial, undefined, 'arial cache is deleted'); | ||
assert.equal(fabric.charWidthsCache.helvetica.some, 'cache', 'helvetica cache is still available'); | ||
}); | ||
QUnit.test('parsePreserveAspectRatioAttribute', function(assert) { | ||
@@ -727,0 +734,0 @@ assert.ok(typeof fabric.util.parsePreserveAspectRatioAttribute === 'function'); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11376749
49155