mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-11 23:33:10 +00:00
Fire "mouse:down", "mouse:move", "mouse:up" events during free drawing mode.
This commit is contained in:
parent
dd43c23e86
commit
5d803c9778
6 changed files with 15 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.8.21" };
|
||||
var fabric = fabric || { version: "0.8.22" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
9
dist/all.js
vendored
9
dist/all.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.8.21" };
|
||||
var fabric = fabric || { version: "0.8.22" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -5939,6 +5939,7 @@ fabric.util.string = {
|
|||
|
||||
if (this.isDrawingMode && this._isCurrentlyDrawing) {
|
||||
this._finalizeDrawingPath();
|
||||
this.fire('mouse:up', { e: e });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -5965,7 +5966,7 @@ fabric.util.string = {
|
|||
}
|
||||
|
||||
this._currentTransform = null;
|
||||
|
||||
|
||||
if (this._groupSelector) {
|
||||
// group selection was completed, determine its bounds
|
||||
this._findSelectedObjects(e);
|
||||
|
|
@ -6015,6 +6016,7 @@ fabric.util.string = {
|
|||
// capture coordinates immediately; this allows to draw dots (when movement never occurs)
|
||||
this._captureDrawingPath(e);
|
||||
|
||||
this.fire('mouse:down', { e: e });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -6025,7 +6027,7 @@ fabric.util.string = {
|
|||
pointer = this.getPointer(e),
|
||||
activeGroup = this.getActiveGroup(),
|
||||
corner;
|
||||
|
||||
|
||||
if (this._shouldClearSelection(e)) {
|
||||
|
||||
this._groupSelector = {
|
||||
|
|
@ -6081,6 +6083,7 @@ fabric.util.string = {
|
|||
if (this._isCurrentlyDrawing) {
|
||||
this._captureDrawingPath(e);
|
||||
}
|
||||
this.fire('mouse:move', { e: e });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
4
dist/all.min.js
vendored
4
dist/all.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/all.min.js.gz
vendored
BIN
dist/all.min.js.gz
vendored
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "fabric",
|
||||
"description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.",
|
||||
"version": "0.8.21",
|
||||
"version": "0.8.22",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
|
||||
"repository": "git://github.com/kangax/fabric.js",
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@
|
|||
|
||||
if (this.isDrawingMode && this._isCurrentlyDrawing) {
|
||||
this._finalizeDrawingPath();
|
||||
this.fire('mouse:up', { e: e });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +233,7 @@
|
|||
}
|
||||
|
||||
this._currentTransform = null;
|
||||
|
||||
|
||||
if (this._groupSelector) {
|
||||
// group selection was completed, determine its bounds
|
||||
this._findSelectedObjects(e);
|
||||
|
|
@ -282,6 +283,7 @@
|
|||
// capture coordinates immediately; this allows to draw dots (when movement never occurs)
|
||||
this._captureDrawingPath(e);
|
||||
|
||||
this.fire('mouse:down', { e: e });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +294,7 @@
|
|||
pointer = this.getPointer(e),
|
||||
activeGroup = this.getActiveGroup(),
|
||||
corner;
|
||||
|
||||
|
||||
if (this._shouldClearSelection(e)) {
|
||||
|
||||
this._groupSelector = {
|
||||
|
|
@ -348,6 +350,7 @@
|
|||
if (this._isCurrentlyDrawing) {
|
||||
this._captureDrawingPath(e);
|
||||
}
|
||||
this.fire('mouse:move', { e: e });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue