[Prototype-core] Re: Proto 1.7rc1, problem with measuring width of elements with display: none

2010-04-27 Thread Viktor Kojouharov
Another thing I forgot to mention. In the CSS file, the div has an absolute position (which is probably why the browser can calculate its size). After reading the comment in the source: if (width (positionedWidth === width)) { // If the element's width is the same both before and

Re: [Prototype-core] Re: Any intention of providing a function.throttle?

2010-04-27 Thread Mislav Marohnić
On Sun, Apr 25, 2010 at 23:08, Cowboy Ben Alman cow...@rj3.net wrote: I've got a snippet of code that will allow you to either throttle or debounce a function, in multiple ways. Yes, this was among the existing plugins I saw. I also read the source, but I felt it was a bit too much for this

[Prototype-core] Re: Any intention of providing a function.throttle?

2010-04-27 Thread Cowboy Ben Alman
Mislav, this will minify slightly smaller (152b) than what you have (156b): Function.prototype.throttle = function( delay ) { var fn = this, timeout_id; return function(){ var that = this, args = arguments; if ( !timeout_id ) { timeout_id