On 1/3/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Yehuda Katz schrieb:
> > Mike,
> >
> > It almost certainly would require dimensions.js. That said, I wouldn't
> > mind. I suspect that dimensions.js will become a pretty universally used
> > plugin in the near future. It adds some nice cross-browser stuff that's
> > really frequently used, and it's pretty small.
>
> And it's pretty slow and it's not compatible with existing scripts, e.g.
> you cannot easily use it, if you have scripts that rely on functions
> being overwritten by the dimensions plugin.
>
> The autoheight option in the tabs for example is broken if you use the
> dimensions plugin as well. I'd rather not check my plugins against a
> bunch of other plugins as well. Why I'm not using the dimensions plugin
> for Plazes I have written elsewhere. Maybe for the next version, where I
> will use it right from the beginning.
>
>
> > At this point, I would say that any new jQuery user include
> > dimensions.js and forms.js by default. They both extend jQuery in really
> > useful and needed ways.
>
> I can only say it again: I'm a great opponent of overwriting existing
> functionality. The form plugin doesn't do that anymore.

The dimensions plugin does not overwrite anything anymore. It only
*extends*. If you are currently using the .height() and .width()
methods from the core and then include dimensions.js, it will *not*
break anything. If it does, then please log it in the bug tracker so
it can be resolved.

In general the dimensions plugin is *not* slow. The offset method is
slow but it is a slow and painful process to get the proper offset of
an element. Using the offset method on mousemove will of course cause
problems. We can solve problems like these by caching. The only reason
the offset method is visually slow is because people aren't aware of
the true difficulty in getting the offset. Using it once and caching
the value will suffice in most use-cases and will not slow down any
applications.

With that said, Paul and I are working to try and improve the speed on
the offset method ... perhaps having two methods, one called
.position() and one called .offset(). The .offset() would stay as it
currently is, very comprehensive and the .position() would only return
the top and left. The .position() should be much faster when dealing
with *lots* of nodes, like 1000 nested nodes. There should be a follow
up post about this sometime in the near future.

Again if there are any other areas where any one feels speed should be
increased or any way it conflicts with the core ... please post it
here or log in it the bug tracker.

--
Brandon Aaron

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to