Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Draw"

Index

Variables

TEXTTRUNLEN

TEXTTRUNLEN: number = 15

Hardcoded text truncation threshold for course blocks.

calendarwidth

calendarwidth: number = 800

Hardcoded SVG-space calendar width.

dayscale

dayscale: Ordinal<string, Object> = d3.scale.ordinal()

A standard scale to use for the calendar's Days.

outsidefuncs

outsidefuncs: any[] = []

Ugly hack to allow Draw-related functions to call the update display function. At startup, outsidefuncs is assigned a reference to the update display function.

tickformat

tickformat: Format = d3.time.format("%H:%M")

Formatter for the time labels.

transitiontime

transitiontime: number = 1000

Hardcoded transition time.

transitiontype

transitiontype: string = "cubic-out"

Hardcoded transition easing function.

Functions

TT

  • TT(): number
  • Shorthand for returning transitiontime.

    Returns number

TTy

  • TTy(): string
  • Shorthand for returning transitiontype.

    Returns string

reassignIndexes

  • reassignIndexes(calendars: Calendar[]): void
  • "Moves up" rendered calendars so that there are no gaps. Usually called after removing a calendar.

    Parameters

    Returns void

redrawLines

  • redrawLines(axisorigin: string): void
  • deprecated

    #verticallines seems to be null on runtime.

    Parameters

    • axisorigin: string

      CSS transform-formatted string

    Returns void

removeCourseBlock

  • A d3 callback function to handle removal of a course on click.

    Parameters

    • d: SelectedCourse

      d3 data parameter

    • i: number

      d3 index parameter

    • obj: Calendar

      The calendar the course block resides in.

    Returns void

transitionViewTo

  • transitionViewTo(index: number, calendars: Calendar[]): void
  • Smoothly change the "camera" to focus on the given calendar.

    Parameters

    • index: number

      The index of the calendar to focus on.

    • calendars: Calendar[]

      The master list of calendars.

    Returns void

updateCreditsTotal

  • updateCreditsTotal(obj: Calendar): void
  • Sums up the selected credits and transitions the counter's number.

    Parameters

    • obj: Calendar

      The calendar whose credits are to be summed.

    Returns void

Generated using TypeDoc