Class: xrx.viewbox.ViewboxZoom

xrx.viewbox. ViewboxZoom

(private) new xrx.viewbox.ViewboxZoom()

A class implementing a zooming model for the drawing view-box.
Source:

Extends

Members

(private) xrx.viewbox.ViewboxZoom#FixPoints_

Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#zoomFactor_ :number

The current zoom factor, defaults to .1.
Type:
  • number
Source:

(private) xrx.viewbox.ViewboxZoom#zoomMax_ :number

The maximum zoom value, defaults to 2.
Type:
  • number
Source:

(private) xrx.viewbox.ViewboxZoom#zoomMin_ :number

The minimum zoom value, defaults to 0.1.
Type:
  • number
Source:

Methods

(private) xrx.viewbox.ViewboxZoom#containsPoint(point)

Whether a point is contained in this view-box.
Parameters:
Name Type Description
point Array.<number> The native point, without translation.
Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#direction_() → {number}

Returns a positional utility number representing the current orientation of the view-box.
Inherited From:
Source:
Returns:
The orientation.
Type
number

xrx.viewbox.ViewboxZoom#disposeInternal()

Disposes this view-box.
Source:

(private) xrx.viewbox.ViewboxZoom#getBox() → {goog.math.Box}

Returns the bounding-box for this view-box, respecting transformation.
Inherited From:
Source:
Returns:
The bounding box, coordinates are the visibles and are transformed.
Type
goog.math.Box

(private) xrx.viewbox.ViewboxZoom#getCenterPoint_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#getFixPoint_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#getFixPoints_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#getHeight(opt_transformed, opt_visible) → {number}

Returns the height of this view-box, optionally the transformed height (respecting the current scale) and / or the visible height (respecting the current rotation).
Parameters:
Name Type Description
opt_transformed boolean Whether to return the transformed height respecting the current scale.
opt_visible boolean Whether to return the visible height respecting the current rotation.
Inherited From:
Source:
Returns:
The height.
Type
number

(private) xrx.viewbox.ViewboxZoom#getPivotPoint_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#getPivotPoints_(reverse) → {Array.<number>}

Returns the four pivot points of this view-box.
Parameters:
Name Type Description
reverse boolean If we rotate in right or left direction. If reverse is true we assume left direction otherwise right direction.
Inherited From:
Source:
Returns:
Type
Array.<number>

xrx.viewbox.ViewboxZoom#getRotation() → {number}

Returns the current rotation in degrees.
Inherited From:
Source:
Returns:
The current rotation in degrees.
Type
number

(private) xrx.viewbox.ViewboxZoom#getVisibleOrientation_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#getWidth(opt_transformed, opt_visible) → {number}

Returns the width of this view-box, optionally the transformed width (respecting the current scale) and / or the visible width (respecting the current rotation).
Parameters:
Name Type Description
opt_transformed boolean Whether to return the transformed width respecting the current scale.
opt_visible boolean Whether to return the visible width respecting the current rotation.
Inherited From:
Source:
Returns:
The width.
Type
number

xrx.viewbox.ViewboxZoom#getZoomFactor() → {number}

Returns the current zoom factor, defaults to .1.
Source:
Returns:
The zoom factor.
Type
number

xrx.viewbox.ViewboxZoom#getZoomMax() → {number}

Returns the current maximum zoom value.
Source:
Returns:
The maximum zoom value.
Type
number

xrx.viewbox.ViewboxZoom#getZoomMin() → {number}

Returns the current minimum zoom value.
Source:
Returns:
The minimum zoom value.
Type
number

xrx.viewbox.ViewboxZoom#getZoomStep(opt_zoomValuenullable) → {number}

Returns the current zoom step or the zoom step of a zoom value if opt_zoomValue is defined.
Parameters:
Name Type Attributes Description
opt_zoomValue number <nullable>
A zoom value.
Source:
Returns:
The zoom step.
Type
number

xrx.viewbox.ViewboxZoom#getZoomValue() → {number}

Returns the current zoom value.
Source:
Returns:
Type
number

(private) xrx.viewbox.ViewboxZoom#isFixPoint_(fixPoint)

Whether the fix-point is a point, that is an Array of length 2.
Parameters:
Name Type Description
fixPoint ? The fix-point.
Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#isHorizontal() → {boolean}

Whether the view-box currently is in horizontal orientation.
Inherited From:
Source:
Returns:
Whether the view-box is oriented horizontally.
Type
boolean

(private) xrx.viewbox.ViewboxZoom#isOrientation_(fixPoint)

Whether the fix-point is an orientation, that is one of xrx.drawing.Orientation.*.
Parameters:
Name Type Description
fixPoint ? The fix-point.
Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#isValidRotation(rotation) → {boolean}

Checks whether the rotation value is valid.
Parameters:
Name Type Description
rotation number The rotation in degrees.
Inherited From:
Source:
Returns:
Whether the rotation is valid.
Type
boolean

(private) xrx.viewbox.ViewboxZoom#isVertical() → {boolean}

Whether the view-box currently is in vertical orientation.
Inherited From:
Source:
Returns:
Whether the view-box is oriented vertically.
Type
boolean

(private) xrx.viewbox.ViewboxZoom#rotateBy(anglenullable, opt_fixPointnullable)

Rotates the view-box by an angle, respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
angle number <nullable>
The angle of rotation in degrees, e.g. 90 or 180.
opt_fixPoint Array.<number> | string <nullable>
A fix-point or an orientation. Defaults to the center of the view-box.
Inherited From:
Source:

(private) xrx.viewbox.ViewboxZoom#rotateBy_(anglenullable, opt_orientationnullable, opt_fixPointnullable)

Rotates the view-box by an angle, respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
angle number <nullable>
The angle of rotation in degrees, e.g. 90 or 180.
opt_orientation string <nullable>
An orientation, defaults to xrx.drawing.Orientation.C.
opt_fixPoint Array.<number> <nullable>
A fix-point, defaults to the center of the view-box.
Inherited From:
Source:

xrx.viewbox.ViewboxZoom#rotateLeft(opt_fixPointnullable)

Rotates the view-box by 90° in left direction, optionally respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
opt_fixPoint Array.<number> | string <nullable>
The fix-point.
Inherited From:
Source:

xrx.viewbox.ViewboxZoom#rotateRight(opt_fixPointnullable)

Rotates the view-box by 90° in right direction, optionally respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
opt_fixPoint Array.<number> | string <nullable>
The fix-point.
Inherited From:
Source:

xrx.viewbox.ViewboxZoom#setZoomFactor(factor)

Sets a new zoom factor, e.g. 0.1.
Parameters:
Name Type Description
factor number The new zoom factor.
Source:

xrx.viewbox.ViewboxZoom#setZoomFactorMax(value)

Sets the maximum zoom value.
Parameters:
Name Type Description
value number The maximum zoom value.
Source:

xrx.viewbox.ViewboxZoom#setZoomFactorMin(value)

Sets the minimum zoom value.
Parameters:
Name Type Description
value number The minimum zoom value.
Source:

xrx.viewbox.ViewboxZoom#zoomIn(opt_fixPoint)

Zoom in on the view-box, optionally respecting a fix-point.
Parameters:
Name Type Description
opt_fixPoint Array.<number> A fix-point.
Source:

(private) xrx.viewbox.ViewboxZoom#zoomOffset_()

Source:

xrx.viewbox.ViewboxZoom#zoomOut(opt_fixPoint)

Zoom out the view-box, optionally respecting a fix-point.
Parameters:
Name Type Description
opt_fixPoint Array.<number> A fix-point.
Source:

xrx.viewbox.ViewboxZoom#zoomTo(zoomValue, opt_fixPointnullable)

Zooms the view-box to a value, optionally respecting a fix-point.
Parameters:
Name Type Attributes Description
zoomValue number The zoom value.
opt_fixPoint number <nullable>
A fix-point.
Source: