mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-26 08:24:42 +00:00
Merge dynamic origin branch into master. Version 1.0.0
This commit is contained in:
parent
fb915851db
commit
7121830ca6
19 changed files with 33 additions and 31 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.9.35" };
|
||||
var fabric = fabric || { version: "1.0.0" };
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
|
|||
10
dist/all.js
vendored
10
dist/all.js
vendored
|
|
@ -1,7 +1,7 @@
|
|||
/* build: `node build.js modules=ALL` */
|
||||
/*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
||||
|
||||
var fabric = fabric || { version: "0.9.35" };
|
||||
var fabric = fabric || { version: "1.0.0" };
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
exports.fabric = fabric;
|
||||
|
|
@ -2818,10 +2818,12 @@ fabric.util.string = {
|
|||
* @param {Event} event
|
||||
*/
|
||||
function getPointer(event) {
|
||||
event || (event = fabric.window.event);
|
||||
|
||||
var element = event.target || event.srcElement,
|
||||
scrollLeft = 0,
|
||||
scrollTop = 0,
|
||||
firstFixedAncestor;
|
||||
scrollLeft = 0,
|
||||
scrollTop = 0,
|
||||
firstFixedAncestor;
|
||||
|
||||
while (element && element.parentNode && !firstFixedAncestor) {
|
||||
element = element.parentNode;
|
||||
|
|
|
|||
10
dist/all.min.js
vendored
10
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.9.35",
|
||||
"version": "1.0.0",
|
||||
"author": "Juriy Zaytsev <kangax@gmail.com>",
|
||||
"keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"],
|
||||
"repository": "git://github.com/kangax/fabric.js",
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@
|
|||
|
||||
var PATH_DATALESS_JSON = '{"objects":[{"type":"path","originX":"center","originY":"center","left":200,"top":200,"width":200,"height":200,"fill":"rgb(0,0,0)",'+
|
||||
'"overlayFill":null,"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,'+
|
||||
'"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false,'+
|
||||
'"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,'+
|
||||
'"path":"http://example.com/"}],"background":"rgba(0, 0, 0, 0)"}';
|
||||
|
||||
var RECT_JSON = '{"objects":[{"type":"rect","originX":"center","originY":"center","left":0,"top":0,"width":10,"height":10,"fill":"rgb(0,0,0)","overlayFill":null,'+
|
||||
'"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,'+
|
||||
'"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false,"rx":0,"ry":0}],'+
|
||||
'"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,"rx":0,"ry":0}],'+
|
||||
'"background":"#ff5555"}';
|
||||
|
||||
var el = fabric.document.createElement('canvas');
|
||||
|
|
|
|||
|
|
@ -21,17 +21,17 @@
|
|||
|
||||
var PATH_DATALESS_JSON = '{"objects":[{"type":"path","originX":"center","originY":"center","left":200,"top":200,"width":200,"height":200,"fill":"rgb(0,0,0)",'+
|
||||
'"overlayFill":null,"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,'+
|
||||
'"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false,'+
|
||||
'"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,'+
|
||||
'"path":"http://example.com/"}],"background":"rgba(0, 0, 0, 0)"}';
|
||||
|
||||
var RECT_JSON = '{"objects":[{"type":"rect","originX":"center","originY":"center","left":0,"top":0,"width":10,"height":10,"fill":"rgb(0,0,0)","overlayFill":null,'+
|
||||
'"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"selectable":true,'+
|
||||
'"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false,"rx":0,"ry":0}],'+
|
||||
'"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,"rx":0,"ry":0}],'+
|
||||
'"background":"#ff5555"}';
|
||||
|
||||
var RECT_JSON_WITH_PADDING = '{"objects":[{"type":"rect","originX":"center","originY":"center","left":0,"top":0,"width":10,"height":20,"fill":"rgb(0,0,0)","overlayFill":null,'+
|
||||
'"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"selectable":true,'+
|
||||
'"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false,"padding":123,"foo":"bar","rx":0,"ry":0}],'+
|
||||
'"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false,"padding":123,"foo":"bar","rx":0,"ry":0}],'+
|
||||
'"background":"rgba(0, 0, 0, 0)"}';
|
||||
|
||||
// force creation of static canvas
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false,
|
||||
'radius': 0
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false,
|
||||
'angle': 0,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false,
|
||||
'filters': []
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -111,11 +111,11 @@
|
|||
test('toJSON', function() {
|
||||
var emptyObjectJSON = '{"type":"object","originX":"center","originY":"center","left":0,"top":0,"width":0,"height":0,"fill":"rgb(0,0,0)",'+
|
||||
'"overlayFill":null,"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1,"scaleY":1,"angle":0,'+
|
||||
'"flipX":false,"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false}';
|
||||
'"flipX":false,"flipY":false,"opacity":1,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false}';
|
||||
|
||||
var augmentedJSON = '{"type":"object","originX":"center","originY":"center","left":0,"top":0,"width":122,"height":0,"fill":"rgb(0,0,0)",'+
|
||||
'"overlayFill":null,"stroke":null,"strokeWidth":1,"strokeDashArray":null,"scaleX":1.3,"scaleY":1,"angle":0,'+
|
||||
'"flipX":false,"flipY":true,"opacity":0.88,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":false,"transparentCorners":true,"perPixelTargetFind":false}';
|
||||
'"flipX":false,"flipY":true,"opacity":0.88,"selectable":true,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"transparentCorners":true,"perPixelTargetFind":false}';
|
||||
|
||||
var cObj = new fabric.Object();
|
||||
ok(typeof cObj.toJSON == 'function');
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
@ -175,7 +175,7 @@
|
|||
'selectable': false,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false,
|
||||
'paths': getPathObjects()
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false,
|
||||
'rx': 0,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
'selectable': true,
|
||||
'hasControls': true,
|
||||
'hasBorders': true,
|
||||
'hasRotatingPoint': false,
|
||||
'hasRotatingPoint': true,
|
||||
'transparentCorners': true,
|
||||
'perPixelTargetFind': false,
|
||||
'text': 'x',
|
||||
|
|
|
|||
Loading…
Reference in a new issue