mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-12 22:18:54 -04:00
Change sequence of handleOperator arguments for better readable resulting code.
This commit is contained in:
parent
453da21bab
commit
17aee283ec
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ var PaperScript = new function() {
|
|||
'!=': 'equals'
|
||||
};
|
||||
|
||||
paper.handleOperator = function(operator, left, right) {
|
||||
paper.handleOperator = function(left, operator, right) {
|
||||
var handler = operators[operator];
|
||||
if (left && left[handler]) {
|
||||
var res = left[handler](right);
|
||||
|
@ -66,7 +66,7 @@ var PaperScript = new function() {
|
|||
if (operators[operator] && isDynamic(left)) {
|
||||
// Replace with paper.handleOperator(operator, left, right):
|
||||
return ['call', ['dot', ['name', 'paper'], 'handleOperator'],
|
||||
[['string', operator], left, right]];
|
||||
[left, ['string', operator], right]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue