transpose.js 799 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.transpose = void 0;
  4. /**
  5. * Exchange dimensions of the vector.
  6. * @param params [tx, ty]
  7. * @param x x of the the bounding box of coordinate
  8. * @param y y of the the bounding box of coordinate
  9. * @param width width of the the bounding box of coordinate
  10. * @param height height of the the bounding box of coordinate
  11. * @returns transformer
  12. */
  13. var transpose = function (params, x, y, width, height) {
  14. return {
  15. transform: function (_a) {
  16. var x = _a[0], y = _a[1];
  17. return [y, x];
  18. },
  19. untransform: function (_a) {
  20. var x = _a[0], y = _a[1];
  21. return [y, x];
  22. },
  23. };
  24. };
  25. exports.transpose = transpose;
  26. //# sourceMappingURL=transpose.js.map