From 3f6b66a31040b22d6d0e21f6589b45ce7a8962dc Mon Sep 17 00:00:00 2001 From: kamicane Date: Mon, 12 May 2008 18:51:51 +0000 Subject: [PATCH] - reverted [1542]. fixes #1007. git-svn-id: http://svn.mootools.net/trunk@1549 4db308c1-fb21-0410-9919-de62e267375e --- Source/Class/Class.js | 4 +++- Source/Plugins/Fx.Scroll.js | 3 ++- Source/Plugins/Fx.Slide.js | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Class/Class.js b/Source/Class/Class.js index 3f2fc2e8e..969550b95 100644 --- a/Source/Class/Class.js +++ b/Source/Class/Class.js @@ -72,9 +72,11 @@ Class.Mutators = { case 'function': // this code will be only executed if the current browser does not support function.caller (currently only opera). // we replace the function code with brute force. Not pretty, but it will only be executed if function.caller is not supported. + if (!arguments.callee.caller) self[key] = eval('(' + String(current).replace(/\bthis\.parent\(\s*(\))?/g, function(full, close){ return 'arguments.callee._parent_.call(this' + (close || ', '); - }).replace(/(\d+)\.([A-Za-z_])/g, '($1).$2') + ')'); + }) + ')'); + // end "opera" code self[key]._parent_ = previous; break; diff --git a/Source/Plugins/Fx.Scroll.js b/Source/Plugins/Fx.Scroll.js index 336a4a409..5a2fd9c1a 100644 --- a/Source/Plugins/Fx.Scroll.js +++ b/Source/Plugins/Fx.Scroll.js @@ -41,7 +41,8 @@ Fx.Scroll = new Class({ compute: function(from, to, delta){ var now = []; - (2).times(function(i){ + var x = 2; + x.times(function(i){ now.push(Fx.compute(from[i], to[i], delta)); }); return now; diff --git a/Source/Plugins/Fx.Slide.js b/Source/Plugins/Fx.Slide.js index 0e8472b3a..4546aab10 100644 --- a/Source/Plugins/Fx.Slide.js +++ b/Source/Plugins/Fx.Slide.js @@ -50,7 +50,8 @@ Fx.Slide = new Class({ compute: function(from, to, delta){ var now = []; - (2).times(function(i){ + var x = 2; + x.times(function(i){ now[i] = Fx.compute(from[i], to[i], delta); }); return now;