side.js 1.1 KB

123456789101112131415161718192021222324252627
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.bottom = exports.top = exports.right = exports.left = exports.manual = void 0;
  4. const util_1 = require("./util");
  5. const manual = (portPosition, elemBBox, args) => (0, util_1.toResult)({ position: elemBBox.getTopLeft() }, args);
  6. exports.manual = manual;
  7. const left = (portPosition, elemBBox, args) => (0, util_1.toResult)({
  8. position: { x: -15, y: 0 },
  9. attrs: { '.': { y: '.3em', 'text-anchor': 'end' } },
  10. }, args);
  11. exports.left = left;
  12. const right = (portPosition, elemBBox, args) => (0, util_1.toResult)({
  13. position: { x: 15, y: 0 },
  14. attrs: { '.': { y: '.3em', 'text-anchor': 'start' } },
  15. }, args);
  16. exports.right = right;
  17. const top = (portPosition, elemBBox, args) => (0, util_1.toResult)({
  18. position: { x: 0, y: -15 },
  19. attrs: { '.': { 'text-anchor': 'middle' } },
  20. }, args);
  21. exports.top = top;
  22. const bottom = (portPosition, elemBBox, args) => (0, util_1.toResult)({
  23. position: { x: 0, y: 15 },
  24. attrs: { '.': { y: '.6em', 'text-anchor': 'middle' } },
  25. }, args);
  26. exports.bottom = bottom;
  27. //# sourceMappingURL=side.js.map