mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Remove redundant scope by sharing one between browser and server code.
This commit is contained in:
parent
0ee1e80c68
commit
7c2fabd6a1
1 changed files with 4 additions and 4 deletions
|
@ -443,7 +443,9 @@ var View = this.View = PaperScopeItem.extend(/** @lends View# */{
|
||||||
_views: {},
|
_views: {},
|
||||||
_id: 0
|
_id: 0
|
||||||
}
|
}
|
||||||
}, new function() { // Injection scope for mouse handlers
|
}, new function() {
|
||||||
|
// Injection scope for special code on browser (mouse events)
|
||||||
|
// and server (rendering)
|
||||||
/*#*/ if (options.browser) {
|
/*#*/ if (options.browser) {
|
||||||
var tool,
|
var tool,
|
||||||
timer,
|
timer,
|
||||||
|
@ -579,9 +581,7 @@ var View = this.View = PaperScopeItem.extend(/** @lends View# */{
|
||||||
updateFocus: updateFocus
|
updateFocus: updateFocus
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/*#*/ } // options.browser
|
/*#*/ } else if (options.server) {
|
||||||
}, new function() {
|
|
||||||
/*#*/ if (options.server) {
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
// Utility function that converts a number to a string with
|
// Utility function that converts a number to a string with
|
||||||
// x amount of padded 0 digits:
|
// x amount of padded 0 digits:
|
||||||
|
|
Loading…
Reference in a new issue