@@ -40714,8 +40714,8 @@ function () {
4071440714 }
4071540715 /**
4071640716 * Returns the maximum height above the baseline of the Word
40717- * elements on the Row (accounting for their top WordTags, if present)
40718- * TODO: Account for WordCluster height
40717+ * elements on the Row (accounting for their top WordTags and attached
40718+ * WordClusters, if present)
4071940719 */
4072040720
4072140721 }, {
@@ -40730,6 +40730,32 @@ function () {
4073040730 for (var _iterator8 = this.words[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
4073140731 var word = _step8.value;
4073240732 wordHeight = Math.max(wordHeight, word.boxHeight);
40733+
40734+ if (word.clusters.length > 0) {
40735+ var _iteratorNormalCompletion10 = true;
40736+ var _didIteratorError10 = false;
40737+ var _iteratorError10 = undefined;
40738+
40739+ try {
40740+ for (var _iterator10 = word.clusters[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {
40741+ var _cluster = _step10.value;
40742+ wordHeight = Math.max(wordHeight, _cluster.fullHeight);
40743+ }
40744+ } catch (err) {
40745+ _didIteratorError10 = true;
40746+ _iteratorError10 = err;
40747+ } finally {
40748+ try {
40749+ if (!_iteratorNormalCompletion10 && _iterator10.return != null) {
40750+ _iterator10.return();
40751+ }
40752+ } finally {
40753+ if (_didIteratorError10) {
40754+ throw _iteratorError10;
40755+ }
40756+ }
40757+ }
40758+ }
4073340759 }
4073440760 } catch (err) {
4073540761 _didIteratorError8 = true;
@@ -40751,6 +40777,32 @@ function () {
4075140777 // last Word that was on this Row, for positioning any Links that are
4075240778 // still passing through
4075340779 wordHeight = this.lastRemovedWord.boxHeight;
40780+
40781+ if (this.lastRemovedWord.clusters.length > 0) {
40782+ var _iteratorNormalCompletion9 = true;
40783+ var _didIteratorError9 = false;
40784+ var _iteratorError9 = undefined;
40785+
40786+ try {
40787+ for (var _iterator9 = this.lastRemovedWord.clusters[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
40788+ var cluster = _step9.value;
40789+ wordHeight = Math.max(wordHeight, cluster.fullHeight);
40790+ }
40791+ } catch (err) {
40792+ _didIteratorError9 = true;
40793+ _iteratorError9 = err;
40794+ } finally {
40795+ try {
40796+ if (!_iteratorNormalCompletion9 && _iterator9.return != null) {
40797+ _iterator9.return();
40798+ }
40799+ } finally {
40800+ if (_didIteratorError9) {
40801+ throw _iteratorError9;
40802+ }
40803+ }
40804+ }
40805+ }
4075440806 }
4075540807
4075640808 return wordHeight;
@@ -40764,26 +40816,26 @@ function () {
4076440816 key: "wordDescent",
4076540817 get: function get() {
4076640818 var wordDescent = 0;
40767- var _iteratorNormalCompletion9 = true;
40768- var _didIteratorError9 = false;
40769- var _iteratorError9 = undefined;
40819+ var _iteratorNormalCompletion11 = true;
40820+ var _didIteratorError11 = false;
40821+ var _iteratorError11 = undefined;
4077040822
4077140823 try {
40772- for (var _iterator9 = this.words[Symbol.iterator](), _step9 ; !(_iteratorNormalCompletion9 = (_step9 = _iterator9 .next()).done); _iteratorNormalCompletion9 = true) {
40773- var word = _step9 .value;
40824+ for (var _iterator11 = this.words[Symbol.iterator](), _step11 ; !(_iteratorNormalCompletion11 = (_step11 = _iterator11 .next()).done); _iteratorNormalCompletion11 = true) {
40825+ var word = _step11 .value;
4077440826 wordDescent = Math.max(wordDescent, word.descendHeight);
4077540827 }
4077640828 } catch (err) {
40777- _didIteratorError9 = true;
40778- _iteratorError9 = err;
40829+ _didIteratorError11 = true;
40830+ _iteratorError11 = err;
4077940831 } finally {
4078040832 try {
40781- if (!_iteratorNormalCompletion9 && _iterator9 .return != null) {
40782- _iterator9 .return();
40833+ if (!_iteratorNormalCompletion11 && _iterator11 .return != null) {
40834+ _iterator11 .return();
4078340835 }
4078440836 } finally {
40785- if (_didIteratorError9 ) {
40786- throw _iteratorError9 ;
40837+ if (_didIteratorError11 ) {
40838+ throw _iteratorError11 ;
4078740839 }
4078840840 }
4078940841 }
@@ -41177,6 +41229,18 @@ function () {
4117741229 var thisHeight = this.svgs[0].bbox().height;
4117841230 return this.endpoints[0].absoluteY - thisHeight;
4117941231 }
41232+ /**
41233+ * Returns the height of this WordCluster, from Row baseline to the top of
41234+ * its label
41235+ */
41236+
41237+ }, {
41238+ key: "fullHeight",
41239+ get: function get() {
41240+ // The text label lives with the left arm of the curly brace
41241+ var thisHeight = this.svgs[0].bbox().height;
41242+ return this.endpoints[0].boxHeight + thisHeight;
41243+ }
4118041244 }, {
4118141245 key: "idx",
4118241246 get: function get() {
0 commit comments