mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Some tweaks to potentially support strict mode.
This commit is contained in:
parent
f04dd14309
commit
866dcb50dd
3 changed files with 6 additions and 4 deletions
|
@ -14,7 +14,7 @@
|
|||
* @name PaperScript
|
||||
* @namespace
|
||||
*/
|
||||
Base.exports.PaperScript = (function() {
|
||||
Base.exports.PaperScript = function() {
|
||||
// Locally turn of exports and define for inlined acorn.
|
||||
// Just declaring the local vars is enough, as they will be undefined.
|
||||
var exports, define,
|
||||
|
@ -590,4 +590,4 @@ Base.exports.PaperScript = (function() {
|
|||
};
|
||||
// Pass on `this` as the binding object, so we can reference Acorn both in
|
||||
// development and in the built library.
|
||||
}).call(this);
|
||||
}.call(this);
|
||||
|
|
|
@ -123,4 +123,4 @@ var paper = function(self, undefined) {
|
|||
|
||||
/*#*/ include('export.js');
|
||||
return paper;
|
||||
}(typeof self === 'object' ? self : null);
|
||||
}.call(this, typeof self === 'object' ? self : null);
|
||||
|
|
|
@ -171,7 +171,9 @@ var Style = Base.extend(new function() {
|
|||
var old = this._values[key];
|
||||
if (old !== value) {
|
||||
if (isColor) {
|
||||
if (old)
|
||||
// The old value may be a native string or other color
|
||||
// description that wasn't coerced to a color object yet
|
||||
if (old && old._owner !== undefined)
|
||||
old._owner = undefined;
|
||||
if (value && value.constructor === Color) {
|
||||
// Clone color if it already has an owner.
|
||||
|
|
Loading…
Reference in a new issue