Options
All
  • Public
  • Public/Protected
  • All
Menu

The PostStreamScrubber component displays a scrubber which can be used to navigate/scrub through a post stream.

Attrs

  • stream
  • className

Hierarchy

Index

Constructors

constructor

Properties

adjustingHeight

adjustingHeight: undefined | boolean

Protected attrs

The attributes passed into the component.

see

https://mithril.js.org/components.html#passing-data-to-components

dragging

dragging: undefined | boolean

Protected element

element: Element

The root DOM element for the component.

handlers

handlers: undefined | {}

indexStart

indexStart: any

mouseStart

mouseStart: any

scrollListener

scrollListener: undefined | ScrollListener

Protected state

state: undefined

Class component state that is persisted between redraws.

Updating this will not automatically trigger a redraw, unlike other frameworks.

This is different to Vnode state, which is always an instance of your class component.

This is undefined by default.

stream

stream: any

Methods

Protected $

  • Returns a jQuery object for this component's element. If you pass in a selector string, this method will return a jQuery object, using the current element as its buffer.

    For example, calling component.$('li') will return a jQuery object containing all of the li elements inside the DOM element of this component.

    final

    Parameters

    • Optional selector: string

    Returns JQuery<HTMLElement>

    the jQuery object for the DOM node

goToFirst

  • goToFirst(): void

goToLast

  • goToLast(): void

onbeforeremove

onbeforeupdate

onclick

  • onclick(e: any): void

oncreate

  • oncreate(vnode: any): void

oninit

  • oninit(vnode: any): void

onmousedown

  • onmousedown(e: any): void

onmousemove

  • onmousemove(e: any): void

onmouseup

  • onmouseup(): void

onremove

  • onremove(vnode: any): void

onresize

  • onresize(): void

onupdate

  • onupdate(vnode: any): void

percentPerPost

  • percentPerPost(): { index: number; visible: number }
  • Get the percentage of the height of the scrubber that should be allocated to each post.

    property

    {Number} index The percent per post for posts on either side of the visible part of the scrubber.

    property

    {Number} visible The percent per post for the visible part of the scrubber.

    Returns { index: number; visible: number }

    • index: number
    • visible: number

updateScrubberValues

  • updateScrubberValues(options?: Partial<{ animate: boolean; forceHeightChange: boolean; fromScroll: boolean }>): void
  • Update the scrollbar's position to reflect the current values of the index/visible properties.

    Parameters

    • options: Partial<{ animate: boolean; forceHeightChange: boolean; fromScroll: boolean }> = {}

    Returns void

view

  • view(): Element

Static component

  • component<SAttrs>(attrs?: SAttrs, children?: Children): Vnode<{}, {}>

Static Protected initAttrs

  • initAttrs<T>(attrs: T): void

Generated using TypeDoc version 0.22.10