Home Reference Source
import StickyViewController from '~/controllers/StickyViewController.js'
public class | source

StickyViewController

Extends:

ViewController → StickyViewController

Static Member Summary

Static Public Members
public static get

Constructor Summary

Public Constructor
public

constructor(elem: HTMLElement, scrollContainer: HTMLElement, prop: ScrollProperty)

Creates a StickyViewController which is based in a specific parent.

Inherited Summary

From class ViewController
public static

forClass(className: string, predicate: Function, root: HTMLElement)

Creates a view controller directly for all members of a class.

public static

of(elem: string | Element): ViewController

Returns a canolical VC of an element if it exists

Static Public Members

public static get global source

Public Constructors

public constructor(elem: HTMLElement, scrollContainer: HTMLElement, prop: ScrollProperty) source

Creates a StickyViewController which is based in a specific parent.

Override:

ViewController#constructor

Params:

NameTypeAttributeDescription
elem HTMLElement

Element to make sticky

scrollContainer HTMLElement

Scroll element. You can use StickyViewController.global for the global scrolling element. This should be a parent of elem.

prop ScrollProperty
  • optional
  • default: margin

Property to use to offset scroll.