mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Improve previous getter / setter check in Bootstrap.
This commit is contained in:
parent
8a0a0712cd
commit
a7dc48951d
1 changed files with 3 additions and 3 deletions
|
@ -56,12 +56,13 @@ new function() {
|
|||
|
||||
function field(name, val, dontCheck, generics) {
|
||||
var val = val || (val = describe(src, name)) && (val.get ? val : val.value),
|
||||
func = typeof val == 'function', res = val, prev = val && val.get ? null : dest[name];
|
||||
func = typeof val == 'function', res = val,
|
||||
prev = preserve || func ? (val && val.get ? name in dest : dest[name]) : null;
|
||||
if (generics && func && (!preserve || !generics[name])) generics[name] = function(bind) {
|
||||
return bind && dest[name].apply(bind,
|
||||
Array.prototype.slice.call(arguments, 1));
|
||||
}
|
||||
if ((dontCheck || val !== undefined && has(src, name)) && (!prev || !preserve)) {
|
||||
if ((dontCheck || val !== undefined && has(src, name)) && (!preserve || !prev)) {
|
||||
if (func) {
|
||||
if (prev && /\bthis\.base\b/.test(val)) {
|
||||
var fromBase = base && base[name] == prev;
|
||||
|
@ -4111,4 +4112,3 @@ Fx.Transitions.inject(['Quad', 'Cubic', 'Quart', 'Quint'].each(function(name, i)
|
|||
return Math.pow(p, i + 2);
|
||||
}
|
||||
}, {}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue