mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Fix some white-spaces in comments and HTML.
This commit is contained in:
parent
bf65866b58
commit
0e427c16a2
12 changed files with 82 additions and 82 deletions
|
@ -12,93 +12,93 @@
|
|||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="500" height="1000" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="69" y1="239.5" x2="530" y2="239.5">
|
||||
<stop offset="0" style="stop-color:#231F20"/>
|
||||
<stop offset="0.0896" style="stop-color:#231F20;stop-opacity:0.9104"/>
|
||||
<stop offset="1" style="stop-color:#231F20;stop-opacity:0"/>
|
||||
<stop offset="0" style="stop-color:#231F20"/>
|
||||
<stop offset="0.0896" style="stop-color:#231F20;stop-opacity:0.9104"/>
|
||||
<stop offset="1" style="stop-color:#231F20;stop-opacity:0"/>
|
||||
</linearGradient>
|
||||
<rect x="69" y="210" fill="url(#SVGID_1_)" width="461" height="59"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="69" y1="162.5" x2="530" y2="162.5">
|
||||
<stop offset="0" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.0031" style="stop-color:#0BA449"/>
|
||||
<stop offset="0.0203" style="stop-color:#43B13D"/>
|
||||
<stop offset="0.038" style="stop-color:#75BD33"/>
|
||||
<stop offset="0.0559" style="stop-color:#A0C72A"/>
|
||||
<stop offset="0.074" style="stop-color:#C2CF23"/>
|
||||
<stop offset="0.0922" style="stop-color:#DDD61E"/>
|
||||
<stop offset="0.1107" style="stop-color:#F0DA1A"/>
|
||||
<stop offset="0.1298" style="stop-color:#FBDD18"/>
|
||||
<stop offset="0.15" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.3" style="stop-color:#F26522"/>
|
||||
<stop offset="0.47" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.64" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.8012" style="stop-color:#F26522"/>
|
||||
<stop offset="1" style="stop-color:#00A14B"/>
|
||||
<stop offset="0" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.0031" style="stop-color:#0BA449"/>
|
||||
<stop offset="0.0203" style="stop-color:#43B13D"/>
|
||||
<stop offset="0.038" style="stop-color:#75BD33"/>
|
||||
<stop offset="0.0559" style="stop-color:#A0C72A"/>
|
||||
<stop offset="0.074" style="stop-color:#C2CF23"/>
|
||||
<stop offset="0.0922" style="stop-color:#DDD61E"/>
|
||||
<stop offset="0.1107" style="stop-color:#F0DA1A"/>
|
||||
<stop offset="0.1298" style="stop-color:#FBDD18"/>
|
||||
<stop offset="0.15" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.3" style="stop-color:#F26522"/>
|
||||
<stop offset="0.47" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.64" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.8012" style="stop-color:#F26522"/>
|
||||
<stop offset="1" style="stop-color:#00A14B"/>
|
||||
</linearGradient>
|
||||
<rect x="69" y="133" fill="url(#SVGID_2_)" width="461" height="59"/>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="69" y1="91.5" x2="530" y2="91.5">
|
||||
<stop offset="0%" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.31%" style="stop-color:#0BA449"/>
|
||||
<stop offset="2%" style="stop-color:#43B13D"/>
|
||||
<stop offset="3.8%" style="stop-color:#75BD33"/>
|
||||
<stop offset="5.59%" style="stop-color:#A0C72A"/>
|
||||
<stop offset="7.4%" style="stop-color:#C2CF23"/>
|
||||
<stop offset="9.22%" style="stop-color:#DDD61E"/>
|
||||
<stop offset="11.07%" style="stop-color:#F0DA1A"/>
|
||||
<stop offset="12.98%" style="stop-color:#FBDD18"/>
|
||||
<stop offset="15%" style="stop-color:#FFDE17"/>
|
||||
<stop offset="30%" style="stop-color:#F26522"/>
|
||||
<stop offset="47%" style="stop-color:#00A14B"/>
|
||||
<stop offset="64%" style="stop-color:#FFDE17"/>
|
||||
<stop offset="80.12%" style="stop-color:#F26522"/>
|
||||
<stop offset="100%" style="stop-color:#00A14B"/>
|
||||
<stop offset="0%" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.31%" style="stop-color:#0BA449"/>
|
||||
<stop offset="2%" style="stop-color:#43B13D"/>
|
||||
<stop offset="3.8%" style="stop-color:#75BD33"/>
|
||||
<stop offset="5.59%" style="stop-color:#A0C72A"/>
|
||||
<stop offset="7.4%" style="stop-color:#C2CF23"/>
|
||||
<stop offset="9.22%" style="stop-color:#DDD61E"/>
|
||||
<stop offset="11.07%" style="stop-color:#F0DA1A"/>
|
||||
<stop offset="12.98%" style="stop-color:#FBDD18"/>
|
||||
<stop offset="15%" style="stop-color:#FFDE17"/>
|
||||
<stop offset="30%" style="stop-color:#F26522"/>
|
||||
<stop offset="47%" style="stop-color:#00A14B"/>
|
||||
<stop offset="64%" style="stop-color:#FFDE17"/>
|
||||
<stop offset="80.12%" style="stop-color:#F26522"/>
|
||||
<stop offset="100%" style="stop-color:#00A14B"/>
|
||||
</linearGradient>
|
||||
<rect x="69" y="62" fill="url(#SVGID_3_)" width="461" height="59"/>
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="24.6909" y1="760.1406" x2="485.6914" y2="760.1406" gradientTransform="matrix(0 1 -1 0 859.6406 264.3599)">
|
||||
<stop offset="0" style="stop-color:#231F20"/>
|
||||
<stop offset="0.0896" style="stop-color:#231F20;stop-opacity:0.9104"/>
|
||||
<stop offset="1" style="stop-color:#231F20;stop-opacity:0"/>
|
||||
<stop offset="0" style="stop-color:#231F20"/>
|
||||
<stop offset="0.0896" style="stop-color:#231F20;stop-opacity:0.9104"/>
|
||||
<stop offset="1" style="stop-color:#231F20;stop-opacity:0"/>
|
||||
</linearGradient>
|
||||
<rect x="70" y="289.051" fill="url(#SVGID_4_)" width="59" height="461"/>
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="24.6909" y1="683.1396" x2="485.6914" y2="683.1396" gradientTransform="matrix(0 1 -1 0 859.6406 264.3599)">
|
||||
<stop offset="0" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.0031" style="stop-color:#0BA449"/>
|
||||
<stop offset="0.0203" style="stop-color:#43B13D"/>
|
||||
<stop offset="0.038" style="stop-color:#75BD33"/>
|
||||
<stop offset="0.0559" style="stop-color:#A0C72A"/>
|
||||
<stop offset="0.074" style="stop-color:#C2CF23"/>
|
||||
<stop offset="0.0922" style="stop-color:#DDD61E"/>
|
||||
<stop offset="0.1107" style="stop-color:#F0DA1A"/>
|
||||
<stop offset="0.1298" style="stop-color:#FBDD18"/>
|
||||
<stop offset="0.15" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.3" style="stop-color:#F26522"/>
|
||||
<stop offset="0.47" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.64" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.8012" style="stop-color:#F26522"/>
|
||||
<stop offset="1" style="stop-color:#00A14B"/>
|
||||
<stop offset="0" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.0031" style="stop-color:#0BA449"/>
|
||||
<stop offset="0.0203" style="stop-color:#43B13D"/>
|
||||
<stop offset="0.038" style="stop-color:#75BD33"/>
|
||||
<stop offset="0.0559" style="stop-color:#A0C72A"/>
|
||||
<stop offset="0.074" style="stop-color:#C2CF23"/>
|
||||
<stop offset="0.0922" style="stop-color:#DDD61E"/>
|
||||
<stop offset="0.1107" style="stop-color:#F0DA1A"/>
|
||||
<stop offset="0.1298" style="stop-color:#FBDD18"/>
|
||||
<stop offset="0.15" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.3" style="stop-color:#F26522"/>
|
||||
<stop offset="0.47" style="stop-color:#00A14B"/>
|
||||
<stop offset="0.64" style="stop-color:#FFDE17"/>
|
||||
<stop offset="0.8012" style="stop-color:#F26522"/>
|
||||
<stop offset="1" style="stop-color:#00A14B"/>
|
||||
</linearGradient>
|
||||
<rect x="147.001" y="289.051" fill="url(#SVGID_5_)" width="59" height="461"/>
|
||||
<radialGradient id="SVGID_6_" cx="368.75" cy="409.5503" r="92.1995" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.1656" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.2576" style="stop-color:#CBCBCB"/>
|
||||
<stop offset="0.3651" style="stop-color:#969696"/>
|
||||
<stop offset="0.474" style="stop-color:#686868"/>
|
||||
<stop offset="0.5821" style="stop-color:#434343"/>
|
||||
<stop offset="0.6893" style="stop-color:#252525"/>
|
||||
<stop offset="0.7953" style="stop-color:#111111"/>
|
||||
<stop offset="0.8995" style="stop-color:#040404"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
<stop offset="0.1656" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.2576" style="stop-color:#CBCBCB"/>
|
||||
<stop offset="0.3651" style="stop-color:#969696"/>
|
||||
<stop offset="0.474" style="stop-color:#686868"/>
|
||||
<stop offset="0.5821" style="stop-color:#434343"/>
|
||||
<stop offset="0.6893" style="stop-color:#252525"/>
|
||||
<stop offset="0.7953" style="stop-color:#111111"/>
|
||||
<stop offset="0.8995" style="stop-color:#040404"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</radialGradient>
|
||||
<circle fill="url(#SVGID_6_)" cx="368.75" cy="409.55" r="92.2"/>
|
||||
<radialGradient id="SVGID_7_" cx="368.75" cy="619.5508" r="92.1997" fx="323.3488" fy="618.7006" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.1656" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.2576" style="stop-color:#CBCBCB"/>
|
||||
<stop offset="0.3651" style="stop-color:#969696"/>
|
||||
<stop offset="0.474" style="stop-color:#686868"/>
|
||||
<stop offset="0.5821" style="stop-color:#434343"/>
|
||||
<stop offset="0.6893" style="stop-color:#252525"/>
|
||||
<stop offset="0.7953" style="stop-color:#111111"/>
|
||||
<stop offset="0.8995" style="stop-color:#040404"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
<stop offset="0.1656" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.2576" style="stop-color:#CBCBCB"/>
|
||||
<stop offset="0.3651" style="stop-color:#969696"/>
|
||||
<stop offset="0.474" style="stop-color:#686868"/>
|
||||
<stop offset="0.5821" style="stop-color:#434343"/>
|
||||
<stop offset="0.6893" style="stop-color:#252525"/>
|
||||
<stop offset="0.7953" style="stop-color:#111111"/>
|
||||
<stop offset="0.8995" style="stop-color:#040404"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</radialGradient>
|
||||
<circle fill="url(#SVGID_7_)" cx="368.75" cy="619.551" r="92.2"/>
|
||||
</svg>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<body>
|
||||
<svg version="1.1" id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="595" height="841" xml:space="preserve">
|
||||
<symbol id="circle" viewBox="0 0 48 48" overflow="visible">
|
||||
<symbol id="circle" viewBox="0 0 48 48" overflow="visible">
|
||||
<path fill="#FF0049" d="M24,0c0-13.255-10.745-24-24-24S-24-13.255-24,0s10.745,24,24,24S24,13.255,24,0z"/>
|
||||
</symbol>
|
||||
<use xlink:href="#circle" width="48" height="48" x="-24" y="-24" transform="matrix(1.1667 1.1667 1.1667 -1.1667 177.0005 96)" overflow="visible"/>
|
||||
|
|
|
@ -1957,7 +1957,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
|||
* examples.
|
||||
*
|
||||
* @param {Object|Function} match the criteria to match against
|
||||
* @return {Item} the first descendant item matching the given criteria
|
||||
* @return {Item} the first descendant item matching the given criteria
|
||||
* @see #getItems(match)
|
||||
*/
|
||||
getItem: function(match) {
|
||||
|
@ -3107,7 +3107,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
|||
*
|
||||
* @name Item#skew
|
||||
* @function
|
||||
* @param {Point} skew the horziontal and vertical skew angles in degrees
|
||||
* @param {Point} skew the horziontal and vertical skew angles in degrees
|
||||
* @param {Point} [center={@link Item#position}]
|
||||
* @see Matrix#shear
|
||||
*/
|
||||
|
|
|
@ -265,7 +265,7 @@ var Shape = Item.extend(/** @lends Shape# */{
|
|||
},
|
||||
|
||||
_canComposite: function() {
|
||||
// A path with only a fill or a stroke can be directly blended, but if
|
||||
// A path with only a fill or a stroke can be directly blended, but if
|
||||
// it has both, it needs to be drawn into a separate canvas first.
|
||||
return !(this.hasFill() && this.hasStroke());
|
||||
},
|
||||
|
|
|
@ -791,7 +791,7 @@ statics: {
|
|||
// in getStrokeBounds()
|
||||
tMin = /*#=*/Numerical.CURVETIME_EPSILON,
|
||||
tMax = 1 - tMin;
|
||||
// Only add strokeWidth to bounds for points which lie within 0 < t < 1
|
||||
// Only add strokeWidth to bounds for points which lie within 0 < t < 1
|
||||
// The corner cases for cap and join are handled in getStrokeBounds()
|
||||
add(v3, 0);
|
||||
for (var i = 0; i < count; i++) {
|
||||
|
|
|
@ -32,7 +32,7 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
|||
// See #getSegment() below.
|
||||
beans: true,
|
||||
|
||||
// DOCS: CurveLocation class description: add these back when the mentioned
|
||||
// DOCS: CurveLocation class description: add these back when the mentioned
|
||||
// functioned have been added: {@link Path#split(location)}
|
||||
/**
|
||||
* Creates a new CurveLocation object.
|
||||
|
|
|
@ -1460,7 +1460,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
}
|
||||
|
||||
// See if actually have any curves in the path. Differentiate
|
||||
// between straight objects (line, polyline, rect, and polygon) and
|
||||
// between straight objects (line, polyline, rect, and polygon) and
|
||||
// objects with curves(circle, ellipse, roundedRectangle).
|
||||
if (!this.hasHandles() && segments.length === 4
|
||||
&& isCollinear(0, 2) && isCollinear(1, 3) && isOrthogonal(1)) {
|
||||
|
|
|
@ -518,7 +518,7 @@ PathItem.inject(new function() {
|
|||
* contours
|
||||
* @param {Function} the operator function that receives as argument the
|
||||
* winding number contribution of a curve and returns a boolean value
|
||||
* indicating whether the curve should be included in the final contour or
|
||||
* indicating whether the curve should be included in the final contour or
|
||||
* not
|
||||
* @return {Path[]} the contours traced
|
||||
*/
|
||||
|
@ -911,7 +911,7 @@ Path.inject(/** @lends Path# */{
|
|||
prevCurve = curve;
|
||||
}
|
||||
|
||||
// Handle bezier curves. We need to chop them into smaller curves with
|
||||
// Handle bezier curves. We need to chop them into smaller curves with
|
||||
// defined orientation, by solving the derivative curve for y extrema.
|
||||
function handleCurve(v) {
|
||||
// Filter out curves of zero length.
|
||||
|
|
|
@ -286,7 +286,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
},
|
||||
|
||||
_canComposite: function() {
|
||||
// A path with only a fill or a stroke can be directly blended, but if
|
||||
// A path with only a fill or a stroke can be directly blended, but if
|
||||
// it has both, it needs to be drawn into a separate canvas first.
|
||||
return !(this.hasFill() && this.hasStroke());
|
||||
},
|
||||
|
|
|
@ -185,7 +185,7 @@ var Numerical = new function() {
|
|||
|
||||
/**
|
||||
* Solve a quadratic equation in a numerically robust manner;
|
||||
* given a quadratic equation ax² + bx + c = 0, find the values of x.
|
||||
* given a quadratic equation ax² + bx + c = 0, find the values of x.
|
||||
*
|
||||
* References:
|
||||
* Kahan W. - "To Solve a Real Cubic Equation"
|
||||
|
|
|
@ -90,7 +90,7 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
|||
var browser = paper.browser,
|
||||
pixels;
|
||||
if (browser && browser.firefox) {
|
||||
// Firefox doesn't appear to convert context.font sizes to pixels,
|
||||
// Firefox doesn't appear to convert context.font sizes to pixels,
|
||||
// while other browsers do. Workaround:
|
||||
var parent = this._element.parentNode,
|
||||
temp = document.createElement('div');
|
||||
|
|
|
@ -672,7 +672,7 @@ test('hit-testing compound-paths', function() {
|
|||
children: [path1, path2],
|
||||
fillColor: 'blue'
|
||||
});
|
||||
// When hit-testing a side, we should get a result on the torus
|
||||
// When hit-testing a side, we should get a result on the torus
|
||||
equals(function() {
|
||||
var result = paper.project.hitTest(center.add([75, 0]), {
|
||||
fill: true
|
||||
|
|
Loading…
Reference in a new issue