mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-01 02:24:42 +00:00
Build distribution
This commit is contained in:
parent
3e06f4127d
commit
1335cf6932
4 changed files with 62 additions and 18 deletions
34
dist/fabric.js
vendored
34
dist/fabric.js
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/* build: `node build.js modules=ALL exclude=gestures,cufon,json minifier=uglifyjs` */
|
||||
/*! Fabric.js Copyright 2008-2013, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
/*! Fabric.js Copyright 2008-2014, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "1.4.4" };
|
||||
if (typeof exports !== 'undefined') {
|
||||
|
|
@ -8577,14 +8577,20 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
|
|||
_onMouseDown: function (e) {
|
||||
this.__onMouseDown(e);
|
||||
|
||||
addListener(fabric.document, 'mouseup', this._onMouseUp);
|
||||
addListener(fabric.document, 'touchend', this._onMouseUp);
|
||||
|
||||
addListener(fabric.document, 'mousemove', this._onMouseMove);
|
||||
addListener(fabric.document, 'touchmove', this._onMouseMove);
|
||||
|
||||
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
|
||||
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
|
||||
|
||||
if (e.type === 'touchstart') {
|
||||
// Unbind mousedown to prevent double triggers from touch devices
|
||||
removeListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
|
||||
}
|
||||
else {
|
||||
addListener(fabric.document, 'mouseup', this._onMouseUp);
|
||||
addListener(fabric.document, 'mousemove', this._onMouseMove);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -8602,6 +8608,14 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
|
|||
|
||||
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
|
||||
addListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
|
||||
|
||||
if (e.type === 'touchend') {
|
||||
// Wait 400ms before rebinding mousedown to prevent double triggers
|
||||
// from touch devices
|
||||
setTimeout(function() {
|
||||
addListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
|
||||
}, 400);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -9440,7 +9454,9 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
|
||||
ctx = this.contextTop || this.contextContainer;
|
||||
|
||||
this.setWidth(scaledWidth).setHeight(scaledHeight);
|
||||
if (multiplier > 1) {
|
||||
this.setWidth(scaledWidth).setHeight(scaledHeight);
|
||||
}
|
||||
ctx.scale(multiplier, multiplier);
|
||||
|
||||
if (cropping.left) {
|
||||
|
|
@ -9452,9 +9468,15 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
if (cropping.width) {
|
||||
cropping.width *= multiplier;
|
||||
}
|
||||
else if (multiplier < 1) {
|
||||
cropping.width = scaledWidth;
|
||||
}
|
||||
if (cropping.height) {
|
||||
cropping.height *= multiplier;
|
||||
}
|
||||
else if (multiplier < 1) {
|
||||
cropping.height = scaledHeight;
|
||||
}
|
||||
|
||||
if (activeGroup) {
|
||||
// not removing group due to complications with restoring it with correct state afterwords
|
||||
|
|
@ -12394,7 +12416,7 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
|
|||
top + height + scaleOffsetSizeY + strokeWidth2 + paddingY);
|
||||
|
||||
// middle-right
|
||||
this._drawControl('mb', ctx, methodName,
|
||||
this._drawControl('mr', ctx, methodName,
|
||||
left + width + scaleOffsetSizeX + strokeWidth2 + paddingX,
|
||||
top + height/2 - scaleOffsetY);
|
||||
|
||||
|
|
|
|||
12
dist/fabric.min.js
vendored
12
dist/fabric.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/fabric.min.js.gz
vendored
BIN
dist/fabric.min.js.gz
vendored
Binary file not shown.
34
dist/fabric.require.js
vendored
34
dist/fabric.require.js
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/* build: `node build.js modules=ALL exclude=gestures,cufon,json minifier=uglifyjs` */
|
||||
/*! Fabric.js Copyright 2008-2013, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
/*! Fabric.js Copyright 2008-2014, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "1.4.4" };
|
||||
if (typeof exports !== 'undefined') {
|
||||
|
|
@ -8577,14 +8577,20 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
|
|||
_onMouseDown: function (e) {
|
||||
this.__onMouseDown(e);
|
||||
|
||||
addListener(fabric.document, 'mouseup', this._onMouseUp);
|
||||
addListener(fabric.document, 'touchend', this._onMouseUp);
|
||||
|
||||
addListener(fabric.document, 'mousemove', this._onMouseMove);
|
||||
addListener(fabric.document, 'touchmove', this._onMouseMove);
|
||||
|
||||
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
|
||||
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
|
||||
|
||||
if (e.type === 'touchstart') {
|
||||
// Unbind mousedown to prevent double triggers from touch devices
|
||||
removeListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
|
||||
}
|
||||
else {
|
||||
addListener(fabric.document, 'mouseup', this._onMouseUp);
|
||||
addListener(fabric.document, 'mousemove', this._onMouseMove);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -8602,6 +8608,14 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
|
|||
|
||||
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
|
||||
addListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
|
||||
|
||||
if (e.type === 'touchend') {
|
||||
// Wait 400ms before rebinding mousedown to prevent double triggers
|
||||
// from touch devices
|
||||
setTimeout(function() {
|
||||
addListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
|
||||
}, 400);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -9440,7 +9454,9 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
|
||||
ctx = this.contextTop || this.contextContainer;
|
||||
|
||||
this.setWidth(scaledWidth).setHeight(scaledHeight);
|
||||
if (multiplier > 1) {
|
||||
this.setWidth(scaledWidth).setHeight(scaledHeight);
|
||||
}
|
||||
ctx.scale(multiplier, multiplier);
|
||||
|
||||
if (cropping.left) {
|
||||
|
|
@ -9452,9 +9468,15 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
if (cropping.width) {
|
||||
cropping.width *= multiplier;
|
||||
}
|
||||
else if (multiplier < 1) {
|
||||
cropping.width = scaledWidth;
|
||||
}
|
||||
if (cropping.height) {
|
||||
cropping.height *= multiplier;
|
||||
}
|
||||
else if (multiplier < 1) {
|
||||
cropping.height = scaledHeight;
|
||||
}
|
||||
|
||||
if (activeGroup) {
|
||||
// not removing group due to complications with restoring it with correct state afterwords
|
||||
|
|
@ -12394,7 +12416,7 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
|
|||
top + height + scaleOffsetSizeY + strokeWidth2 + paddingY);
|
||||
|
||||
// middle-right
|
||||
this._drawControl('mb', ctx, methodName,
|
||||
this._drawControl('mr', ctx, methodName,
|
||||
left + width + scaleOffsetSizeX + strokeWidth2 + paddingX,
|
||||
top + height/2 - scaleOffsetY);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue