// Shift the pan by a delta
cy.panBy(delta: Position): thisShift the pan by a delta. A no-op while panningEnabled() is false.
| Name | Description |
|---|---|
delta: Position | the rendered-space offset to add |
Fields of delta
| Name | Description |
|---|---|
x: number | |
y: number |
Returns
thisthis core, for chaining
Example
cy.pan({ x: 0, y: 0 });cy.panBy({ x: 10, y: 5 });console.log(cy.pan()); // { x: 10, y: 5 }