Class PosAnimation

L.Class powers the OOP facilities of Leaflet and is used to create almost all of the Leaflet classes documented.

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(): PosAnimation

Creates a PosAnimation object.

Returns

PosAnimation

Methods

public addEventListener(type: string, fn: (e: L.LeafletEvent) => void, context?: any): PosAnimation

Parameters

  • type: string
  • fn: (e: L.LeafletEvent) => void
  • context?: any optional

Returns

PosAnimation

public addEventListener(eventMap: any, context?: any): PosAnimation

Parameters

  • eventMap: any
  • context?: any optional

Returns

PosAnimation

public addOneTimeEventListener(type: string, fn: (e: L.LeafletEvent) => void, context?: any): PosAnimation

Parameters

  • type: string
  • fn: (e: L.LeafletEvent) => void
  • context?: any optional

Returns

PosAnimation

public clearAllEventListeners(): PosAnimation

Returns

PosAnimation

public fire(type: string, data?: any): PosAnimation

Parameters

  • type: string
  • data?: any optional

Returns

PosAnimation

public fireEvent(type: string, data?: any): PosAnimation

Parameters

  • type: string
  • data?: any optional

Returns

PosAnimation

public hasEventListeners(type: string): boolean

Parameters

  • type: string

Returns

boolean

public off(type: string, fn?: (e: L.LeafletEvent) => void, context?: any): PosAnimation

Parameters

  • type: string
  • fn?: (e: L.LeafletEvent) => void optional
  • context?: any optional

Returns

PosAnimation

public off(eventMap?: any, context?: any): PosAnimation

Parameters

  • eventMap?: any optional
  • context?: any optional

Returns

PosAnimation

public on(type: string, fn: (e: L.LeafletEvent) => void, context?: any): PosAnimation

Parameters

  • type: string
  • fn: (e: L.LeafletEvent) => void
  • context?: any optional

Returns

PosAnimation

public on(eventMap: any, context?: any): PosAnimation

Parameters

  • eventMap: any
  • context?: any optional

Returns

PosAnimation

public once(type: string, fn: (e: L.LeafletEvent) => void, context?: any): PosAnimation

Parameters

  • type: string
  • fn: (e: L.LeafletEvent) => void
  • context?: any optional

Returns

PosAnimation

public removeEventListener(type: string, fn?: (e: L.LeafletEvent) => void, context?: any): PosAnimation

Parameters

  • type: string
  • fn?: (e: L.LeafletEvent) => void optional
  • context?: any optional

Returns

PosAnimation

public removeEventListener(eventMap?: any, context?: any): PosAnimation

Parameters

  • eventMap?: any optional
  • context?: any optional

Returns

PosAnimation

public 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
  • duration?: number optional
  • easeLinearity?: number optional

Returns

PosAnimation