Options
All
  • Public
  • Public/Protected
  • All
Menu
example
var outline = new mxOutline(graph, div);

If an outline is used in an mxWindow in IE8 standards mode, the following code makes sure that the shadow filter is not inherited and that any transparent elements in the graph do not show the page background, but the background of the graph container.

example
if (document.documentMode == 8)
{
  container.style.filter = 'progid:DXImageTransform.Microsoft.alpha(opacity=100)';
}

To move the graph to the top, left corner the following code can be used.

example
var scale = graph.view.scale;
var bounds = graph.getGraphBounds();
graph.view.setTranslate(-bounds.x / scale, -bounds.y / scale);

To toggle the suspended mode, the following can be used.

example
outline.suspended = !outln.suspended;
if (!outline.suspended)
{
  outline.update(true);
}

Hierarchy

  • mxOutline

Index

Constructors

constructor

Properties

border

border: number

Border to be added at the bottom and right.

default

10

enabled

enabled: boolean

Specifies if events are handled.

default

true

forceVmlHandles

forceVmlHandles: number

Specifies if VML should be used to render the handles in this control. This is true for IE8 standards mode and false for all other browsers and modes. This is a workaround for rendering issues of HTML elements over elements with filters in IE 8 standards mode.

graphRenderHint

graphRenderHint: string

Renderhint to be used for the outline graph.

default

faster

labelsVisible

labelsVisible: boolean

Specifies if labels should be visible in the outline.

default

false

minScale

minScale: number

Minimum scale to be used.

default

0.0001

outline

outline: mxGraph

Reference to the mxGraph that renders the outline.

showViewport

showViewport: boolean

Specifies a viewport rectangle should be shown.

default

true

sizerImage

sizerImage: mxImage

Optional mxImage to be used for the sizer.

default

null

sizerSize

sizerSize: number

Specifies the size of the sizer handler.

default

8

source

source: mxGraph

Reference to the source mxGraph.

suspended

suspended: boolean

Optional boolean flag to suspend updates. This flag will also suspend repaints of the outline. To toggle this switch, use the following code.

default

false

example
nav.suspended = !nav.suspended;

if (!nav.suspended)
{
  nav.update(true);
}

updateOnPan

updateOnPan: boolean

Specifies if update should be called for mxEvent.PAN in the source graph.

default

false

Methods

createGraph

  • createGraph(container: HTMLElement): mxGraph

createSizer

destroy

  • destroy(): void

getOutlineOffset

  • getOutlineOffset(scale?: number): mxPoint

getSourceContainerSize

getSourceGraphBounds

getTranslateForEvent

  • Gets the translate for the given mouse event. Here is an example to limit the outline to stay within positive coordinates:

    example
    outline.getTranslateForEvent(me)
    {
      var pt = new mxPoint(me.getX() - this.startX, me.getY() - this.startY);
    
      if (!this.zoom)
      {
        var tr = this.source.view.translate;
        pt.x = Math.max(tr.x * this.outline.view.scale, pt.x);
        pt.y = Math.max(tr.y * this.outline.view.scale, pt.y);
      }
    
      return pt;
    };
    

    Parameters

    Returns mxPoint

init

  • init(container: HTMLElement): void
  • Initializes the outline inside the given container.

    Parameters

    • container: HTMLElement

    Returns void

isEnabled

  • isEnabled(): boolean

mouseDown

mouseMove

mouseUp

refresh

  • refresh(): void

setEnabled

  • setEnabled(value: boolean): void
  • Enables or disables event handling. This implementation updates enabled.

    Parameters

    • value: boolean

      Boolean that specifies the new enabled state.

    Returns void

setZoomEnabled

  • setZoomEnabled(value: boolean): void
  • Enables or disables the zoom handling by showing or hiding the respective handle.

    Parameters

    • value: boolean

      Boolean that specifies the new enabled state.

    Returns void

update

  • update(revalidate: boolean): void

Generated using TypeDoc