WCH

Small bug fix

Building upon the techniques I wrote about, WCH is recoded in such manner. By itself, this would not warrant an entry, but I also introduced one change.

Previously, when you first call WCH.Apply("layer", "cont"), it would create an iFrame with an id of WCHhiderlayer. It will also position the iFrame to be the exact size and at exact position (exact…more or less) as the layer is (minding the positioned container). All fine until now.

However, if the layer changes its position or size, its corresponding WCH layer will not. I noticed this bug when testing out ADxMenu behavior when window is resized.

Apply method now has 3rd parameter, bResize. If its value is true, and the iFrame needed already exists, sizing and positioning will be repeated.

this.Apply = function(vLayer, vContainer, <strong>bResize</strong>) {
  ...
  if ( _bIE55 && 
    (oIframe = _Hider(vLayer, vContainer, <strong>bResize</strong>)) ) {
  ...
};
...
function _Hider(vLayer, vContainer, bResize) {
  ...
  if ( !oIframe ) {
    ...<strong>
  } else if (bResize) {
    _SetPos(oIframe, oLayer);
</strong>  }
  ...
};

Now you just need to decide when should this parameter be true.