* pan * Pan the map by given pixel amount * @param delta Array [dx,dy] amount to pan the map * @param duration? Duration of the transition in milliseconds, defaults to 0ms (asap) * @return this
(delta, duration = 0)
| 686 | * @return this |
| 687 | */ |
| 688 | pan(delta, duration = 0) { |
| 689 | const t = this.context.viewport.transform; |
| 690 | const [dx, dy] = vecRotate(delta, -t.r, [0, 0]); // remove any rotation |
| 691 | return this.transform({ x: t.x + dx, y: t.y + dy, k: t.k, r: t.r }, duration); |
| 692 | } |
| 693 | |
| 694 | |
| 695 | /** |