mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix errors in jshint
This commit is contained in:
parent
d5d4d263f5
commit
8077f228e9
3 changed files with 4 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
||||||
// Node.js emulation layer of browser based environment, based on node-canvas
|
// Node.js emulation layer of browser based environment, based on node-canvas
|
||||||
// and jsdom.
|
// and jsdom.
|
||||||
|
|
||||||
|
/*global document:true, window:true, navigator:true, HTMLCanvasElement:true, Image:true */
|
||||||
var jsdom = require('jsdom'),
|
var jsdom = require('jsdom'),
|
||||||
// Node Canvas library: https://github.com/learnboost/node-canvas
|
// Node Canvas library: https://github.com/learnboost/node-canvas
|
||||||
Canvas = require('canvas'),
|
Canvas = require('canvas'),
|
||||||
|
|
|
@ -14,8 +14,8 @@ var Http = {
|
||||||
request: function(method, url, callback, async) {
|
request: function(method, url, callback, async) {
|
||||||
// Code borrowed from Coffee Script and extended:
|
// Code borrowed from Coffee Script and extended:
|
||||||
async = (async === undefined) ? true : async;
|
async = (async === undefined) ? true : async;
|
||||||
var xhr = new (window.ActiveXObject || XMLHttpRequest)(
|
var xhrConstructor = window.ActiveXObject || XMLHttpRequest;
|
||||||
'Microsoft.XMLHTTP');
|
var xhr = new xhrConstructor('Microsoft.XMLHTTP');
|
||||||
xhr.open(method.toUpperCase(), url, async);
|
xhr.open(method.toUpperCase(), url, async);
|
||||||
if ('overrideMimeType' in xhr)
|
if ('overrideMimeType' in xhr)
|
||||||
xhr.overrideMimeType('text/plain');
|
xhr.overrideMimeType('text/plain');
|
||||||
|
|
|
@ -380,7 +380,7 @@ Path.inject({ statics: new function() {
|
||||||
sides = Base.readNamed(arguments, 'sides'),
|
sides = Base.readNamed(arguments, 'sides'),
|
||||||
radius = Base.readNamed(arguments, 'radius'),
|
radius = Base.readNamed(arguments, 'radius'),
|
||||||
step = 360 / sides,
|
step = 360 / sides,
|
||||||
three = !(sides % 3),
|
three = sides % 3 === 0,
|
||||||
vector = new Point(0, three ? -radius : radius),
|
vector = new Point(0, three ? -radius : radius),
|
||||||
offset = three ? -1 : 0.5,
|
offset = three ? -1 : 0.5,
|
||||||
segments = new Array(sides);
|
segments = new Array(sides);
|
||||||
|
|
Loading…
Reference in a new issue