Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PosAnimation

Hierarchy

Implements

Index

Constructors

constructor

  • Creates a PosAnimation object.

    Returns PosAnimation

Methods

addEventListener

  • addEventListener(type: string, fn: function, context?: any): PosAnimation
  • addEventListener(eventMap: any, context?: any): PosAnimation

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: function, context?: any): PosAnimation
  • Parameters

    Returns PosAnimation

clearAllEventListeners

fire

  • Parameters

    • type: string
    • Optional data: any

    Returns PosAnimation

fireEvent

hasEventListeners

  • hasEventListeners(type: string): boolean

off

  • Parameters

    • type: string
    • Optional fn: function
    • Optional context: any

    Returns PosAnimation

  • Parameters

    • Optional eventMap: any
    • Optional context: any

    Returns PosAnimation

on

  • Parameters

    Returns PosAnimation

  • Parameters

    • eventMap: any
    • Optional context: any

    Returns PosAnimation

once

  • once(type: string, fn: function, context?: any): PosAnimation
  • Parameters

    Returns PosAnimation

removeEventListener

  • removeEventListener(type: string, fn?: function, context?: any): PosAnimation
  • removeEventListener(eventMap?: any, context?: any): PosAnimation

run

  • run(element: HTMLElement, newPos: Point, duration?: number, easeLinearity?: number): PosAnimation
  • Run an animation of a given element to a new position, optionally setting duration in seconds (0.25 by default) and easing linearity factor (3rd argument of the cubic bezier curve, 0.5 by default)

    Parameters

    • element: HTMLElement
    • newPos: Point
    • Optional duration: number
    • Optional easeLinearity: number

    Returns PosAnimation

Static addInitHook

  • addInitHook(methodName: string, ...args: any[]): void
  • You can also use the following shortcut when you just need to make one additional method call.

    Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns void

Static extend

  • You use L.Class.extend to define new classes, but you can use the same method on any class to inherit from it.

    Parameters

    Returns any