Skip to content

5.18.5

Compare
Choose a tag to compare
@xiaoiver xiaoiver released this 18 Jul 04:55
· 108 commits to next since this release
aad508e

5.18.5

Patch Changes

  • 6757ccb: Return an unprecise bound of HTML before it appending to document.
const html = new HTML({
  style: {
    x: 100,
    y: 100,
    width: 100,
    height: 100,
    innerHTML: '<h1>This is Title</h1>',
  },
});

// Use x/y/width/height defined by user.
const bounds = html.getBounds();
expect(bounds.halfExtents[0]).toBe(50);
expect(bounds.halfExtents[1]).toBe(50);
expect(bounds.center[0]).toBe(150);
expect(bounds.center[1]).toBe(150);