transpose.js 670 B

12345678910111213141516171819202122
  1. /**
  2. * Exchange dimensions of the vector.
  3. * @param params [tx, ty]
  4. * @param x x of the the bounding box of coordinate
  5. * @param y y of the the bounding box of coordinate
  6. * @param width width of the the bounding box of coordinate
  7. * @param height height of the the bounding box of coordinate
  8. * @returns transformer
  9. */
  10. export var transpose = function (params, x, y, width, height) {
  11. return {
  12. transform: function (_a) {
  13. var x = _a[0], y = _a[1];
  14. return [y, x];
  15. },
  16. untransform: function (_a) {
  17. var x = _a[0], y = _a[1];
  18. return [y, x];
  19. },
  20. };
  21. };
  22. //# sourceMappingURL=transpose.js.map