Home

# Class goog.ui.ScrollFloater

Creates a ScrollFloater; see file overview for details.

extends goog.ui.Component

Instance Method Summary

`applyIeBgHack_()`

Sets some magic CSS properties that make float-scrolling work smoothly in IE6 (and IE7 in quirks mode). Without this hack, the floating element will appear jumpy when you scroll the document. This involves modifying the background of the HTML element (or BODY in quirks mode). If there's already a background image in use this is not required. For further reading, see http://annevankesteren.nl/2005/01/position-fixed-in-ie

| `createDom()` Delegates dom creation to superclass, then constructs and decorates required DOM elements.
| `decorateInternal(?Element element)` Decorates the floated element with the standard ScrollFloater CSS class.
| `disposeInternal()` Disposes of the component. Calls {@code exitDocument}, which is expected to remove event handlers and clean up the component. Propagates the call to the component's children, if any. Removes the component's DOM from the document unless it was decorated.
| `enterDocument()` Called when the component's element is known to be in the document. Anything using document.getElementById etc. should be done at this stage. If the component contains child components, this call is propagated to its children.
| `handleResize_()` Responds to window resize events by snapping the floater back to the new version of its original position, then allowing it to float again if appropriate.
| `isFloating() ⇒ boolean`
| `isScrollingEnabled() ⇒ boolean`
| `needsIePositionHack_() ⇒ boolean` Determines whether we need to apply the position hack to emulated position: fixed on this browser.
| `setScrollingEnabled(boolean enable)` Sets whether the element should be floated if it scrolls out of view.
| `startFloating_()` Begins floating behavior, making the element position:fixed (or IE hacked equivalent) and inserting a placeholder where it used to be to keep the layout from shifting around.
| `stopFloating_()` Stops floating behavior, returning element to its original state.
| `update_(?goog.events.Event= opt_e)` When a scroll event occurs, compares the element's position to the current document scroll position, and stops or starts floating behavior if needed.