* Translates the image. * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/translate * @param {number} x The translating distance in the horizontal direction. * @param
(x: number, y: number = x)
| 654 | * @returns {CropperImage} Returns `this` for chaining. |
| 655 | */ |
| 656 | $translate(x: number, y: number = x): this { |
| 657 | if (this.translatable && isNumber(x) && isNumber(y)) { |
| 658 | this.$transform(1, 0, 0, 1, x, y); |
| 659 | } |
| 660 | |
| 661 | return this; |
| 662 | } |
| 663 | |
| 664 | /** |
| 665 | * Transforms the image. |
no test coverage detected