DEMOS
DOCS
FEATURES
DOWNLOAD
PURCHASE
CONTACT
BLOG
Show:

jsPlumbToolkit.Renderers.Miniview Class

The Miniview widget. A single instance of this is paired with an instance of Surface.

The fundamental difference between this and a Surface is that a Miniview does not draw connections. Plus, it calculates its own zoom based on the ratio of the size of its viewport compared to the size of the viewport of the related Surface. In reality, a Miniview could reside inside an element that is much bigger than that in which the related Surface resides, but it does not seem likely that that would normally be the case.

The Miniview widget provides a floating window that represents a scaled version of the viewport of the related Surface. Dragging this window around causes the related Surface to pan. Resizing (via grabbing a corner and dragging) the window causes the Surface to zoom in/out (within its allowed zoom range).

All of the visual aspects of the Miniview can be controlled via CSS, and you can provide a custom CSS class to allow you to target the styles for an individual Miniview more easily.

You do not create a Miniview directly - you either specify its parameters in a render call on a jsPlumbToolkitInstance, or you call createMiniview on an existing Surface.

Item Index

Methods

getPan

() Number

Gets the current [left,top] of the panned content.

Returns:

Number:

[left,top], in pixels, of the panned content, where [0,0] is the origin of the viewport.

invalidate

()

Forces a repaint of every element, or one specified element.

setSuspended

(
  • s
  • [updateAfterwards]
)

Sets whether or not the miniview is currently suspended, ie. will not respond to changes.

Parameters:

  • s Boolean

    Suspended or not.

  • [updateAfterwards] Boolean optional

    If true, will update the state after changing the suspended state. Only makes sense to use this if you are unsuspending the widget.

update

()

Instructs the miniview to update its state.