// Offset positions by a vector or along one axis
eles.shift(dim: string | Position, value?: number): thisOffset positions by a vector or along one axis.
| Name | Description |
|---|---|
dim: string | Position | a |
value: number? | the offset, when |
Fields of dim
| Name | Description |
|---|---|
x: number | |
y: number |
Returns
thisthis collection, for chaining
Example
cy.nodes().shift({ x: 10, y: 0 });console.log(cy.getElementById('a').position('x')); // 10