fix space and linebreak

This commit is contained in:
sapics 2015-04-20 09:51:32 +09:00
parent a5baf7ae39
commit 563ec42196
15 changed files with 59 additions and 46 deletions

View file

@ -53,7 +53,7 @@ else if (minifier === 'closure') {
mininfierCmd = 'java -jar ' + rootPath + '/lib/google_closure_compiler.jar --js fabric.js --js_output_file fabric.min.js' + sourceMapFlags;
}
else if (minifier === 'uglifyjs') {
mininfierCmd = 'uglifyjs ' + amdUglifyFlags + ' --output fabric.min.js fabric.js' + sourceMapFlags;
mininfierCmd = 'uglifyjs ' + amdUglifyFlags + ' --output fabric.min.js fabric.js' + sourceMapFlags;
}
var buildSh = 'build-sh' in buildArgsAsObject;

View file

@ -26,7 +26,7 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
* @type fabric.Shadow
* @default
*/
shadow: null,
shadow: null,
/**
* Line endings style of a brush (one of "butt", "round", "square")
@ -47,7 +47,7 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
* @type Array
* @default
*/
strokeDashArray: null,
strokeDashArray: null,
/**
* Sets shadow of an object

View file

@ -20,10 +20,11 @@ fabric.CircleBrush = fabric.util.createClass(fabric.BaseBrush, /** @lends fabric
this.canvas = canvas;
this.points = [ ];
},
/**
* Invoked inside on mouse down and mouse move
* @param {Object} pointer
*/
* Invoked inside on mouse down and mouse move
* @param {Object} pointer
*/
drawDot: function(pointer) {
var point = this.addPoint(pointer),
ctx = this.canvas.contextTop,

View file

@ -780,8 +780,8 @@
},
/**
* @private
*/
* @private
*/
_checkTarget: function(e, obj, pointer) {
if (obj &&
obj.visible &&

View file

@ -140,6 +140,7 @@
_onShake: function(e, self) {
this.__onShake && this.__onShake(e, self);
},
/**
* @private
* @param {Event} [e] Event object fired on Event.js shake
@ -524,14 +525,14 @@
},
/**
* Method that defines the actions when mouse is hovering the canvas.
* The currentTransform parameter will definde whether the user is rotating/scaling/translating
* an image or neither of them (only hovering). A group selection is also possible and would cancel
* all any other type of action.
* In case of an image transformation only the top canvas will be rendered.
* @private
* @param {Event} e Event object fired on mousemove
*/
* Method that defines the actions when mouse is hovering the canvas.
* The currentTransform parameter will definde whether the user is rotating/scaling/translating
* an image or neither of them (only hovering). A group selection is also possible and would cancel
* all any other type of action.
* In case of an image transformation only the top canvas will be rendered.
* @private
* @param {Event} e Event object fired on mousemove
*/
__onMouseMove: function (e) {
var target, pointer;

View file

@ -64,6 +64,7 @@
this.renderAll();
t.action = 'drag';
},
/**
* Method that defines actions when an Event.js drag is detected.
*
@ -75,6 +76,7 @@
e: e, self: self
});
},
/**
* Method that defines actions when an Event.js orientation event is detected.
*
@ -86,6 +88,7 @@
e: e, self: self
});
},
/**
* Method that defines actions when an Event.js shake event is detected.
*
@ -97,6 +100,7 @@
e: e, self: self
});
},
/**
* Method that defines actions when an Event.js longpress event is detected.
*
@ -108,6 +112,7 @@
e: e, self: self
});
},
/**
* Scales an object by a factor
* @param {Number} s The scale factor to apply to the current scale level
@ -141,6 +146,7 @@
target.setPositionByOrigin(constraintPosition, t.originX, t.originY);
},
/**
* Rotates object by an angle
* @param {Number} curAngle The angle of rotation in degrees

View file

@ -379,8 +379,8 @@
},
/**
* Initializes "mousemove" event handler
*/
* Initializes "mousemove" event handler
*/
initMouseMoveHandler: function() {
var _this = this;
this.canvas.on('mouse:move', function(options) {

View file

@ -341,6 +341,7 @@
}
return selectors.length === 0;
}
/**
* @private
*/
@ -574,9 +575,9 @@
var svgCache = {
/**
* @param {String} name
* @param {Function} callback
*/
* @param {String} name
* @param {Function} callback
*/
has: function (name, callback) {
callback(false);
},

View file

@ -285,12 +285,13 @@
* object.
* @param {fabric.Object} object
* @return {fabric.Object} transformedObject
*/
*/
realizeTransform: function(object) {
this._moveFlippedObject(object);
this._setObjectPosition(object);
return object;
},
/**
* Moves a flipped object to the position where it's displayed
* @private

View file

@ -362,6 +362,7 @@
}
return canvasEl;
},
/**
* @private
* @param {CanvasRenderingContext2D} ctx Context to render on
@ -395,6 +396,7 @@
this._renderStroke(ctx);
},
/**
* @private, needed to check if image needs resize
*/

View file

@ -303,9 +303,9 @@
},
/**
* @private
* @param {CanvasRenderingContext2D} ctx Context to render on
*/
* @private
* @param {CanvasRenderingContext2D} ctx Context to render on
*/
_render: function(ctx) {
this.callSuper('_render', ctx);
this.ctx = ctx;
@ -367,7 +367,7 @@
* Returns complete style of char at the current cursor
* @param {Number} lineIndex Line index
* @param {Number} charIndex Char index
* @return {Object} Character style
* @return {Object} Character style
*/
getCurrentCharStyle: function(lineIndex, charIndex) {
var style = this.styles[lineIndex] && this.styles[lineIndex][charIndex === 0 ? 0 : (charIndex - 1)];

View file

@ -55,13 +55,14 @@
function(callback) {
fabric.window.setTimeout(callback, 1000 / 60);
};
/**
* requestAnimationFrame polyfill based on http://paulirish.com/2011/requestanimationframe-for-smart-animating/
* In order to get a precise start time, `requestAnimFrame` should be called as an entry into the method
* @memberOf fabric.util
* @param {Function} callback Callback to invoke
* @param {DOMElement} element optional Element to associate with animation
*/
* requestAnimationFrame polyfill based on http://paulirish.com/2011/requestanimationframe-for-smart-animating/
* In order to get a precise start time, `requestAnimFrame` should be called as an entry into the method
* @memberOf fabric.util
* @param {Function} callback Callback to invoke
* @param {DOMElement} element optional Element to associate with animation
*/
function requestAnimFrame() {
return _requestAnimFrame.apply(fabric.window, arguments);
}

View file

@ -96,8 +96,8 @@
}
/*
* Private
*/
* Private
*/
function calcVectorAngle(ux, uy, vx, vy) {
var ta = Math.atan2(uy, ux),
tb = Math.atan2(vy, vx);

View file

@ -182,12 +182,12 @@
}
/**
* Returns style attribute value of a given element
* @memberOf fabric.util
* @param {HTMLElement} element Element to get style attribute for
* @param {String} attr Style attribute to get for element
* @return {String} Style attribute value of the given element.
*/
* Returns style attribute value of a given element
* @memberOf fabric.util
* @param {HTMLElement} element Element to get style attribute for
* @param {String} attr Style attribute to get for element
* @return {String} Style attribute value of the given element.
*/
var getElementStyle;
if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
getElementStyle = function(element, attr) {

View file

@ -179,12 +179,12 @@
},
/**
* Returns klass "Class" object of given namespace
* @memberOf fabric.util
* @param {String} type Type of object (eg. 'circle')
* @param {String} namespace Namespace to get klass "Class" object from
* @return {Object} klass "Class"
*/
* Returns klass "Class" object of given namespace
* @memberOf fabric.util
* @param {String} type Type of object (eg. 'circle')
* @param {String} namespace Namespace to get klass "Class" object from
* @return {Object} klass "Class"
*/
getKlass: function(type, namespace) {
// capitalize first letter only
type = fabric.util.string.camelize(type.charAt(0).toUpperCase() + type.slice(1));