@dnncommunity/dnn-elements 0.14.0 → 0.14.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/dnn-button_16.cjs.entry.js +21 -15
  2. package/dist/cjs/dnn-button_16.cjs.entry.js.map +1 -1
  3. package/dist/cjs/dnn-vertical-splitview.cjs.entry.js +21 -15
  4. package/dist/cjs/dnn-vertical-splitview.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dnn.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +22 -16
  8. package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js.map +1 -1
  9. package/dist/dnn/dnn-vertical-splitview.entry.js +21 -15
  10. package/dist/dnn/dnn-vertical-splitview.entry.js.map +1 -1
  11. package/dist/dnn/dnn-vertical-splitview.system.entry.js +1 -1
  12. package/dist/dnn/dnn-vertical-splitview.system.entry.js.map +1 -1
  13. package/dist/dnn/dnn.esm.js +1 -1
  14. package/dist/dnn/dnn.system.js +1 -1
  15. package/dist/dnn/dnn.system.js.map +1 -1
  16. package/dist/dnn/{p-4d2d8419.system.entry.js → p-755d047d.system.entry.js} +2 -2
  17. package/dist/dnn/p-755d047d.system.entry.js.map +1 -0
  18. package/dist/dnn/{p-e4da2e36.entry.js → p-8ec1f3a8.entry.js} +4 -4
  19. package/dist/dnn/p-8ec1f3a8.entry.js.map +1 -0
  20. package/dist/dnn/p-f91193e2.system.js +1 -1
  21. package/dist/dnn/p-f91193e2.system.js.map +1 -1
  22. package/dist/esm/dnn-button_16.entry.js +21 -15
  23. package/dist/esm/dnn-button_16.entry.js.map +1 -1
  24. package/dist/esm/dnn-vertical-splitview.entry.js +21 -15
  25. package/dist/esm/dnn-vertical-splitview.entry.js.map +1 -1
  26. package/dist/esm/dnn.js +1 -1
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/esm-es5/dnn-button_16.entry.js +1 -1
  29. package/dist/esm-es5/dnn-button_16.entry.js.map +1 -1
  30. package/dist/esm-es5/dnn.js +1 -1
  31. package/dist/esm-es5/dnn.js.map +1 -1
  32. package/dist/esm-es5/loader.js +1 -1
  33. package/dist/esm-es5/loader.js.map +1 -1
  34. package/dist/types/components/dnn-vertical-splitview/dnn-vertical-splitview.d.ts +1 -0
  35. package/package.json +3 -3
  36. package/dist/dnn/p-4d2d8419.system.entry.js.map +0 -1
  37. package/dist/dnn/p-e4da2e36.entry.js.map +0 -1
@@ -1699,26 +1699,32 @@ let DnnVerticalSplitview = class {
1699
1699
  }
1700
1700
  componentDidLoad() {
1701
1701
  requestAnimationFrame(() => {
1702
- const fullWidth = this.element.getBoundingClientRect().width;
1703
- this.leftWidth = fullWidth * this.splitWidthPercentage / 100;
1704
- this.rightWidth = fullWidth - this.leftWidth;
1705
- this.widthChanged.emit(this.splitWidthPercentage);
1702
+ this.resizeObserver = new ResizeObserver(() => {
1703
+ const fullWidth = this.element.getBoundingClientRect().width;
1704
+ this.leftWidth = fullWidth * this.splitWidthPercentage / 100;
1705
+ this.rightWidth = fullWidth - this.leftWidth;
1706
+ this.widthChanged.emit(this.splitWidthPercentage);
1707
+ });
1708
+ this.resizeObserver.observe(this.element);
1706
1709
  });
1707
1710
  }
1708
1711
  handleMouseDown(event) {
1709
1712
  event.preventDefault();
1710
1713
  const handleDrag = (ev) => {
1711
- let { movementX } = getMovementFromEvent(ev, this.previousTouch);
1712
- let fullWidth = this.element.getBoundingClientRect().width;
1713
- let newLeft = this.leftWidth + movementX;
1714
- if (newLeft < 0) {
1715
- newLeft = 0;
1716
- }
1717
- if (newLeft > fullWidth) {
1718
- newLeft = fullWidth;
1719
- }
1720
- this.leftWidth = newLeft;
1721
- this.rightWidth = fullWidth - newLeft;
1714
+ requestAnimationFrame(() => {
1715
+ let fullWidth = this.element.getBoundingClientRect().width;
1716
+ let { movementX } = getMovementFromEvent(ev, this.previousTouch);
1717
+ let newLeft = this.leftWidth + movementX;
1718
+ if (newLeft < 0) {
1719
+ newLeft = 0;
1720
+ }
1721
+ if (newLeft > fullWidth) {
1722
+ newLeft = fullWidth;
1723
+ }
1724
+ this.leftWidth = newLeft;
1725
+ this.rightWidth = fullWidth - newLeft;
1726
+ this.splitWidthPercentage = this.leftWidth / fullWidth * 100;
1727
+ });
1722
1728
  };
1723
1729
  const handleDragFinished = () => {
1724
1730
  document.removeEventListener("mousemove", handleDrag);