mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -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
|
||||
// and jsdom.
|
||||
|
||||
/*global document:true, window:true, navigator:true, HTMLCanvasElement:true, Image:true */
|
||||
var jsdom = require('jsdom'),
|
||||
// Node Canvas library: https://github.com/learnboost/node-canvas
|
||||
Canvas = require('canvas'),
|
||||
|
|
|
@ -14,8 +14,8 @@ var Http = {
|
|||
request: function(method, url, callback, async) {
|
||||
// Code borrowed from Coffee Script and extended:
|
||||
async = (async === undefined) ? true : async;
|
||||
var xhr = new (window.ActiveXObject || XMLHttpRequest)(
|
||||
'Microsoft.XMLHTTP');
|
||||
var xhrConstructor = window.ActiveXObject || XMLHttpRequest;
|
||||
var xhr = new xhrConstructor('Microsoft.XMLHTTP');
|
||||
xhr.open(method.toUpperCase(), url, async);
|
||||
if ('overrideMimeType' in xhr)
|
||||
xhr.overrideMimeType('text/plain');
|
||||
|
|
|
@ -380,7 +380,7 @@ Path.inject({ statics: new function() {
|
|||
sides = Base.readNamed(arguments, 'sides'),
|
||||
radius = Base.readNamed(arguments, 'radius'),
|
||||
step = 360 / sides,
|
||||
three = !(sides % 3),
|
||||
three = sides % 3 === 0,
|
||||
vector = new Point(0, three ? -radius : radius),
|
||||
offset = three ? -1 : 0.5,
|
||||
segments = new Array(sides);
|
||||
|
|
Loading…
Reference in a new issue