mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
Minor comment fixes
This commit is contained in:
parent
bdc311e99f
commit
5e64b78e40
2 changed files with 6 additions and 9 deletions
|
@ -105,12 +105,9 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
|||
delete agent.webkit;
|
||||
if (agent.atom)
|
||||
delete agent.chrome;
|
||||
// In node context, JSDOM user agent no longer include "node" word,
|
||||
// it is now called "jsdom". So we need to replace it because
|
||||
// `agent.node` is expected to be true in node context.
|
||||
if (agent.jsdom) {
|
||||
agent.node = true;
|
||||
}
|
||||
// In Node.js, the user agent set by JSDOM no longer includes `node`
|
||||
// but `jsdom` instead. Preserve `agent.node`:
|
||||
agent.node = agent.jsdom;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -408,9 +408,9 @@ var Raster = Item.extend(/** @lends Raster# */{
|
|||
crossOrigin = this._crossOrigin;
|
||||
if (crossOrigin)
|
||||
image.crossOrigin = crossOrigin;
|
||||
// Prevent setting image source to `null`, as this isn't supported by browsers,
|
||||
// and it would actually throw exceptions in JSDOM.
|
||||
//TODO: Look into fixing this exception in JSDOM
|
||||
// Prevent setting image source to `null`, as this isn't supported by
|
||||
// browsers, and it would actually throw exceptions in JSDOM.
|
||||
// TODO: Look into fixing this bug in JSDOM.
|
||||
if (src)
|
||||
image.src = src;
|
||||
this.setImage(image);
|
||||
|
|
Loading…
Reference in a new issue