mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Fix issue with PaperScript and array[i++] expressions.
This commit is contained in:
parent
4bda878f5f
commit
3d78e3729d
2 changed files with 6 additions and 1 deletions
|
@ -137,6 +137,11 @@ var PaperScript = new function() {
|
|||
|
||||
// Recursively walks the AST and replaces the code of certain nodes
|
||||
function walkAst(node) {
|
||||
// array[i++] is a MemberExpression with computed = true.
|
||||
// We cannot replace that with array[_$_(i, "+", 1)], as it would
|
||||
// break the code, so let's bail out.
|
||||
if (!node || node.type === 'MemberExpression' && node.computed)
|
||||
return;
|
||||
for (var key in node) {
|
||||
if (key === 'range')
|
||||
continue;
|
||||
|
|
|
@ -508,7 +508,7 @@ var Raster = Item.extend(/** @lends Raster# */{
|
|||
return this.getContext().createImageData(size.width, size.height);
|
||||
},
|
||||
|
||||
// DOCS: document Raster#getData
|
||||
// DOCS: document Raster#getImageData
|
||||
/**
|
||||
* @param {Rectangle} rect
|
||||
* @return {ImageData}
|
||||
|
|
Loading…
Reference in a new issue