@citolab/qti-components 10.0.0-next.7 → 10.0.0-next.9

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.
@@ -2,7 +2,7 @@ import {
2
2
  QtiTest,
3
3
  TestCheckItem,
4
4
  TestNavigation
5
- } from "./chunk-6PCCBSPB.js";
5
+ } from "./chunk-BIU7J6B7.js";
6
6
  import {
7
7
  QtiAssessmentItem
8
8
  } from "./chunk-YOCOLMGB.js";
@@ -28,7 +28,7 @@ import {
28
28
  QtiSimpleChoice,
29
29
  QtiSliderInteraction,
30
30
  QtiTextEntryInteraction
31
- } from "./chunk-RSSEBILM.js";
31
+ } from "./chunk-AHULN3UB.js";
32
32
  import {
33
33
  QtiItem
34
34
  } from "./chunk-3TUGZHKB.js";
@@ -1661,4 +1661,4 @@ export {
1661
1661
  QtiTestCorrection,
1662
1662
  TestCheckItemCorrection
1663
1663
  };
1664
- //# sourceMappingURL=chunk-VG5YI2OB.js.map
1664
+ //# sourceMappingURL=chunk-7CX6IYZJ.js.map
@@ -8817,7 +8817,6 @@ var QtiPortableCustomInteraction = class extends Interaction {
8817
8817
  case "resize":
8818
8818
  if (typeof data.height === "number" && this.iframe) {
8819
8819
  this.iframe.style.height = `${data.height}px`;
8820
- this.iframe.style.width = `${data.width}px`;
8821
8820
  }
8822
8821
  break;
8823
8822
  case "console":
@@ -9454,6 +9453,8 @@ var QtiPortableCustomInteraction = class extends Interaction {
9454
9453
  }
9455
9454
  #pci-container {
9456
9455
  width: 100%;
9456
+ /* Keeps the first and last child's margins inside, so scrollHeight is the full height. */
9457
+ display: flow-root;
9457
9458
  }
9458
9459
  qti-interaction-markup {
9459
9460
  display: block;
@@ -10207,7 +10208,8 @@ var QtiPortableCustomInteraction = class extends Interaction {
10207
10208
  let previousHeight = 0;
10208
10209
  const notifyResize = () => {
10209
10210
  const container = document.getElementById('pci-container');
10210
- const newHeight = container.scrollHeight + 100;
10211
+ // The content's own height (subpixel, rounded up) or what overflows it, e.g. an open popup.
10212
+ const newHeight = Math.max(Math.ceil(container.getBoundingClientRect().height), container.scrollHeight);
10211
10213
  if (newHeight !== previousHeight) {
10212
10214
  previousHeight = newHeight;
10213
10215
  clearTimeout(resizeTimeout);
@@ -11979,4 +11981,4 @@ export {
11979
11981
  elements31 as elements21,
11980
11982
  qtiInteractionElements
11981
11983
  };
11982
- //# sourceMappingURL=chunk-RSSEBILM.js.map
11984
+ //# sourceMappingURL=chunk-AHULN3UB.js.map