mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Some minor cleanups.
This commit is contained in:
parent
46f415ca81
commit
7781ecb76a
2 changed files with 9 additions and 9 deletions
|
@ -271,10 +271,10 @@ Base.exports.PaperScript = (function() {
|
||||||
base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||||
value = (Math.abs(value) << 1) + (value < 0 ? 1 : 0);
|
value = (Math.abs(value) << 1) + (value < 0 ? 1 : 0);
|
||||||
while (value || !res) {
|
while (value || !res) {
|
||||||
var next = value & ((1 << 5) - 1);
|
var next = value & (32 - 1);
|
||||||
value >>= 5;
|
value >>= 5;
|
||||||
if (value)
|
if (value)
|
||||||
next |= (1 << 5);
|
next |= 32;
|
||||||
res += base64[next];
|
res += base64[next];
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
14
src/node.js
14
src/node.js
|
@ -74,13 +74,13 @@ DOMParser.prototype.parseFromString = function(string, contenType) {
|
||||||
return div.firstChild;
|
return div.firstChild;
|
||||||
};
|
};
|
||||||
|
|
||||||
var sourceMaps = {};
|
var sourceMaps = {},
|
||||||
var sourceMapSupport = {
|
sourceMapSupport = {
|
||||||
retrieveSourceMap: function(source) {
|
retrieveSourceMap: function(source) {
|
||||||
var map = sourceMaps[source];
|
var map = sourceMaps[source];
|
||||||
return map ? { url: source, map: map } : null;
|
return map ? { url: source, map: map } : null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Register the .pjs extension for automatic compilation as PaperScript
|
// Register the .pjs extension for automatic compilation as PaperScript
|
||||||
require.extensions['.pjs'] = function(module, filename) {
|
require.extensions['.pjs'] = function(module, filename) {
|
||||||
|
|
Loading…
Reference in a new issue