util.js 430 B

12345678910111213141516
  1. import { ObjectExt } from '@antv/x6-common';
  2. const defaults = {
  3. position: { x: 0, y: 0 },
  4. angle: 0,
  5. attrs: {
  6. '.': {
  7. y: '0',
  8. 'text-anchor': 'start',
  9. },
  10. },
  11. };
  12. export function toResult(preset, args) {
  13. const { x, y, angle, attrs } = args || {};
  14. return ObjectExt.defaultsDeep({}, { angle, attrs, position: { x, y } }, preset, defaults);
  15. }
  16. //# sourceMappingURL=util.js.map