fabric 5.2.4 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/HEADER.js
CHANGED
package/dist/fabric.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* build: `node build.js modules=ALL exclude=gestures,accessors,erasing requirejs minifier=uglifyjs` */
|
|
2
2
|
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
|
3
3
|
|
|
4
|
-
var fabric = fabric || { version: '5.
|
|
4
|
+
var fabric = fabric || { version: '5.3.0' };
|
|
5
5
|
if (typeof exports !== 'undefined') {
|
|
6
6
|
exports.fabric = fabric;
|
|
7
7
|
}
|
|
@@ -1858,6 +1858,7 @@ fabric.CommonMethods = {
|
|
|
1858
1858
|
prevStyle.fontFamily !== thisStyle.fontFamily ||
|
|
1859
1859
|
prevStyle.fontWeight !== thisStyle.fontWeight ||
|
|
1860
1860
|
prevStyle.fontStyle !== thisStyle.fontStyle ||
|
|
1861
|
+
prevStyle.textBackgroundColor !== thisStyle.textBackgroundColor ||
|
|
1861
1862
|
prevStyle.deltaY !== thisStyle.deltaY) ||
|
|
1862
1863
|
(forTextSpans &&
|
|
1863
1864
|
(prevStyle.overline !== thisStyle.overline ||
|
|
@@ -1891,7 +1892,7 @@ fabric.CommonMethods = {
|
|
|
1891
1892
|
charIndex++;
|
|
1892
1893
|
var thisStyle = styles[i][c];
|
|
1893
1894
|
//check if style exists for this character
|
|
1894
|
-
if (thisStyle) {
|
|
1895
|
+
if (thisStyle && Object.keys(thisStyle).length > 0) {
|
|
1895
1896
|
var styleChanged = fabric.util.hasStyleChanged(prevStyle, thisStyle, true);
|
|
1896
1897
|
if (styleChanged) {
|
|
1897
1898
|
stylesArray.push({
|
|
@@ -21987,13 +21988,14 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|
|
21987
21988
|
* @param {Number} width The width to initialize the texture at.
|
|
21988
21989
|
* @param {Number} height The height to initialize the texture.
|
|
21989
21990
|
* @param {HTMLImageElement|HTMLCanvasElement} textureImageSource A source for the texture data.
|
|
21991
|
+
* @param {Number} filterType gl.NEAREST or gl.LINEAR usually, webgl numeri constants
|
|
21990
21992
|
* @returns {WebGLTexture}
|
|
21991
21993
|
*/
|
|
21992
|
-
createTexture: function(gl, width, height, textureImageSource) {
|
|
21994
|
+
createTexture: function(gl, width, height, textureImageSource, filterType) {
|
|
21993
21995
|
var texture = gl.createTexture();
|
|
21994
21996
|
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
21995
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
21996
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
21997
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filterType || gl.NEAREST);
|
|
21998
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filterType || gl.NEAREST);
|
|
21997
21999
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
21998
22000
|
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
21999
22001
|
if (textureImageSource) {
|
|
@@ -29684,7 +29686,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|
|
29684
29686
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=870966
|
|
29685
29687
|
this.hiddenTextarea.style.cssText = 'position: absolute; top: ' + style.top +
|
|
29686
29688
|
'; left: ' + style.left + '; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px;' +
|
|
29687
|
-
' padding
|
|
29689
|
+
' padding-top: ' + style.fontSize + ';';
|
|
29688
29690
|
|
|
29689
29691
|
if (this.hiddenTextareaContainer) {
|
|
29690
29692
|
this.hiddenTextareaContainer.appendChild(this.hiddenTextarea);
|