Miniview plugin for Surface.

Hierarchy (view full)

Implements

Properties

activeTracking: boolean

When true, which is the default, miniview elements move at the same time as their related element in the surface is being dragged.

clickToCenter: boolean

Defaults to true, meaning a click on a node/group in the miniview will cause that node/group to be centered in the related surface.

Methods

  • Bind an event listener. This method can be used with a type parameter by call sites; although it's not necessary it can be helpful to use this to ensure you've thought about what the payload to your event handler is going to be.

    Type Parameters

    • T = any

    Parameters

    • event: string

      Name of the event(s) to bind to.

    • listener: ((a, e?) => any)

      Function to bind to the given event(s)

        • (a, e?): any
        • Parameters

          • a: T
          • Optional e: any

          Returns any

    • Optional insertAtStart: boolean

      Whether or not to insert this listener at the head of the listener queue. Defaults to false.

    Returns EventGenerator

  • Fire the named event.

    Type Parameters

    • T

    Parameters

    • event: string

      Event to fire

    • Optional value: T

      Value to pass to event handlers

    • Optional originalEvent: Event

      Optional original event that caused this event to be fired.

    Returns any

  • Sets whether or not the miniview is visible. Strictly speaking you don't need to use this method you can just control the miniview's container via your own CSS or whatever. But the Surface uses this occasionally, and there is also the concept of having the miniview initially invisible until the related surface contains some data.

    Parameters

    • v: boolean

    Returns void

  • Unbind the given event listener, or all listeners. If you call this method with no arguments then all event listeners are unbound.

    Parameters

    • Optional eventOrListener: string | Function

      Either an event name, or an event handler function

    • Optional listener: Function

      If eventOrListener is defined, this is the event handler to unbind.

    Returns EventGenerator