mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Remove various double white-spaces.
This commit is contained in:
parent
bcc8761f8c
commit
797a393c9a
9 changed files with 10 additions and 10 deletions
|
@ -273,8 +273,8 @@ var BlendMode = new function() {
|
||||||
return;
|
return;
|
||||||
var dstData = dstContext.getImageData(offset.x, offset.y,
|
var dstData = dstContext.getImageData(offset.x, offset.y,
|
||||||
srcCanvas.width, srcCanvas.height),
|
srcCanvas.width, srcCanvas.height),
|
||||||
dst = dstData.data,
|
dst = dstData.data,
|
||||||
src = srcContext.getImageData(0, 0,
|
src = srcContext.getImageData(0, 0,
|
||||||
srcCanvas.width, srcCanvas.height).data;
|
srcCanvas.width, srcCanvas.height).data;
|
||||||
for (var i = 0, l = dst.length; i < l; i += 4) {
|
for (var i = 0, l = dst.length; i < l; i += 4) {
|
||||||
sr = src[i];
|
sr = src[i];
|
||||||
|
|
|
@ -173,7 +173,7 @@ var DomElement = new function() {
|
||||||
rect = { left: 0, top: 0, width: 0, height: 0 };
|
rect = { left: 0, top: 0, width: 0, height: 0 };
|
||||||
}
|
}
|
||||||
var x = rect.left - (html.clientLeft || body.clientLeft || 0),
|
var x = rect.left - (html.clientLeft || body.clientLeft || 0),
|
||||||
y = rect.top - (html.clientTop || body.clientTop || 0);
|
y = rect.top - (html.clientTop || body.clientTop || 0);
|
||||||
if (!viewport) {
|
if (!viewport) {
|
||||||
var view = doc.defaultView;
|
var view = doc.defaultView;
|
||||||
x += view.pageXOffset || html.scrollLeft || body.scrollLeft;
|
x += view.pageXOffset || html.scrollLeft || body.scrollLeft;
|
||||||
|
|
|
@ -1264,7 +1264,7 @@ new function() { // Scope for methods that require numerical integration
|
||||||
} else if (qy <= dMax) {
|
} else if (qy <= dMax) {
|
||||||
px = hullBottom[i][0];
|
px = hullBottom[i][0];
|
||||||
qx = hullBottom[i + 1][0];
|
qx = hullBottom[i + 1][0];
|
||||||
tProxy = px + (dMax - py) * (qx - px) / (qy - py);
|
tProxy = px + (dMax - py) * (qx - px) / (qy - py);
|
||||||
} else {
|
} else {
|
||||||
// Try the next chain
|
// Try the next chain
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -2481,7 +2481,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var ext = Math.abs(extent),
|
var ext = Math.abs(extent),
|
||||||
count = ext >= 360 ? 4 : Math.ceil(ext / 90),
|
count = ext >= 360 ? 4 : Math.ceil(ext / 90),
|
||||||
inc = extent / count,
|
inc = extent / count,
|
||||||
half = inc * Math.PI / 360,
|
half = inc * Math.PI / 360,
|
||||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||||
|
|
|
@ -102,7 +102,7 @@ var PathFlattener = Base.extend({
|
||||||
return {
|
return {
|
||||||
// Interpolate
|
// Interpolate
|
||||||
value: prevVal + (part.value - prevVal)
|
value: prevVal + (part.value - prevVal)
|
||||||
* (offset - prevLen) / (part.offset - prevLen),
|
* (offset - prevLen) / (part.offset - prevLen),
|
||||||
index: part.index
|
index: part.index
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -676,7 +676,7 @@ CompoundPath.inject(/** @lends CompoundPath# */{
|
||||||
* Used by getWinding().
|
* Used by getWinding().
|
||||||
*/
|
*/
|
||||||
_getMonoCurves: function() {
|
_getMonoCurves: function() {
|
||||||
var children = this._children,
|
var children = this._children,
|
||||||
monoCurves = [];
|
monoCurves = [];
|
||||||
for (var i = 0, l = children.length; i < l; i++)
|
for (var i = 0, l = children.length; i < l; i++)
|
||||||
monoCurves.push.apply(monoCurves, children[i]._getMonoCurves());
|
monoCurves.push.apply(monoCurves, children[i]._getMonoCurves());
|
||||||
|
|
|
@ -503,7 +503,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
||||||
// This saves some computation time. If change is false, always
|
// This saves some computation time. If change is false, always
|
||||||
// use the real handles, as we just want to receive a filled
|
// use the real handles, as we just want to receive a filled
|
||||||
// coords array for getBounds().
|
// coords array for getBounds().
|
||||||
handleIn = !change || !this._handleIn.isZero()
|
handleIn = !change || !this._handleIn.isZero()
|
||||||
? this._handleIn : null,
|
? this._handleIn : null,
|
||||||
handleOut = !change || !this._handleOut.isZero()
|
handleOut = !change || !this._handleOut.isZero()
|
||||||
? this._handleOut : null,
|
? this._handleOut : null,
|
||||||
|
|
|
@ -182,7 +182,7 @@ var Gradient = Base.extend(/** @lends Gradient# */{
|
||||||
equals: function(gradient) {
|
equals: function(gradient) {
|
||||||
if (gradient === this)
|
if (gradient === this)
|
||||||
return true;
|
return true;
|
||||||
if (gradient && this._class === gradient._class
|
if (gradient && this._class === gradient._class
|
||||||
&& this._stops.length === gradient._stops.length) {
|
&& this._stops.length === gradient._stops.length) {
|
||||||
for (var i = 0, l = this._stops.length; i < l; i++) {
|
for (var i = 0, l = this._stops.length; i < l; i++) {
|
||||||
if (!this._stops[i].equals(gradient._stops[i]))
|
if (!this._stops[i].equals(gradient._stops[i]))
|
||||||
|
|
|
@ -37,7 +37,7 @@ var Key = new function() {
|
||||||
46: 'delete',
|
46: 'delete',
|
||||||
91: 'command',
|
91: 'command',
|
||||||
93: 'command', // WebKit right command button
|
93: 'command', // WebKit right command button
|
||||||
224: 'command' // Gecko command button
|
224: 'command' // Gecko command button
|
||||||
},
|
},
|
||||||
|
|
||||||
// Mark the special keys that still can be interpreted as chars too
|
// Mark the special keys that still can be interpreted as chars too
|
||||||
|
|
Loading…
Reference in a new issue