Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.49 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Y.WidgetPositionAlign.prototype._attachUIHandles: function() {
  2.     if (this._uiHandles) { return; }
  3.  
  4.     var syncAlign = Y.bind(this._syncAlign, this);
  5.  
  6.     this._uiHandles = [
  7.         Y.one(WINDOW).on(RESIZE, syncAlign),
  8.         Y.on(SCROLL, syncAlign),
  9.         this.after("destroy", this._detachUIHandles)
  10.     ];
  11. };
  12.  
  13. Y.WidgetPositionAlign.prototype._detachUIHandles = function () {
  14.     if (this._uiHandles) {
  15.         new Y.EventHandle(this._uiHandles).detach();
  16.  
  17.         this._uiHandles = null;
  18.     }
  19. }