MCPcopy
hub / github.com/palantir/plottable / pan

Method pan

src/interactions/panZoomInteraction.ts:114–124  ·  view source on GitHub ↗

* Pans the chart by a specified amount * * @param {Plottable.Point} [translateAmount] The amount by which to translate the x and y scales.

(translateAmount: Point)

Source from the content-addressed store, hash-verified

112 * @param {Plottable.Point} [translateAmount] The amount by which to translate the x and y scales.
113 */
114 public pan(translateAmount: Point) {
115 this.xScales().forEach((xScale) => {
116 xScale.pan(this._constrainedTranslation(xScale, translateAmount.x));
117 });
118
119 this.yScales().forEach((yScale) => {
120 yScale.pan(this._constrainedTranslation(yScale, translateAmount.y));
121 });
122
123 this._panZoomUpdateCallbacks.callCallbacks();
124 }
125
126 /**
127 * Zooms the chart by a specified amount around a specific point

Callers 2

_handlePinchMethod · 0.95
_setupDragInteractionMethod · 0.95

Calls 6

xScalesMethod · 0.95
yScalesMethod · 0.95
callCallbacksMethod · 0.80
panMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected