mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 20:04:45 +00:00
Merge master
This commit is contained in:
commit
83582467d6
7 changed files with 37 additions and 63 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.8.22" };
|
||||
var fabric = fabric || { version: "0.8.23" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
47
dist/all.js
vendored
47
dist/all.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.8.22" };
|
||||
var fabric = fabric || { version: "0.8.23" };
|
||||
|
||||
if (typeof exports != 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -4788,20 +4788,6 @@ fabric.util.string = {
|
|||
*/
|
||||
clipTo: null,
|
||||
|
||||
/**
|
||||
* Default canvas width
|
||||
* @constant
|
||||
* @type Number
|
||||
*/
|
||||
CANVAS_WIDTH: 600,
|
||||
|
||||
/**
|
||||
* Default canvas height
|
||||
* @constant
|
||||
* @type Number
|
||||
*/
|
||||
CANVAS_HEIGHT: 600,
|
||||
|
||||
/**
|
||||
* Callback; invoked right before object is about to be scaled/rotated
|
||||
* @method onBeforeScaleRotate
|
||||
|
|
@ -5833,31 +5819,31 @@ fabric.util.string = {
|
|||
|
||||
/**
|
||||
* Default cursor value used when hovering over an object on canvas
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
HOVER_CURSOR: 'move',
|
||||
hoverCursor: 'move',
|
||||
|
||||
/**
|
||||
* Default cursor value used for the entire canvas
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
CURSOR: 'default',
|
||||
defaultCursor: 'default',
|
||||
|
||||
/**
|
||||
* Cursor value used for rotation point
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
ROTATION_CURSOR: 'crosshair',
|
||||
rotationCursor: 'crosshair',
|
||||
|
||||
/**
|
||||
* Default element class that's given to wrapper (div) element of canvas
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
CONTAINER_CLASS: 'canvas-container',
|
||||
containerClass: 'canvas-container',
|
||||
|
||||
_initInteractive: function() {
|
||||
this._currentTransform = null;
|
||||
|
|
@ -5975,7 +5961,7 @@ fabric.util.string = {
|
|||
if (activeGroup) {
|
||||
activeGroup.setObjectsCoords();
|
||||
activeGroup.set('isMoving', false);
|
||||
this._setCursor(this.CURSOR);
|
||||
this._setCursor(this.defaultCursor);
|
||||
}
|
||||
|
||||
// clear selection
|
||||
|
|
@ -6015,6 +6001,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 });
|
||||
|
||||
this.fire('mouse:down', { e: e });
|
||||
return;
|
||||
|
|
@ -6114,7 +6101,7 @@ fabric.util.string = {
|
|||
this._objects[i].setActive(false);
|
||||
}
|
||||
}
|
||||
style.cursor = this.CURSOR;
|
||||
style.cursor = this.defaultCursor;
|
||||
}
|
||||
else {
|
||||
// set proper cursor
|
||||
|
|
@ -6507,7 +6494,7 @@ fabric.util.string = {
|
|||
_setCursorFromEvent: function (e, target) {
|
||||
var s = this.upperCanvasEl.style;
|
||||
if (!target) {
|
||||
s.cursor = this.CURSOR;
|
||||
s.cursor = this.defaultCursor;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
@ -6518,15 +6505,15 @@ fabric.util.string = {
|
|||
&& target._findTargetCorner(e, this._offset);
|
||||
|
||||
if (!corner) {
|
||||
s.cursor = this.HOVER_CURSOR;
|
||||
s.cursor = this.hoverCursor;
|
||||
}
|
||||
else {
|
||||
if (corner in cursorMap) {
|
||||
s.cursor = cursorMap[corner];
|
||||
} else if (corner === 'mtr' || corner === 'mbr') {
|
||||
s.cursor = this.ROTATION_CURSOR
|
||||
s.cursor = this.rotationCursor;
|
||||
} else {
|
||||
s.cursor = this.CURSOR;
|
||||
s.cursor = this.defaulCursor;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -6674,7 +6661,7 @@ fabric.util.string = {
|
|||
*/
|
||||
_initWrapperElement: function () {
|
||||
this.wrapperEl = fabric.util.wrapElement(this.lowerCanvasEl, 'div', {
|
||||
'class': this.CONTAINER_CLASS
|
||||
'class': this.containerClass
|
||||
});
|
||||
fabric.util.setStyle(this.wrapperEl, {
|
||||
width: this.getWidth() + 'px',
|
||||
|
|
|
|||
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.22",
|
||||
"version": "0.8.23",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
|
||||
"repository": "git://github.com/kangax/fabric.js",
|
||||
|
|
|
|||
|
|
@ -100,31 +100,31 @@
|
|||
|
||||
/**
|
||||
* Default cursor value used when hovering over an object on canvas
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
HOVER_CURSOR: 'move',
|
||||
hoverCursor: 'move',
|
||||
|
||||
/**
|
||||
* Default cursor value used for the entire canvas
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
CURSOR: 'default',
|
||||
defaultCursor: 'default',
|
||||
|
||||
/**
|
||||
* Cursor value used for rotation point
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
ROTATION_CURSOR: 'crosshair',
|
||||
rotationCursor: 'crosshair',
|
||||
|
||||
/**
|
||||
* Default element class that's given to wrapper (div) element of canvas
|
||||
* @constant
|
||||
* @property
|
||||
* @type String
|
||||
*/
|
||||
CONTAINER_CLASS: 'canvas-container',
|
||||
containerClass: 'canvas-container',
|
||||
|
||||
_initInteractive: function() {
|
||||
this._currentTransform = null;
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
if (activeGroup) {
|
||||
activeGroup.setObjectsCoords();
|
||||
activeGroup.set('isMoving', false);
|
||||
this._setCursor(this.CURSOR);
|
||||
this._setCursor(this.defaultCursor);
|
||||
}
|
||||
|
||||
// clear selection
|
||||
|
|
@ -282,6 +282,7 @@
|
|||
|
||||
// capture coordinates immediately; this allows to draw dots (when movement never occurs)
|
||||
this._captureDrawingPath(e);
|
||||
this.fire('mouse:down', { e: e });
|
||||
|
||||
this.fire('mouse:down', { e: e });
|
||||
return;
|
||||
|
|
@ -381,7 +382,7 @@
|
|||
this._objects[i].setActive(false);
|
||||
}
|
||||
}
|
||||
style.cursor = this.CURSOR;
|
||||
style.cursor = this.defaultCursor;
|
||||
}
|
||||
else {
|
||||
// set proper cursor
|
||||
|
|
@ -774,7 +775,7 @@
|
|||
_setCursorFromEvent: function (e, target) {
|
||||
var s = this.upperCanvasEl.style;
|
||||
if (!target) {
|
||||
s.cursor = this.CURSOR;
|
||||
s.cursor = this.defaultCursor;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
@ -785,15 +786,15 @@
|
|||
&& target._findTargetCorner(e, this._offset);
|
||||
|
||||
if (!corner) {
|
||||
s.cursor = this.HOVER_CURSOR;
|
||||
s.cursor = this.hoverCursor;
|
||||
}
|
||||
else {
|
||||
if (corner in cursorMap) {
|
||||
s.cursor = cursorMap[corner];
|
||||
} else if (corner === 'mtr' || corner === 'mbr') {
|
||||
s.cursor = this.ROTATION_CURSOR
|
||||
s.cursor = this.rotationCursor;
|
||||
} else {
|
||||
s.cursor = this.CURSOR;
|
||||
s.cursor = this.defaulCursor;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -941,7 +942,7 @@
|
|||
*/
|
||||
_initWrapperElement: function () {
|
||||
this.wrapperEl = fabric.util.wrapElement(this.lowerCanvasEl, 'div', {
|
||||
'class': this.CONTAINER_CLASS
|
||||
'class': this.containerClass
|
||||
});
|
||||
fabric.util.setStyle(this.wrapperEl, {
|
||||
width: this.getWidth() + 'px',
|
||||
|
|
|
|||
|
|
@ -91,20 +91,6 @@
|
|||
*/
|
||||
clipTo: null,
|
||||
|
||||
/**
|
||||
* Default canvas width
|
||||
* @constant
|
||||
* @type Number
|
||||
*/
|
||||
CANVAS_WIDTH: 600,
|
||||
|
||||
/**
|
||||
* Default canvas height
|
||||
* @constant
|
||||
* @type Number
|
||||
*/
|
||||
CANVAS_HEIGHT: 600,
|
||||
|
||||
/**
|
||||
* Callback; invoked right before object is about to be scaled/rotated
|
||||
* @method onBeforeScaleRotate
|
||||
|
|
|
|||
Loading…
Reference in a new issue