GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • @maxgraph/core

This view

  • Original page
  • New address

GeezerVison is showing maxgraph.github.io — Animation | @maxgraph/core

  • Animation

Class Animation

Implements a basic animation in JavaScript.

Hierarchy (View Summary)

  • EventSource
    • Animation
      • Morphing
  • Defined in view/animate/Animation.ts:28
Index

Constructors

constructor

Properties

delay eventListeners eventsEnabled eventSource thread

Methods

addListener destroy fireEvent getEventSource isEventsEnabled isRunning removeListener setEventsEnabled setEventSource startAnimation stopAnimation updateAnimation

Constructors

constructor

  • new Animation(delay?: number): Animation

    Parameters

    • delay: number = 20

    Returns Animation

    Overrides EventSource.constructor

    • Defined in view/animate/Animation.ts:29

Properties

delay

delay: number

Specifies the delay between the animation steps.

Default

20ms
  • Defined in view/animate/Animation.ts:38

eventListeners

eventListeners: EventListenerObject[] = []

Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.

Inherited from EventSource.eventListeners

  • Defined in view/event/EventSource.ts:58

eventsEnabled

eventsEnabled: boolean = true

Specifies if events can be fired. Default is true.

Inherited from EventSource.eventsEnabled

  • Defined in view/event/EventSource.ts:63

eventSource

eventSource: EventTarget | null = null

Optional source for events.

Default

null

Inherited from EventSource.eventSource

  • Defined in view/event/EventSource.ts:69

thread

thread: number | null = null

Reference to the thread while the animation is running.

  • Defined in view/animate/Animation.ts:43

Methods

addListener

  • addListener(name: string, funct: Function): void

    Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.

    The parameters of the listener are the sender and an EventObject.

    Parameters

    • name: string
    • funct: Function

    Returns void

    Inherited from EventSource.addListener

    • Defined in view/event/EventSource.ts:105

destroy

  • destroy(): void

    Clears all registered event listeners.

    Subclasses with a destroy method should call super.destroy() at the end of their own cleanup to ensure no stale listeners remain.

    Returns void

    Inherited from EventSource.destroy

    • Defined in view/event/EventSource.ts:166

fireEvent

  • fireEvent(evt: EventObject, sender?: EventTarget | null): void

    Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation.

    Example:

    fireEvent(new EventObject("eventName", key1, val1, .., keyN, valN))
    

    Parameters

    • evt: EventObject

      EventObject that represents the event.

    • sender: EventTarget | null = null

      Optional sender to be passed to the listener. Default value is the return value of getEventSource.

    Returns void

    Inherited from EventSource.fireEvent

    • Defined in view/event/EventSource.ts:139

getEventSource

  • getEventSource(): EventTarget | null

    Returns eventSource.

    Returns EventTarget | null

    Inherited from EventSource.getEventSource

    • Defined in view/event/EventSource.ts:88

isEventsEnabled

  • isEventsEnabled(): boolean

    Returns eventsEnabled.

    Returns boolean

    Inherited from EventSource.isEventsEnabled

    • Defined in view/event/EventSource.ts:74

isRunning

  • isRunning(): boolean

    Returns true if the animation is running.

    Returns boolean

    • Defined in view/animate/Animation.ts:48

removeListener

  • removeListener(funct: Function): void

    Removes all occurrences of the given listener from eventListeners.

    Parameters

    • funct: Function

    Returns void

    Inherited from EventSource.removeListener

    • Defined in view/event/EventSource.ts:112

setEventsEnabled

  • setEventsEnabled(value: boolean): void

    Sets eventsEnabled.

    Parameters

    • value: boolean

    Returns void

    Inherited from EventSource.setEventsEnabled

    • Defined in view/event/EventSource.ts:81

setEventSource

  • setEventSource(value: EventTarget | null): void

    Sets eventSource.

    Parameters

    • value: EventTarget | null

    Returns void

    Inherited from EventSource.setEventSource

    • Defined in view/event/EventSource.ts:95

startAnimation

  • startAnimation(): void

    Starts the animation by repeatedly invoking updateAnimation.

    Returns void

    • Defined in view/animate/Animation.ts:55

stopAnimation

  • stopAnimation(): void

    Stops the animation by deleting the timer and fires an Event#DONE.

    Returns void

    • Defined in view/animate/Animation.ts:73

updateAnimation

  • updateAnimation(): void

    Hook for subclassers to implement the animation. Invoke stopAnimation when finished, startAnimation to resume. This is called whenever the timer fires and fires an mxEvent.EXECUTE event with no properties.

    Returns void

    • Defined in view/animate/Animation.ts:66

Settings

Member Visibility
  • Protected
  • Inherited
Theme

On This Page

Constructors
constructor
Properties
delayeventListenerseventsEnabledeventSourcethread
Methods
addListenerdestroyfireEventgetEventSourceisEventsEnabledisRunningremoveListenersetEventsEnabledsetEventSourcestartAnimationstopAnimationupdateAnimation
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.