Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1923 closed enhancement (fixed)

shadow enhancements, optimizations and clean-ups

Reported by: brandon Owned by: paul
Priority: major Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by brandon)

I've attached a diff that includes a few optimizations, enhancements and general clean-ups of the code.

  • Saved bytes where possible
  • Renamed some variables to better match jQuery standards
  • Used jQuery.extend to map options
  • Reduced the number of calls to css
  • Removed browser detection
  • Added monitor option which defaults to false. Monitoring the element to keep the shadow in-tact is buggy and not cross browser. We shouldn't do it by default until there is better support.
  • The shadow method can be called multiple times on the same element to "rebuild" the shadow if the element has changed and is not being monitored.
  • The offset now matches the value passed in

BTW ... the test page is using and xml prologue which is throwing IE into quirks mode and is why the position _looks_ to be miscalculated. Putting the test page in standards mode resolves this issue but causes issues for the drag handles.

The monitoring in Opera does some pretty crazy stuff!

Tested using the test page in IE 6 and 7, FF 1.5 and 2, Safari 3 and Opera 9.24

Attachments (2)

fx.shadow.js.diff (7.0 KB) - added by brandon 13 years ago.
fx.shadow.js.2.diff (7.2 KB) - added by brandon 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by brandon

Attachment: fx.shadow.js.diff added

comment:1 Changed 13 years ago by brandon

This should also resolve #1808

Changed 13 years ago by brandon

Attachment: fx.shadow.js.2.diff added

comment:2 Changed 13 years ago by brandon

Updated patch to include a shadowDestroy method and use currentStyle in IE expressions.

comment:3 Changed 13 years ago by brandon

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fixed in Rev [3823]

Note: See TracTickets for help on using tickets.