@deephaven/golden-layout 1.23.1-legacy-table-plugin.bbf55c8.0 → 1.24.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"RowOrColumn.js","names":["$","AbstractContentItem","animFrame","Splitter","RowOrColumn","constructor","isColumn","layoutManager","config","parent","_defineProperty","isRow","childElementContainer","element","_splitterSize","dimensions","borderWidth","_splitterGrabSize","borderGrabWidth","_isColumn","_dimension","_splitterPosition","_splitterMinPosition","_splitterMaxPosition","addChild","contentItem","index","_$suspendResize","newItemSize","itemSize","i","splitterElement","_$normalizeContentItem","undefined","contentItems","length","_createSplitter","Math","max","after","before","append","prototype","call","emitBubblingEvent","_this$contentItems$i$","callDownwards","removeChild","keepChild","_contentItem$config$t","removedItemSize","indexOf","splitterIndex","childItem","Error","_splitter","_$destroy","splice","_this$contentItems$i$2","isClosable","_this$parent","replaceChild","oldChild","newChild","destroyOldChild","arguments","size","setSize","_calculateRelativeSizes","_setAbsoluteSizes","emit","_$init","isInitialised","sizeData","_calculateAbsoluteSizes","additionalPixel","itemSizes","width","totalWidth","height","totalHeight","_this$element$width","_this$element$height","totalSplitterSize","totalAssigned","_this$contentItems$i$3","_this$contentItems$i$4","floor","push","total","itemsWithoutSetDimension","dimension","round","_respectMinItemWidth","_this$contentItems$_i","_this$layoutManager$c","minItemWidth","entriesOverMin","totalOverMin","totalUnderMin","remainingWidth","allEntries","entry","reducePercent","reducedWidth","splitter","on","_onSplitterDrag","bind","_onSplitterDragStop","_onSplitterDragStart","_getItemsForSplitter","_getMinimumDimensions","arr","minWidth","minHeight","_arr$i$minWidth","_arr$i$minHeight","horizontal","vertical","_items$before$config$","_items$after$config$c","_items$before$element","_items$after$element$","items","minSize","beforeMinDim","content","beforeMinSize","afterMinDim","afterMinSize","offsetX","offsetY","offset","css","_items$before$element2","_items$after$element$2","_this$_splitterPositi","_items$before$config$2","_items$after$config$t","sizeBefore","sizeAfter","splitterPositionInRange","totalRelativeSize","top","left"],"sources":["../../src/items/RowOrColumn.ts"],"sourcesContent":["import $ from 'jquery';\nimport AbstractContentItem from './AbstractContentItem';\nimport { animFrame } from '../utils';\nimport { Splitter } from '../controls';\nimport type LayoutManager from '../LayoutManager';\nimport type { ColumnItemConfig, ItemConfig, RowItemConfig } from '../config';\n\nexport default class RowOrColumn extends AbstractContentItem {\n isRow: boolean;\n isColumn: boolean;\n childElementContainer: JQuery<HTMLElement>;\n parent: AbstractContentItem | null;\n\n private _splitter: Splitter[] = [];\n private _splitterSize: number;\n private _splitterGrabSize: number;\n private _isColumn: boolean;\n private _dimension: 'height' | 'width';\n private _splitterPosition: number | null = null;\n private _splitterMinPosition: number | null = null;\n private _splitterMaxPosition: number | null = null;\n\n constructor(\n isColumn: true,\n layoutManager: LayoutManager,\n config: ColumnItemConfig,\n parent: AbstractContentItem | null\n );\n constructor(\n isColumn: false,\n layoutManager: LayoutManager,\n config: RowItemConfig,\n parent: AbstractContentItem | null\n );\n constructor(\n isColumn: boolean,\n layoutManager: LayoutManager,\n config: ColumnItemConfig | RowItemConfig,\n parent: AbstractContentItem | null\n ) {\n super(\n layoutManager,\n config,\n parent,\n $('<div class=\"lm_item lm_' + (isColumn ? 'column' : 'row') + '\"></div>')\n );\n this.parent = parent;\n\n this.isRow = !isColumn;\n this.isColumn = isColumn;\n\n this.childElementContainer = this.element;\n this._splitterSize = layoutManager.config.dimensions.borderWidth;\n this._splitterGrabSize = layoutManager.config.dimensions.borderGrabWidth;\n this._isColumn = isColumn;\n this._dimension = isColumn ? 'height' : 'width';\n this._splitterPosition = null;\n this._splitterMinPosition = null;\n this._splitterMaxPosition = null;\n }\n\n /**\n * Add a new contentItem to the Row or Column\n *\n * @param contentItem\n * @param index The position of the new item within the Row or Column.\n * If no index is provided the item will be added to the end\n * @param _$suspendResize If true the items won't be resized. This will leave the item in\n * an inconsistent state and is only intended to be used if multiple\n * children need to be added in one go and resize is called afterwards\n */\n addChild(\n contentItem: AbstractContentItem | ItemConfig,\n index?: number,\n _$suspendResize?: boolean\n ) {\n var newItemSize, itemSize, i, splitterElement;\n\n contentItem = this.layoutManager._$normalizeContentItem(contentItem, this);\n\n if (index === undefined) {\n index = this.contentItems.length;\n }\n\n if (this.contentItems.length > 0) {\n splitterElement = this._createSplitter(Math.max(0, index - 1)).element;\n\n if (index > 0) {\n this.contentItems[index - 1].element.after(splitterElement);\n splitterElement.after(contentItem.element);\n } else {\n this.contentItems[0].element.before(splitterElement);\n splitterElement.before(contentItem.element);\n }\n } else {\n this.childElementContainer.append(contentItem.element);\n }\n\n AbstractContentItem.prototype.addChild.call(this, contentItem, index);\n\n newItemSize = (1 / this.contentItems.length) * 100;\n\n if (_$suspendResize === true) {\n this.emitBubblingEvent('stateChanged');\n return;\n }\n\n for (i = 0; i < this.contentItems.length; i++) {\n if (this.contentItems[i] === contentItem) {\n contentItem.config[this._dimension] = newItemSize;\n } else {\n itemSize =\n ((this.contentItems[i].config[this._dimension] ?? 0) *\n (100 - newItemSize)) /\n 100;\n this.contentItems[i].config[this._dimension] = itemSize;\n }\n }\n\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n }\n\n /**\n * Removes a child of this element\n *\n * @param contentItem\n * @param keepChild If true the child will be removed, but not destroyed\n */\n removeChild(contentItem: AbstractContentItem, keepChild: boolean) {\n var removedItemSize = contentItem.config[this._dimension] ?? 0,\n index = this.contentItems.indexOf(contentItem),\n splitterIndex = Math.max(index - 1, 0),\n i,\n childItem;\n\n if (index === -1) {\n throw new Error(\n \"Can't remove child. ContentItem is not child of this Row or Column\"\n );\n }\n\n /**\n * Remove the splitter before the item or after if the item happens\n * to be the first in the row/column\n */\n if (this._splitter[splitterIndex]) {\n this._splitter[splitterIndex]._$destroy();\n this._splitter.splice(splitterIndex, 1);\n }\n\n /**\n * Allocate the space that the removed item occupied to the remaining items\n */\n for (i = 0; i < this.contentItems.length; i++) {\n if (this.contentItems[i] !== contentItem) {\n this.contentItems[i].config[this._dimension] =\n (this.contentItems[i].config[this._dimension] ?? 0) +\n removedItemSize / (this.contentItems.length - 1);\n }\n }\n\n AbstractContentItem.prototype.removeChild.call(\n this,\n contentItem,\n keepChild\n );\n\n if (this.contentItems.length === 1 && this.config.isClosable === true) {\n childItem = this.contentItems[0];\n this.contentItems = [];\n this.parent?.replaceChild(this, childItem, true);\n } else {\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n }\n }\n\n /**\n * Replaces a child of this Row or Column with another contentItem\n *\n * @param oldChild The old child to replace\n * @param newChild The new child to take the old child's place\n * @param destroyOldChild If the old child should be destroyed or not\n */\n replaceChild(\n oldChild: AbstractContentItem,\n newChild: AbstractContentItem,\n destroyOldChild = false\n ) {\n var size = oldChild.config[this._dimension];\n newChild.config[this._dimension] = size;\n super.replaceChild(oldChild, newChild, destroyOldChild);\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n }\n\n /**\n * Called whenever the dimensions of this item or one of its parents change\n */\n setSize() {\n if (this.contentItems.length > 0) {\n this._calculateRelativeSizes();\n this._setAbsoluteSizes();\n }\n this.emitBubblingEvent('stateChanged');\n this.emit('resize');\n }\n\n /**\n * Invoked recursively by the layout manager. AbstractContentItem.init appends\n * the contentItem's DOM elements to the container, RowOrColumn init adds splitters\n * in between them\n */\n _$init() {\n if (this.isInitialised === true) return;\n\n var i;\n\n AbstractContentItem.prototype._$init.call(this);\n\n for (i = 0; i < this.contentItems.length - 1; i++) {\n this.contentItems[i].element.after(this._createSplitter(i).element);\n }\n }\n\n /**\n * Turns the relative sizes calculated by _calculateRelativeSizes into\n * absolute pixel values and applies them to the children's DOM elements\n *\n * Assigns additional pixels to counteract Math.floor\n */\n _setAbsoluteSizes() {\n var i,\n sizeData = this._calculateAbsoluteSizes();\n\n for (i = 0; i < this.contentItems.length; i++) {\n if (sizeData.additionalPixel - i > 0) {\n sizeData.itemSizes[i]++;\n }\n\n if (this._isColumn) {\n this.contentItems[i].element.width(sizeData.totalWidth);\n this.contentItems[i].element.height(sizeData.itemSizes[i]);\n } else {\n this.contentItems[i].element.width(sizeData.itemSizes[i]);\n this.contentItems[i].element.height(sizeData.totalHeight);\n }\n }\n }\n\n /**\n * Calculates the absolute sizes of all of the children of this Item.\n * @returns {object} - Set with absolute sizes and additional pixels.\n */\n _calculateAbsoluteSizes() {\n const totalSplitterSize =\n (this.contentItems.length - 1) * this._splitterSize;\n let totalWidth = this.element.width() ?? 0;\n let totalHeight = this.element.height() ?? 0;\n let totalAssigned = 0;\n const itemSizes: number[] = [];\n\n if (this._isColumn) {\n totalHeight -= totalSplitterSize;\n } else {\n totalWidth -= totalSplitterSize;\n }\n\n for (let i = 0; i < this.contentItems.length; i++) {\n const itemSize = this._isColumn\n ? Math.floor(\n totalHeight * ((this.contentItems[i].config.height ?? 0) / 100)\n )\n : Math.floor(\n totalWidth * ((this.contentItems[i].config.width ?? 0) / 100)\n );\n\n totalAssigned += itemSize;\n itemSizes.push(itemSize);\n }\n\n const additionalPixel = Math.floor(\n (this._isColumn ? totalHeight : totalWidth) - totalAssigned\n );\n\n return {\n itemSizes,\n additionalPixel,\n totalWidth,\n totalHeight,\n };\n }\n\n /**\n * Calculates the relative sizes of all children of this Item. The logic\n * is as follows:\n *\n * - Add up the total size of all items that have a configured size\n *\n * - If the total == 100 (check for floating point errors)\n * Excellent, job done\n *\n * - If the total is > 100,\n * set the size of items without set dimensions to 1/3 and add this to the total\n * set the size off all items so that the total is hundred relative to their original size\n *\n * - If the total is < 100\n * If there are items without set dimensions, distribute the remainder to 100 evenly between them\n * If there are no items without set dimensions, increase all items sizes relative to\n * their original size so that they add up to 100\n */\n _calculateRelativeSizes() {\n let total = 0;\n const itemsWithoutSetDimension: AbstractContentItem[] = [];\n const dimension = this._isColumn ? 'height' : 'width';\n\n for (let i = 0; i < this.contentItems.length; i++) {\n const size = this.contentItems[i].config[dimension];\n if (size != null) {\n total += size;\n } else {\n itemsWithoutSetDimension.push(this.contentItems[i]);\n }\n }\n\n /**\n * Everything adds up to hundred, all good :-)\n */\n if (Math.round(total) === 100) {\n this._respectMinItemWidth();\n return;\n }\n\n /**\n * Allocate the remaining size to the items without a set dimension\n */\n if (Math.round(total) < 100 && itemsWithoutSetDimension.length > 0) {\n for (let i = 0; i < itemsWithoutSetDimension.length; i++) {\n itemsWithoutSetDimension[i].config[dimension] =\n (100 - total) / itemsWithoutSetDimension.length;\n }\n this._respectMinItemWidth();\n return;\n }\n\n /**\n * If the total is > 100, but there are also items without a set dimension left, assing 50\n * as their dimension and add it to the total\n *\n * This will be reset in the next step\n */\n if (Math.round(total) > 100) {\n for (let i = 0; i < itemsWithoutSetDimension.length; i++) {\n itemsWithoutSetDimension[i].config[dimension] = 50;\n total += 50;\n }\n }\n\n /**\n * Set every items size relative to 100 relative to its size to total\n */\n for (let i = 0; i < this.contentItems.length; i++) {\n this.contentItems[i].config[dimension] =\n ((this.contentItems[i].config[dimension] ?? 0) / total) * 100;\n }\n\n this._respectMinItemWidth();\n }\n\n /**\n * Adjusts the column widths to respect the dimensions minItemWidth if set.\n */\n _respectMinItemWidth() {\n const minItemWidth = this.layoutManager.config.dimensions\n ? this.layoutManager.config.dimensions.minItemWidth ?? 0\n : 0;\n const entriesOverMin = [];\n let totalOverMin = 0;\n let totalUnderMin = 0;\n let remainingWidth = 0;\n const allEntries = [];\n let entry;\n\n if (this._isColumn || !minItemWidth || this.contentItems.length <= 1) {\n return;\n }\n\n const sizeData = this._calculateAbsoluteSizes();\n\n /**\n * Figure out how much we are under the min item size total and how much room we have to use.\n */\n for (let i = 0; i < this.contentItems.length; i++) {\n const contentItem = this.contentItems[i];\n const itemSize = sizeData.itemSizes[i];\n\n if (itemSize < minItemWidth) {\n totalUnderMin += minItemWidth - itemSize;\n entry = { width: minItemWidth };\n } else {\n totalOverMin += itemSize - minItemWidth;\n entry = { width: itemSize };\n entriesOverMin.push(entry);\n }\n\n allEntries.push(entry);\n }\n\n /**\n * If there is nothing under min, or there is not enough over to make up the difference, do nothing.\n */\n if (totalUnderMin === 0 || totalUnderMin > totalOverMin) {\n return;\n }\n\n /**\n * Evenly reduce all columns that are over the min item width to make up the difference.\n */\n const reducePercent = totalUnderMin / totalOverMin;\n remainingWidth = totalUnderMin;\n for (let i = 0; i < entriesOverMin.length; i++) {\n entry = entriesOverMin[i];\n const reducedWidth = Math.round(\n (entry.width - minItemWidth) * reducePercent\n );\n remainingWidth -= reducedWidth;\n entry.width -= reducedWidth;\n }\n\n /**\n * Take anything remaining from the last item.\n */\n if (remainingWidth !== 0) {\n allEntries[allEntries.length - 1].width -= remainingWidth;\n }\n\n /**\n * Set every items size relative to 100 relative to its size to total\n */\n for (let i = 0; i < this.contentItems.length; i++) {\n this.contentItems[i].config.width =\n (allEntries[i].width / sizeData.totalWidth) * 100;\n }\n }\n\n /**\n * Instantiates a new lm.controls.Splitter, binds events to it and adds\n * it to the array of splitters at the position specified as the index argument\n *\n * What it doesn't do though is append the splitter to the DOM\n *\n * @param index The position of the splitter\n * @returns The created splitter\n */\n _createSplitter(index: number): Splitter {\n var splitter;\n splitter = new Splitter(\n this._isColumn,\n this._splitterSize,\n this._splitterGrabSize\n );\n splitter.on('drag', this._onSplitterDrag.bind(this, splitter), this);\n splitter.on(\n 'dragStop',\n this._onSplitterDragStop.bind(this, splitter),\n this\n );\n splitter.on(\n 'dragStart',\n this._onSplitterDragStart.bind(this, splitter),\n this\n );\n this._splitter.splice(index, 0, splitter);\n return splitter;\n }\n\n /**\n * Locates the instance of lm.controls.Splitter in the array of\n * registered splitters and returns a map containing the contentItem\n * before and after the splitters, both of which are affected if the\n * splitter is moved\n *\n * @param splitter\n *\n * @returns A map of contentItems that the splitter affects\n */\n _getItemsForSplitter(splitter: Splitter) {\n const index = this._splitter.indexOf(splitter);\n\n if (index < 0) {\n throw new Error('Splitter not found in RowOrColumn');\n }\n\n return {\n before: this.contentItems[index],\n after: this.contentItems[index + 1],\n };\n }\n\n /**\n * Gets the minimum dimensions for the given item configuration array\n * @param item\n * @private\n */\n _getMinimumDimensions(arr: { minWidth?: number; minHeight?: number }[]) {\n var minWidth = 0,\n minHeight = 0;\n\n for (var i = 0; i < arr.length; ++i) {\n minWidth = Math.max(arr[i].minWidth ?? 0, minWidth);\n minHeight = Math.max(arr[i].minHeight ?? 0, minHeight);\n }\n\n return { horizontal: minWidth, vertical: minHeight };\n }\n\n /**\n * Invoked when a splitter's dragListener fires dragStart. Calculates the splitters\n * movement area once (so that it doesn't need calculating on every mousemove event)\n *\n * @param splitter\n */\n _onSplitterDragStart(splitter: Splitter) {\n const items = this._getItemsForSplitter(splitter);\n const minSize =\n this.layoutManager.config.dimensions[\n this._isColumn ? 'minItemHeight' : 'minItemWidth'\n ];\n\n var beforeMinDim = this._getMinimumDimensions(\n items.before.config.content ?? []\n );\n var beforeMinSize = this._isColumn\n ? beforeMinDim.vertical\n : beforeMinDim.horizontal;\n\n var afterMinDim = this._getMinimumDimensions(\n items.after.config.content ?? []\n );\n var afterMinSize = this._isColumn\n ? afterMinDim.vertical\n : afterMinDim.horizontal;\n\n this._splitterPosition = 0;\n this._splitterMinPosition =\n -1 *\n ((items.before.element[this._dimension]() ?? 0) -\n (beforeMinSize || minSize));\n this._splitterMaxPosition =\n (items.after.element[this._dimension]() ?? 0) - (afterMinSize || minSize);\n }\n\n /**\n * Invoked when a splitter's DragListener fires drag. Updates the splitters DOM position,\n * but not the sizes of the elements the splitter controls in order to minimize resize events\n *\n * @param splitter\n * @param offsetX Relative pixel values to the splitters original position. Can be negative\n * @param offsetY Relative pixel values to the splitters original position. Can be negative\n */\n _onSplitterDrag(splitter: Splitter, offsetX: number, offsetY: number) {\n const offset = this._isColumn ? offsetY : offsetX;\n\n if (\n this._splitterMaxPosition == null ||\n this._splitterMinPosition == null\n ) {\n return;\n }\n\n if (\n offset > this._splitterMinPosition &&\n offset < this._splitterMaxPosition\n ) {\n this._splitterPosition = offset;\n splitter.element.css(this._isColumn ? 'top' : 'left', offset);\n }\n }\n\n /**\n * Invoked when a splitter's DragListener fires dragStop. Resets the splitters DOM position,\n * and applies the new sizes to the elements before and after the splitter and their children\n * on the next animation frame\n *\n * @param {lm.controls.Splitter} splitter\n */\n _onSplitterDragStop(splitter: Splitter) {\n const items = this._getItemsForSplitter(splitter);\n const sizeBefore = items.before.element[this._dimension]() ?? 0;\n const sizeAfter = items.after.element[this._dimension]() ?? 0;\n const splitterPositionInRange =\n ((this._splitterPosition ?? 0) + sizeBefore) / (sizeBefore + sizeAfter);\n const totalRelativeSize =\n (items.before.config[this._dimension] ?? 0) +\n (items.after.config[this._dimension] ?? 0);\n\n items.before.config[this._dimension] =\n splitterPositionInRange * totalRelativeSize;\n items.after.config[this._dimension] =\n (1 - splitterPositionInRange) * totalRelativeSize;\n\n splitter.element.css({\n top: 0,\n left: 0,\n });\n\n animFrame(\n this.callDownwards.bind(this, 'setSize', undefined, undefined, undefined)\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,CAAC,MAAM,QAAQ;AAAC,OAChBC,mBAAmB;AAAA,SACjBC,SAAS;AAAA,SACTC,QAAQ;AAIjB,eAAe,MAAMC,WAAW,SAASH,mBAAmB,CAAC;EA2B3DI,WAAWA,CACTC,QAAiB,EACjBC,aAA4B,EAC5BC,MAAwC,EACxCC,MAAkC,EAClC;IACA,KAAK,CACHF,aAAa,EACbC,MAAM,EACNC,MAAM,EACNT,CAAC,CAAC,yBAAyB,IAAIM,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC,GAAG,UAAU,CAC1E,CAAC;IAACI,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,oBAhC4B,EAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,4BAKS,IAAI;IAAAA,eAAA,+BACD,IAAI;IAAAA,eAAA,+BACJ,IAAI;IA0BhD,IAAI,CAACD,MAAM,GAAGA,MAAM;IAEpB,IAAI,CAACE,KAAK,GAAG,CAACL,QAAQ;IACtB,IAAI,CAAC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C,cAAAmH,sBAAA,cAAAA,sBAAA,GAAI,CAAC;IAC/D,IAAMM,SAAS,IAAAL,sBAAA,GAAGZ,KAAK,CAACrF,KAAK,CAAC1B,OAAO,CAAC,IAAI,CAACO,UAAU,CAAC,CAAC,CAAC,cAAAoH,sBAAA,cAAAA,sBAAA,GAAI,CAAC;IAC7D,IAAMM,uBAAuB,GAC3B,CAAC,EAAAL,qBAAA,GAAC,IAAI,CAACpH,iBAAiB,cAAAoH,qBAAA,cAAAA,qBAAA,GAAI,CAAC,IAAIG,UAAU,KAAKA,UAAU,GAAGC,SAAS,CAAC;IACzE,IAAME,iBAAiB,GACrB,EAAAL,sBAAA,GAACd,KAAK,CAACpF,MAAM,CAAChC,MAAM,CAAC,IAAI,CAACY,UAAU,CAAC,cAAAsH,sBAAA,cAAAA,sBAAA,GAAI,CAAC,MAAAC,qBAAA,GACzCf,KAAK,CAACrF,KAAK,CAAC/B,MAAM,CAAC,IAAI,CAACY,UAAU,CAAC,cAAAuH,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC;IAE5Cf,KAAK,CAACpF,MAAM,CAAChC,MAAM,CAAC,IAAI,CAACY,UAAU,CAAC,GAClC0H,uBAAuB,GAAGC,iBAAiB;IAC7CnB,KAAK,CAACrF,KAAK,CAAC/B,MAAM,CAAC,IAAI,CAACY,UAAU,CAAC,GACjC,CAAC,CAAC,GAAG0H,uBAAuB,IAAIC,iBAAiB;IAEnDtC,QAAQ,CAAC5F,OAAO,CAACyH,GAAG,CAAC;MACnBU,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE;IACR,CAAC,CAAC;IAEF/I,SAAS,CACP,IAAI,CAAC4C,aAAa,CAAC8D,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE3E,SAAS,EAAEA,SAAS,EAAEA,SAAS,CAC1E,CAAC;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"file":"RowOrColumn.js","names":["$","AbstractContentItem","animFrame","IntersectionSplitter","Splitter","RowOrColumn","constructor","isColumn","layoutManager","config","parent","_defineProperty","isRow","childElementContainer","element","_splitterSize","dimensions","borderWidth","_splitterGrabSize","borderGrabWidth","_isColumn","_dimension","_splitterPosition","_splitterMinPosition","_splitterMaxPosition","addChild","contentItem","index","_$suspendResize","newItemSize","itemSize","i","splitterElement","_$normalizeContentItem","undefined","contentItems","length","_createSplitter","Math","max","after","before","append","prototype","call","emitBubblingEvent","_this$contentItems$i$","callDownwards","removeChild","keepChild","_contentItem$config$t","removedItemSize","indexOf","splitterIndex","childItem","Error","_splitter","_$destroy","splice","_this$contentItems$i$2","isClosable","_this$parent","replaceChild","oldChild","newChild","destroyOldChild","arguments","size","setSize","_calculateRelativeSizes","_setAbsoluteSizes","_scheduleIntersectionRefresh","emit","_$init","isInitialised","_refreshIntersectionSplitters","sizeData","_calculateAbsoluteSizes","additionalPixel","itemSizes","width","totalWidth","height","totalHeight","_this$element$width","_this$element$height","totalSplitterSize","totalAssigned","_this$contentItems$i$3","_this$contentItems$i$4","floor","push","total","itemsWithoutSetDimension","dimension","round","_respectMinItemWidth","_this$contentItems$_i","_this$layoutManager$c","minItemWidth","entriesOverMin","totalOverMin","totalUnderMin","remainingWidth","allEntries","entry","reducePercent","reducedWidth","splitter","on","_onSplitterDrag","bind","_onSplitterDragStop","_onSplitterDragStart","_getItemsForSplitter","_getMinimumDimensions","arr","minWidth","minHeight","_arr$i$minWidth","_arr$i$minHeight","horizontal","vertical","_items$before$config$","_items$after$config$c","_items$before$element","_items$after$element$","items","minSize","beforeMinDim","content","beforeMinSize","afterMinDim","afterMinSize","offsetX","offsetY","offset","css","_applySplitterDragStop","_scheduleSetSize","_items$before$element2","_items$after$element$2","_this$_splitterPositi","_items$before$config$2","_items$after$config$t","sizeBefore","sizeAfter","splitterPositionInRange","totalRelativeSize","top","left","_scheduleAncestorIntersectionRefresh","ancestor","_createIntersectionSplitters","ensuredKeys","Set","parentSplitterIndex","beforeItem","afterItem","stems","_collectEdgeStemSplitters","stem","key","path","add","_ensureIntersectionSplitter","stemOwner","stemSplitterIndex","junctionAtNearEdge","item","nearEdge","results","edgeIndex","previousCount","_intersectionSplitter","filter","record","has","_positionIntersectionSplitter","_destroyIntersectionSplitters","_isAnyDragInProgress","document","body","hasClass","existing","find","intersectionSplitter","_onIntersectionSplitterDragStart","_onIntersectionSplitterDrag","_onIntersectionSplitterDragStop","hoverPartner","_isIntersectionDragging","_setIntersectionHighlight","_findNearFourWayPartner","position","transform","zIndex","_getIntersectionPosition","_record$stemOwner","parentSplitter","childSplitter","container","parentEl","childEl","containerRect","getBoundingClientRect","parentRect","childRect","parentCenterX","parentCenterY","childCenterX","childCenterY","highlighted","_record$stemOwner2","toggleClass","base","tolerancePx","best","bestDist","Number","POSITIVE_INFINITY","candidate","dx","abs","dy","dist","_setSplitterDragOffset","owner","min","clamped","_getSplitterAxisCenter","rect","partner","partnerSplitter","_activeFourWaySharedCenterMin","_activeFourWaySharedCenterMax","_activeFourWayBaseCenter","_activeFourWayPartnerBaseCenter","baseCenter","partnerBaseCenter","recordMin","recordMax","partnerMin","partnerMax","recordCenterMin","recordCenterMax","partnerCenterMin","partnerCenterMax","sharedCenterMin","sharedCenterMax","_activeFourWayPartner","addClass","_this$_splitterPositi2","_record$stemOwner$ele","desiredStemOffset","desiredCenter","sharedCenter","shift","fullLength","newLength","minVisibleLength","safeLength","scale","farEdge","concat","_this$_splitterPositi3","_partner$stemOwner$el","partnerShift","partnerFullLength","partnerNewLength","partnerMinVisibleLength","partnerSafeLength","partnerScale","partnerFarEdge","_record$stemOwner$_sp","baseOffset","removeClass"],"sources":["../../src/items/RowOrColumn.ts"],"sourcesContent":["import $ from 'jquery';\nimport AbstractContentItem from './AbstractContentItem';\nimport { animFrame } from '../utils';\nimport { IntersectionSplitter, Splitter } from '../controls';\nimport type LayoutManager from '../LayoutManager';\nimport type { ColumnItemConfig, ItemConfig, RowItemConfig } from '../config';\n\n/**\n * A single 2D intersection handle. `parentSplitterIndex` is the \"bar\" splitter\n * owned by this RowOrColumn; `stemOwner`/`stemSplitterIndex` identify the\n * perpendicular \"stem\" splitter that crosses it, which may live arbitrarily\n * deep in this item's subtree. `junctionAtNearEdge` records which end of the\n * stem meets the bar.\n */\ntype IntersectionRecord = {\n splitter: IntersectionSplitter;\n key: string;\n parentSplitterIndex: number;\n stemOwner: RowOrColumn;\n stemSplitterIndex: number;\n junctionAtNearEdge: boolean;\n};\n\nexport default class RowOrColumn extends AbstractContentItem {\n isRow: boolean;\n isColumn: boolean;\n childElementContainer: JQuery<HTMLElement>;\n parent: AbstractContentItem | null;\n\n private _splitter: Splitter[] = [];\n private _intersectionSplitter: IntersectionRecord[] = [];\n private _splitterSize: number;\n private _splitterGrabSize: number;\n private _isColumn: boolean;\n private _dimension: 'height' | 'width';\n private _splitterPosition: number | null = null;\n private _splitterMinPosition: number | null = null;\n private _splitterMaxPosition: number | null = null;\n private _isIntersectionDragging = false;\n private _activeFourWayPartner: IntersectionRecord | null = null;\n private _activeFourWaySharedCenterMin: number | null = null;\n private _activeFourWaySharedCenterMax: number | null = null;\n private _activeFourWayBaseCenter: number | null = null;\n private _activeFourWayPartnerBaseCenter: number | null = null;\n\n constructor(\n isColumn: true,\n layoutManager: LayoutManager,\n config: ColumnItemConfig,\n parent: AbstractContentItem | null\n );\n constructor(\n isColumn: false,\n layoutManager: LayoutManager,\n config: RowItemConfig,\n parent: AbstractContentItem | null\n );\n constructor(\n isColumn: boolean,\n layoutManager: LayoutManager,\n config: ColumnItemConfig | RowItemConfig,\n parent: AbstractContentItem | null\n ) {\n super(\n layoutManager,\n config,\n parent,\n $('<div class=\"lm_item lm_' + (isColumn ? 'column' : 'row') + '\"></div>')\n );\n this.parent = parent;\n\n this.isRow = !isColumn;\n this.isColumn = isColumn;\n\n this.childElementContainer = this.element;\n this._splitterSize = layoutManager.config.dimensions.borderWidth;\n this._splitterGrabSize = layoutManager.config.dimensions.borderGrabWidth;\n this._isColumn = isColumn;\n this._dimension = isColumn ? 'height' : 'width';\n this._splitterPosition = null;\n this._splitterMinPosition = null;\n this._splitterMaxPosition = null;\n }\n\n /**\n * Add a new contentItem to the Row or Column\n *\n * @param contentItem\n * @param index The position of the new item within the Row or Column.\n * If no index is provided the item will be added to the end\n * @param _$suspendResize If true the items won't be resized. This will leave the item in\n * an inconsistent state and is only intended to be used if multiple\n * children need to be added in one go and resize is called afterwards\n */\n addChild(\n contentItem: AbstractContentItem | ItemConfig,\n index?: number,\n _$suspendResize?: boolean\n ) {\n var newItemSize, itemSize, i, splitterElement;\n\n contentItem = this.layoutManager._$normalizeContentItem(contentItem, this);\n\n if (index === undefined) {\n index = this.contentItems.length;\n }\n\n if (this.contentItems.length > 0) {\n splitterElement = this._createSplitter(Math.max(0, index - 1)).element;\n\n if (index > 0) {\n this.contentItems[index - 1].element.after(splitterElement);\n splitterElement.after(contentItem.element);\n } else {\n this.contentItems[0].element.before(splitterElement);\n splitterElement.before(contentItem.element);\n }\n } else {\n this.childElementContainer.append(contentItem.element);\n }\n\n AbstractContentItem.prototype.addChild.call(this, contentItem, index);\n\n newItemSize = (1 / this.contentItems.length) * 100;\n\n if (_$suspendResize === true) {\n this.emitBubblingEvent('stateChanged');\n return;\n }\n\n for (i = 0; i < this.contentItems.length; i++) {\n if (this.contentItems[i] === contentItem) {\n contentItem.config[this._dimension] = newItemSize;\n } else {\n itemSize =\n ((this.contentItems[i].config[this._dimension] ?? 0) *\n (100 - newItemSize)) /\n 100;\n this.contentItems[i].config[this._dimension] = itemSize;\n }\n }\n\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n }\n\n /**\n * Removes a child of this element\n *\n * @param contentItem\n * @param keepChild If true the child will be removed, but not destroyed\n */\n removeChild(contentItem: AbstractContentItem, keepChild: boolean) {\n var removedItemSize = contentItem.config[this._dimension] ?? 0,\n index = this.contentItems.indexOf(contentItem),\n splitterIndex = Math.max(index - 1, 0),\n i,\n childItem;\n\n if (index === -1) {\n throw new Error(\n \"Can't remove child. ContentItem is not child of this Row or Column\"\n );\n }\n\n /**\n * Remove the splitter before the item or after if the item happens\n * to be the first in the row/column\n */\n if (this._splitter[splitterIndex]) {\n this._splitter[splitterIndex]._$destroy();\n this._splitter.splice(splitterIndex, 1);\n }\n\n /**\n * Allocate the space that the removed item occupied to the remaining items\n */\n for (i = 0; i < this.contentItems.length; i++) {\n if (this.contentItems[i] !== contentItem) {\n this.contentItems[i].config[this._dimension] =\n (this.contentItems[i].config[this._dimension] ?? 0) +\n removedItemSize / (this.contentItems.length - 1);\n }\n }\n\n AbstractContentItem.prototype.removeChild.call(\n this,\n contentItem,\n keepChild\n );\n\n if (this.contentItems.length === 1 && this.config.isClosable === true) {\n childItem = this.contentItems[0];\n this.contentItems = [];\n this.parent?.replaceChild(this, childItem, true);\n } else {\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n }\n }\n\n /**\n * Replaces a child of this Row or Column with another contentItem\n *\n * @param oldChild The old child to replace\n * @param newChild The new child to take the old child's place\n * @param destroyOldChild If the old child should be destroyed or not\n */\n replaceChild(\n oldChild: AbstractContentItem,\n newChild: AbstractContentItem,\n destroyOldChild = false\n ) {\n var size = oldChild.config[this._dimension];\n newChild.config[this._dimension] = size;\n super.replaceChild(oldChild, newChild, destroyOldChild);\n this.callDownwards('setSize');\n this.emitBubblingEvent('stateChanged');\n }\n\n /**\n * Called whenever the dimensions of this item or one of its parents change\n */\n setSize() {\n if (this.contentItems.length > 0) {\n this._calculateRelativeSizes();\n this._setAbsoluteSizes();\n this._scheduleIntersectionRefresh();\n }\n this.emitBubblingEvent('stateChanged');\n this.emit('resize');\n }\n\n /**\n * Invoked recursively by the layout manager. AbstractContentItem.init appends\n * the contentItem's DOM elements to the container, RowOrColumn init adds splitters\n * in between them\n */\n _$init() {\n if (this.isInitialised === true) return;\n\n var i;\n\n AbstractContentItem.prototype._$init.call(this);\n\n for (i = 0; i < this.contentItems.length - 1; i++) {\n this.contentItems[i].element.after(this._createSplitter(i).element);\n }\n\n // Initialise children eagerly so their splitters exist before we attach\n // intersection handles to them. _$init is idempotent so the outer\n // callDownwards('_$init') traversal will skip them as no-ops.\n for (i = 0; i < this.contentItems.length; i++) {\n if (this.contentItems[i].isInitialised !== true) {\n this.contentItems[i]._$init();\n }\n }\n\n this._refreshIntersectionSplitters();\n }\n\n /**\n * Turns the relative sizes calculated by _calculateRelativeSizes into\n * absolute pixel values and applies them to the children's DOM elements\n *\n * Assigns additional pixels to counteract Math.floor\n */\n _setAbsoluteSizes() {\n var i,\n sizeData = this._calculateAbsoluteSizes();\n\n for (i = 0; i < this.contentItems.length; i++) {\n if (sizeData.additionalPixel - i > 0) {\n sizeData.itemSizes[i]++;\n }\n\n if (this._isColumn) {\n this.contentItems[i].element.width(sizeData.totalWidth);\n this.contentItems[i].element.height(sizeData.itemSizes[i]);\n } else {\n this.contentItems[i].element.width(sizeData.itemSizes[i]);\n this.contentItems[i].element.height(sizeData.totalHeight);\n }\n }\n }\n\n /**\n * Calculates the absolute sizes of all of the children of this Item.\n * @returns {object} - Set with absolute sizes and additional pixels.\n */\n _calculateAbsoluteSizes() {\n const totalSplitterSize =\n (this.contentItems.length - 1) * this._splitterSize;\n let totalWidth = this.element.width() ?? 0;\n let totalHeight = this.element.height() ?? 0;\n let totalAssigned = 0;\n const itemSizes: number[] = [];\n\n if (this._isColumn) {\n totalHeight -= totalSplitterSize;\n } else {\n totalWidth -= totalSplitterSize;\n }\n\n for (let i = 0; i < this.contentItems.length; i++) {\n const itemSize = this._isColumn\n ? Math.floor(\n totalHeight * ((this.contentItems[i].config.height ?? 0) / 100)\n )\n : Math.floor(\n totalWidth * ((this.contentItems[i].config.width ?? 0) / 100)\n );\n\n totalAssigned += itemSize;\n itemSizes.push(itemSize);\n }\n\n const additionalPixel = Math.floor(\n (this._isColumn ? totalHeight : totalWidth) - totalAssigned\n );\n\n return {\n itemSizes,\n additionalPixel,\n totalWidth,\n totalHeight,\n };\n }\n\n /**\n * Calculates the relative sizes of all children of this Item. The logic\n * is as follows:\n *\n * - Add up the total size of all items that have a configured size\n *\n * - If the total == 100 (check for floating point errors)\n * Excellent, job done\n *\n * - If the total is > 100,\n * set the size of items without set dimensions to 1/3 and add this to the total\n * set the size off all items so that the total is hundred relative to their original size\n *\n * - If the total is < 100\n * If there are items without set dimensions, distribute the remainder to 100 evenly between them\n * If there are no items without set dimensions, increase all items sizes relative to\n * their original size so that they add up to 100\n */\n _calculateRelativeSizes() {\n let total = 0;\n const itemsWithoutSetDimension: AbstractContentItem[] = [];\n const dimension = this._isColumn ? 'height' : 'width';\n\n for (let i = 0; i < this.contentItems.length; i++) {\n const size = this.contentItems[i].config[dimension];\n if (size != null) {\n total += size;\n } else {\n itemsWithoutSetDimension.push(this.contentItems[i]);\n }\n }\n\n /**\n * Everything adds up to hundred, all good :-)\n */\n if (Math.round(total) === 100) {\n this._respectMinItemWidth();\n return;\n }\n\n /**\n * Allocate the remaining size to the items without a set dimension\n */\n if (Math.round(total) < 100 && itemsWithoutSetDimension.length > 0) {\n for (let i = 0; i < itemsWithoutSetDimension.length; i++) {\n itemsWithoutSetDimension[i].config[dimension] =\n (100 - total) / itemsWithoutSetDimension.length;\n }\n this._respectMinItemWidth();\n return;\n }\n\n /**\n * If the total is > 100, but there are also items without a set dimension left, assing 50\n * as their dimension and add it to the total\n *\n * This will be reset in the next step\n */\n if (Math.round(total) > 100) {\n for (let i = 0; i < itemsWithoutSetDimension.length; i++) {\n itemsWithoutSetDimension[i].config[dimension] = 50;\n total += 50;\n }\n }\n\n /**\n * Set every items size relative to 100 relative to its size to total\n */\n for (let i = 0; i < this.contentItems.length; i++) {\n this.contentItems[i].config[dimension] =\n ((this.contentItems[i].config[dimension] ?? 0) / total) * 100;\n }\n\n this._respectMinItemWidth();\n }\n\n /**\n * Adjusts the column widths to respect the dimensions minItemWidth if set.\n */\n _respectMinItemWidth() {\n const minItemWidth = this.layoutManager.config.dimensions\n ? this.layoutManager.config.dimensions.minItemWidth ?? 0\n : 0;\n const entriesOverMin = [];\n let totalOverMin = 0;\n let totalUnderMin = 0;\n let remainingWidth = 0;\n const allEntries = [];\n let entry;\n\n if (this._isColumn || !minItemWidth || this.contentItems.length <= 1) {\n return;\n }\n\n const sizeData = this._calculateAbsoluteSizes();\n\n /**\n * Figure out how much we are under the min item size total and how much room we have to use.\n */\n for (let i = 0; i < this.contentItems.length; i++) {\n const contentItem = this.contentItems[i];\n const itemSize = sizeData.itemSizes[i];\n\n if (itemSize < minItemWidth) {\n totalUnderMin += minItemWidth - itemSize;\n entry = { width: minItemWidth };\n } else {\n totalOverMin += itemSize - minItemWidth;\n entry = { width: itemSize };\n entriesOverMin.push(entry);\n }\n\n allEntries.push(entry);\n }\n\n /**\n * If there is nothing under min, or there is not enough over to make up the difference, do nothing.\n */\n if (totalUnderMin === 0 || totalUnderMin > totalOverMin) {\n return;\n }\n\n /**\n * Evenly reduce all columns that are over the min item width to make up the difference.\n */\n const reducePercent = totalUnderMin / totalOverMin;\n remainingWidth = totalUnderMin;\n for (let i = 0; i < entriesOverMin.length; i++) {\n entry = entriesOverMin[i];\n const reducedWidth = Math.round(\n (entry.width - minItemWidth) * reducePercent\n );\n remainingWidth -= reducedWidth;\n entry.width -= reducedWidth;\n }\n\n /**\n * Take anything remaining from the last item.\n */\n if (remainingWidth !== 0) {\n allEntries[allEntries.length - 1].width -= remainingWidth;\n }\n\n /**\n * Set every items size relative to 100 relative to its size to total\n */\n for (let i = 0; i < this.contentItems.length; i++) {\n this.contentItems[i].config.width =\n (allEntries[i].width / sizeData.totalWidth) * 100;\n }\n }\n\n /**\n * Instantiates a new lm.controls.Splitter, binds events to it and adds\n * it to the array of splitters at the position specified as the index argument\n *\n * What it doesn't do though is append the splitter to the DOM\n *\n * @param index The position of the splitter\n * @returns The created splitter\n */\n _createSplitter(index: number): Splitter {\n var splitter;\n splitter = new Splitter(\n this._isColumn,\n this._splitterSize,\n this._splitterGrabSize\n );\n splitter.on('drag', this._onSplitterDrag.bind(this, splitter), this);\n splitter.on(\n 'dragStop',\n this._onSplitterDragStop.bind(this, splitter),\n this\n );\n splitter.on(\n 'dragStart',\n this._onSplitterDragStart.bind(this, splitter),\n this\n );\n this._splitter.splice(index, 0, splitter);\n return splitter;\n }\n\n /**\n * Locates the instance of lm.controls.Splitter in the array of\n * registered splitters and returns a map containing the contentItem\n * before and after the splitters, both of which are affected if the\n * splitter is moved\n *\n * @param splitter\n *\n * @returns A map of contentItems that the splitter affects\n */\n _getItemsForSplitter(splitter: Splitter) {\n const index = this._splitter.indexOf(splitter);\n\n if (index < 0) {\n throw new Error('Splitter not found in RowOrColumn');\n }\n\n return {\n before: this.contentItems[index],\n after: this.contentItems[index + 1],\n };\n }\n\n /**\n * Gets the minimum dimensions for the given item configuration array\n * @param item\n * @private\n */\n _getMinimumDimensions(arr: { minWidth?: number; minHeight?: number }[]) {\n var minWidth = 0,\n minHeight = 0;\n\n for (var i = 0; i < arr.length; ++i) {\n minWidth = Math.max(arr[i].minWidth ?? 0, minWidth);\n minHeight = Math.max(arr[i].minHeight ?? 0, minHeight);\n }\n\n return { horizontal: minWidth, vertical: minHeight };\n }\n\n /**\n * Invoked when a splitter's dragListener fires dragStart. Calculates the splitters\n * movement area once (so that it doesn't need calculating on every mousemove event)\n *\n * @param splitter\n */\n _onSplitterDragStart(splitter: Splitter) {\n const items = this._getItemsForSplitter(splitter);\n const minSize =\n this.layoutManager.config.dimensions[\n this._isColumn ? 'minItemHeight' : 'minItemWidth'\n ];\n\n var beforeMinDim = this._getMinimumDimensions(\n items.before.config.content ?? []\n );\n var beforeMinSize = this._isColumn\n ? beforeMinDim.vertical\n : beforeMinDim.horizontal;\n\n var afterMinDim = this._getMinimumDimensions(\n items.after.config.content ?? []\n );\n var afterMinSize = this._isColumn\n ? afterMinDim.vertical\n : afterMinDim.horizontal;\n\n this._splitterPosition = 0;\n this._splitterMinPosition =\n -1 *\n ((items.before.element[this._dimension]() ?? 0) -\n (beforeMinSize || minSize));\n this._splitterMaxPosition =\n (items.after.element[this._dimension]() ?? 0) - (afterMinSize || minSize);\n }\n\n /**\n * Invoked when a splitter's DragListener fires drag. Updates the splitters DOM position,\n * but not the sizes of the elements the splitter controls in order to minimize resize events\n *\n * @param splitter\n * @param offsetX Relative pixel values to the splitters original position. Can be negative\n * @param offsetY Relative pixel values to the splitters original position. Can be negative\n */\n _onSplitterDrag(splitter: Splitter, offsetX: number, offsetY: number) {\n const offset = this._isColumn ? offsetY : offsetX;\n\n if (\n this._splitterMaxPosition == null ||\n this._splitterMinPosition == null\n ) {\n return;\n }\n\n if (\n offset > this._splitterMinPosition &&\n offset < this._splitterMaxPosition\n ) {\n this._splitterPosition = offset;\n splitter.element.css(this._isColumn ? 'top' : 'left', offset);\n }\n }\n\n /**\n * Invoked when a splitter's DragListener fires dragStop. Resets the splitters DOM position,\n * and applies the new sizes to the elements before and after the splitter and their children\n * on the next animation frame\n *\n * @param {lm.controls.Splitter} splitter\n */\n _onSplitterDragStop(splitter: Splitter) {\n this._applySplitterDragStop(splitter);\n\n this._scheduleSetSize();\n }\n\n /**\n * Applies drag-stop updates for one splitter without scheduling layout.\n */\n private _applySplitterDragStop(splitter: Splitter) {\n const items = this._getItemsForSplitter(splitter);\n const sizeBefore = items.before.element[this._dimension]() ?? 0;\n const sizeAfter = items.after.element[this._dimension]() ?? 0;\n const splitterPositionInRange =\n ((this._splitterPosition ?? 0) + sizeBefore) / (sizeBefore + sizeAfter);\n const totalRelativeSize =\n (items.before.config[this._dimension] ?? 0) +\n (items.after.config[this._dimension] ?? 0);\n\n items.before.config[this._dimension] =\n splitterPositionInRange * totalRelativeSize;\n items.after.config[this._dimension] =\n (1 - splitterPositionInRange) * totalRelativeSize;\n\n splitter.element.css({\n top: 0,\n left: 0,\n });\n }\n\n /**\n * Schedules a full descendant size update on the next animation frame.\n */\n private _scheduleSetSize() {\n animFrame(\n this.callDownwards.bind(this, 'setSize', undefined, undefined, undefined)\n );\n // setSize only propagates downwards, so it repositions intersection handles\n // owned by this item and its descendants. A handle that sits at a crossing\n // is owned by the parent RowOrColumn (it depends on a child splitter's\n // position), so ancestors must be refreshed too or their handles drift out\n // of sync with the lines after a drag.\n this._scheduleAncestorIntersectionRefresh();\n }\n\n /**\n * Schedule intersection handle refresh after layout and browser positioning settle.\n */\n private _scheduleIntersectionRefresh() {\n animFrame(() => {\n animFrame(this._refreshIntersectionSplitters.bind(this));\n });\n }\n\n /**\n * Schedule an intersection handle refresh on every RowOrColumn ancestor so\n * crossing handles stay aligned after a drag that only resized descendants.\n */\n private _scheduleAncestorIntersectionRefresh() {\n let ancestor = this.parent;\n while (ancestor != null) {\n if (ancestor instanceof RowOrColumn) {\n ancestor._scheduleIntersectionRefresh();\n }\n ancestor = ancestor.parent;\n }\n }\n\n // ============================================================================\n // Intersection Splitter Methods - Support for 2D grid resizing\n // ============================================================================\n\n /**\n * Create intersection splitters at the crossing points between this\n * RowOrColumn's splitters and the splitters of any perpendicular child.\n *\n * Each handle is appended into this RowOrColumn's container and positioned\n * with JS (via `_positionIntersectionSplitter`) during refresh so it stays\n * aligned as the layout changes. Handles are keyed by their splitter indices\n * so existing ones are reused rather than recreated.\n *\n * @returns The set of crossing keys that currently exist, so callers can\n * sweep handles whose crossing no longer exists.\n */\n private _createIntersectionSplitters(): Set<string> {\n this.childElementContainer.css('position', 'relative');\n\n const ensuredKeys = new Set<string>();\n\n for (\n let parentSplitterIndex = 0;\n parentSplitterIndex < this._splitter.length;\n parentSplitterIndex++\n ) {\n const beforeItem = this.contentItems[parentSplitterIndex];\n const afterItem = this.contentItems[parentSplitterIndex + 1];\n\n // A splitter \"bar\" is crossed by perpendicular splitter lines reaching its\n // shared edge from either side. Those lines can be nested arbitrarily deep\n // (e.g. a row inside a column inside the adjacent row), so walk each\n // adjacent subtree down to the touching edge. The before item meets the\n // bar at its far edge, the after item at its near edge.\n const stems = [\n ...this._collectEdgeStemSplitters(beforeItem, false, 'b'),\n ...this._collectEdgeStemSplitters(afterItem, true, 'a'),\n ];\n\n for (let i = 0; i < stems.length; i++) {\n const stem = stems[i];\n const key = parentSplitterIndex + ':' + stem.path;\n ensuredKeys.add(key);\n this._ensureIntersectionSplitter(\n key,\n parentSplitterIndex,\n stem.stemOwner,\n stem.stemSplitterIndex,\n stem.junctionAtNearEdge\n );\n }\n }\n\n return ensuredKeys;\n }\n\n /**\n * Collect every perpendicular splitter line within `item`'s subtree that\n * reaches the shared edge with one of this row/column's splitter bars, so a\n * crossing handle can be created for it. Lines can be nested arbitrarily deep,\n * so descend until the edge is no longer shared.\n *\n * @param item The subtree root to search.\n * @param nearEdge true when the bar sits at the start of `item` along the bar\n * main axis (junction at the near end), false when at the end.\n * @param path Dot/colon-delimited string uniquely identifying this stem within\n * the layout tree, used as part of the intersection handle key.\n * @returns Array of stem descriptors for each crossing found in the subtree.\n */\n private _collectEdgeStemSplitters(\n item: AbstractContentItem | undefined,\n nearEdge: boolean,\n path: string\n ): {\n stemOwner: RowOrColumn;\n stemSplitterIndex: number;\n junctionAtNearEdge: boolean;\n path: string;\n }[] {\n if (!(item instanceof RowOrColumn)) {\n return [];\n }\n\n if (item._isColumn !== this._isColumn) {\n // Perpendicular to the bar: every splitter here crosses it, and every\n // child spans the full cross extent so all share the edge - recurse into\n // each to pick up deeper crossings.\n const results: {\n stemOwner: RowOrColumn;\n stemSplitterIndex: number;\n junctionAtNearEdge: boolean;\n path: string;\n }[] = [];\n for (let i = 0; i < item._splitter.length; i++) {\n results.push({\n stemOwner: item,\n stemSplitterIndex: i,\n junctionAtNearEdge: nearEdge,\n path: path + ':' + i,\n });\n }\n for (let i = 0; i < item.contentItems.length; i++) {\n results.push(\n ...this._collectEdgeStemSplitters(\n item.contentItems[i],\n nearEdge,\n path + '.' + i\n )\n );\n }\n return results;\n }\n\n // Parallel to the bar: only the child at the shared edge can reach it.\n const edgeIndex = nearEdge ? 0 : item.contentItems.length - 1;\n return this._collectEdgeStemSplitters(\n item.contentItems[edgeIndex],\n nearEdge,\n path + '.' + edgeIndex\n );\n }\n\n /**\n * Recreate intersection splitters based on current splitter topology.\n * This keeps handles aligned and present after layout tree mutations.\n */\n private _refreshIntersectionSplitters() {\n const previousCount = this._intersectionSplitter.length;\n const ensuredKeys = this._createIntersectionSplitters();\n\n // Sweep handles whose crossing no longer exists after a topology change.\n this._intersectionSplitter = this._intersectionSplitter.filter(record => {\n if (ensuredKeys.has(record.key)) {\n return true;\n }\n record.splitter._$destroy();\n return false;\n });\n\n for (let i = 0; i < this._intersectionSplitter.length; i++) {\n this._positionIntersectionSplitter(this._intersectionSplitter[i]);\n }\n\n // If handles were added/removed due to topology change, run one more pass\n // on the next frame to settle post-layout positions.\n if (this._intersectionSplitter.length !== previousCount) {\n animFrame(() => {\n for (let i = 0; i < this._intersectionSplitter.length; i++) {\n this._positionIntersectionSplitter(this._intersectionSplitter[i]);\n }\n });\n }\n }\n\n /**\n * Destroy all previously created intersection splitters.\n */\n private _destroyIntersectionSplitters() {\n for (let i = 0; i < this._intersectionSplitter.length; i++) {\n this._intersectionSplitter[i].splitter._$destroy();\n }\n this._intersectionSplitter = [];\n }\n\n /**\n * Tear down splitters (including intersection handles and their document-level\n * drag listeners) before delegating to the base destroy logic.\n */\n _$destroy() {\n this._destroyIntersectionSplitters();\n for (let i = 0; i < this._splitter.length; i++) {\n this._splitter[i]._$destroy();\n }\n this._splitter = [];\n AbstractContentItem.prototype._$destroy.call(this);\n }\n\n /**\n * Whether any golden-layout drag that should suppress intersection hover\n * affordances is in progress. Covers a 1D splitter drag or a panel drag\n * (both signalled by `lm_dragging` on the body) and the 2D intersection drag\n * itself (`lm_intersection_dragging`). During these the handle must not light\n * up its cross as the pointer passes over a crossing.\n *\n * @returns True when a golden-layout drag is active.\n */\n private static _isAnyDragInProgress(): boolean {\n return (\n $(document.body).hasClass('lm_dragging') ||\n $(document.body).hasClass('lm_intersection_dragging')\n );\n }\n\n /**\n * Create a single intersection splitter anchored in this row/column overlay\n * at the given coordinates.\n *\n * @param key Unique key identifying this crossing (parent splitter index plus\n * the stem's tree path), used to reuse an existing handle instead\n * of creating a duplicate.\n * @param parentSplitterIndex Index into this row/column's `_splitter` array of\n * the \"bar\" splitter that owns the crossing.\n * @param stemOwner The RowOrColumn (possibly a descendant) that owns the\n * perpendicular \"stem\" splitter crossing the bar.\n * @param stemSplitterIndex Index into `stemOwner._splitter` of the stem\n * splitter.\n * @param junctionAtNearEdge True when the stem meets the bar at the stem\n * owner's near edge, false at its far edge.\n */\n private _ensureIntersectionSplitter(\n key: string,\n parentSplitterIndex: number,\n stemOwner: RowOrColumn,\n stemSplitterIndex: number,\n junctionAtNearEdge: boolean\n ) {\n const existing = this._intersectionSplitter.find(item => item.key === key);\n if (existing != null) {\n existing.parentSplitterIndex = parentSplitterIndex;\n existing.stemOwner = stemOwner;\n existing.stemSplitterIndex = stemSplitterIndex;\n existing.junctionAtNearEdge = junctionAtNearEdge;\n return;\n }\n\n const intersectionSplitter = new IntersectionSplitter(\n this._splitterSize,\n this._splitterGrabSize\n );\n\n // Handlers close over the record so reuse (which mutates the record in\n // place) keeps them pointed at the current crossing.\n const record: IntersectionRecord = {\n splitter: intersectionSplitter,\n key,\n parentSplitterIndex,\n stemOwner,\n stemSplitterIndex,\n junctionAtNearEdge,\n };\n\n intersectionSplitter.on('dragStart', () =>\n this._onIntersectionSplitterDragStart(record)\n );\n intersectionSplitter.on('drag', (offsetX: number, offsetY: number) =>\n this._onIntersectionSplitterDrag(record, offsetX, offsetY)\n );\n intersectionSplitter.on('dragStop', () =>\n this._onIntersectionSplitterDragStop(record)\n );\n\n // Highlight both perpendicular lines while hovering the grab area, mirroring\n // the active line affordance used for 1D splitter drags.\n let hoverPartner: IntersectionRecord | null = null;\n intersectionSplitter.element.on('mouseenter', () => {\n // Ignore hover state changes while any drag is in progress. This covers\n // our own active 2D drag (crossing other handles must not transfer or pin\n // highlights) as well as 1D golden-layout splitter or panel drags, which\n // would otherwise flash the cross highlight as the pointer passes over a\n // crossing mid-drag.\n if (this._isIntersectionDragging || RowOrColumn._isAnyDragInProgress()) {\n return;\n }\n this._setIntersectionHighlight(record, true);\n hoverPartner = this._findNearFourWayPartner(record);\n if (hoverPartner != null) {\n this._setIntersectionHighlight(hoverPartner, true);\n }\n });\n intersectionSplitter.element.on('mouseleave', () => {\n if (\n this._isIntersectionDragging ||\n $(document.body).hasClass('lm_intersection_dragging')\n ) {\n return;\n }\n this._setIntersectionHighlight(record, false);\n if (hoverPartner != null) {\n this._setIntersectionHighlight(hoverPartner, false);\n hoverPartner = null;\n }\n });\n\n intersectionSplitter.element.css({\n position: 'absolute',\n left: 0,\n top: 0,\n transform: 'translate(-50%, -50%)',\n zIndex: 60,\n });\n\n this.childElementContainer.append(intersectionSplitter.element);\n this._intersectionSplitter.push(record);\n }\n\n /**\n * Move an intersection handle to the current centre of its crossing.\n *\n * @param record The intersection handle record to reposition.\n */\n private _positionIntersectionSplitter(record: IntersectionRecord) {\n const position = this._getIntersectionPosition(record);\n\n if (position == null) {\n return;\n }\n\n record.splitter.element.css({\n left: position.left,\n top: position.top,\n });\n }\n\n /**\n * Compute intersection coordinates (the centre of the crossing) relative to\n * this row/column container.\n *\n * Uses `getBoundingClientRect` for the container and both splitter elements\n * rather than jQuery `.position()`. `.position()` is relative to each\n * element's offset parent, which varies with nesting and `position: relative`\n * on intermediate items, so adding those values together mis-places the\n * handle at some crossings. Rect-based deltas are independent of the offset\n * parent chain and always land on the visual crossing.\n *\n * @param record The intersection handle record to locate.\n * @returns The `{ left, top }` crossing centre relative to this row/column\n * container, or null when the geometry is unavailable.\n */\n private _getIntersectionPosition(\n record: IntersectionRecord\n ): { left: number; top: number } | null {\n const parentSplitter = this._splitter[record.parentSplitterIndex];\n const childSplitter = record.stemOwner?._splitter[record.stemSplitterIndex];\n\n const container = this.childElementContainer[0];\n const parentEl = parentSplitter?.element[0];\n const childEl = childSplitter?.element[0];\n\n if (container == null || parentEl == null || childEl == null) {\n return null;\n }\n\n const containerRect = container.getBoundingClientRect();\n const parentRect = parentEl.getBoundingClientRect();\n const childRect = childEl.getBoundingClientRect();\n\n const parentCenterX =\n parentRect.left + parentRect.width / 2 - containerRect.left;\n const parentCenterY =\n parentRect.top + parentRect.height / 2 - containerRect.top;\n const childCenterX =\n childRect.left + childRect.width / 2 - containerRect.left;\n const childCenterY =\n childRect.top + childRect.height / 2 - containerRect.top;\n\n // The parent splitter runs along the cross axis (the \"bar\") and the child\n // splitter along the main axis (the \"stem\"); take each line's centre.\n if (this._isColumn) {\n return { left: childCenterX, top: parentCenterY };\n }\n\n return { left: parentCenterX, top: childCenterY };\n }\n\n /**\n * Toggle the active-line highlight on both splitters that meet at an\n * intersection. Reuses the standard `.lm_dragging` line style so the 2D\n * affordance is visually identical to the existing 1D drag affordance, and\n * adds `.lm_intersection_line` to lift the lines above pane content so an\n * offset junction renders cleanly instead of being clipped by a neighbour.\n *\n * @param record The intersection handle whose two perpendicular lines to\n * toggle.\n * @param highlighted True to add the highlight, false to remove it.\n */\n private _setIntersectionHighlight(\n record: IntersectionRecord,\n highlighted: boolean\n ) {\n const parentSplitter = this._splitter[record.parentSplitterIndex];\n const childSplitter = record.stemOwner?._splitter[record.stemSplitterIndex];\n\n parentSplitter?.element.toggleClass('lm_dragging', highlighted);\n parentSplitter?.element.toggleClass('lm_intersection_line', highlighted);\n childSplitter?.element.toggleClass('lm_dragging', highlighted);\n childSplitter?.element.toggleClass('lm_intersection_line', highlighted);\n }\n\n /**\n * Find a nearby sibling intersection on the same parent splitter so a\n * near-aligned 4-way corner can be dragged as one.\n *\n * @param record The intersection handle to find a partner for.\n * @returns The closest sibling handle within tolerance, or null if none.\n */\n private _findNearFourWayPartner(\n record: IntersectionRecord\n ): IntersectionRecord | null {\n // getBoundingClientRect() returns zeros in jsdom; skip partner detection\n // when geometry is unavailable so unit tests remain deterministic.\n const container = this.childElementContainer[0];\n const containerRect = container?.getBoundingClientRect();\n if (\n containerRect == null ||\n (containerRect.width === 0 && containerRect.height === 0)\n ) {\n return null;\n }\n\n const base = this._getIntersectionPosition(record);\n if (base == null) {\n return null;\n }\n\n // Keep this intentionally conservative for now; can be made configurable.\n const tolerancePx = 8;\n let best: IntersectionRecord | null = null;\n let bestDist = Number.POSITIVE_INFINITY;\n\n for (let i = 0; i < this._intersectionSplitter.length; i++) {\n const candidate = this._intersectionSplitter[i];\n if (\n candidate.key === record.key ||\n candidate.parentSplitterIndex !== record.parentSplitterIndex\n ) {\n continue;\n }\n\n const position = this._getIntersectionPosition(candidate);\n if (position == null) {\n continue;\n }\n\n const dx = Math.abs(position.left - base.left);\n const dy = Math.abs(position.top - base.top);\n if (dx > tolerancePx || dy > tolerancePx) {\n continue;\n }\n\n const dist = dx + dy;\n if (dist < bestDist) {\n bestDist = dist;\n best = candidate;\n }\n }\n\n return best;\n }\n\n /**\n * Clamp and apply one splitter visual drag offset on the owner's active axis.\n *\n * @param owner The RowOrColumn that owns the splitter and its min/max bounds.\n * @param splitter The splitter whose visual position to move.\n * @param offset The desired pixel offset along the owner's active axis;\n * clamped to the owner's min/max drag range before applying.\n */\n private _setSplitterDragOffset(\n owner: RowOrColumn,\n splitter: Splitter,\n offset: number\n ) {\n const min = owner._splitterMinPosition;\n const max = owner._splitterMaxPosition;\n if (min == null || max == null) {\n return;\n }\n\n const clamped = Math.max(min, Math.min(max, offset));\n owner._splitterPosition = clamped;\n splitter.element.css(owner._isColumn ? 'top' : 'left', clamped);\n }\n\n /**\n * Get the splitter line center on the owner's active drag axis.\n *\n * @param owner The RowOrColumn that determines the active axis.\n * @param splitter The splitter to measure.\n * @returns The line centre in client coordinates on the active axis, or null\n * when the element is unavailable.\n */\n private _getSplitterAxisCenter(owner: RowOrColumn, splitter: Splitter) {\n const element = splitter.element[0];\n if (element == null) {\n return null;\n }\n\n const rect = element.getBoundingClientRect();\n return owner._isColumn\n ? rect.top + rect.height / 2\n : rect.left + rect.width / 2;\n }\n\n /**\n * Invoked when an intersection splitter's DragListener fires dragStart.\n * Calculates movement bounds for both axes (via the existing 1D logic) so the\n * drag stays within valid ranges, and highlights both perpendicular lines.\n *\n * @param record The intersection handle that started dragging.\n */\n private _onIntersectionSplitterDragStart(record: IntersectionRecord) {\n const parentSplitter = this._splitter[record.parentSplitterIndex];\n const childSplitter = record.stemOwner._splitter[record.stemSplitterIndex];\n const partner = this._findNearFourWayPartner(record);\n const partnerSplitter = partner\n ? partner.stemOwner._splitter[partner.stemSplitterIndex]\n : null;\n\n // Reuse the existing 1D splitter drag logic to compute bounds for each axis.\n this._onSplitterDragStart(parentSplitter);\n record.stemOwner._onSplitterDragStart(childSplitter);\n this._activeFourWaySharedCenterMin = null;\n this._activeFourWaySharedCenterMax = null;\n this._activeFourWayBaseCenter = null;\n this._activeFourWayPartnerBaseCenter = null;\n\n if (partner != null && partnerSplitter != null) {\n partner.stemOwner._onSplitterDragStart(partnerSplitter);\n\n const baseCenter = this._getSplitterAxisCenter(\n record.stemOwner,\n childSplitter\n );\n const partnerBaseCenter = this._getSplitterAxisCenter(\n partner.stemOwner,\n partnerSplitter\n );\n\n const recordMin = record.stemOwner._splitterMinPosition;\n const recordMax = record.stemOwner._splitterMaxPosition;\n const partnerMin = partner.stemOwner._splitterMinPosition;\n const partnerMax = partner.stemOwner._splitterMaxPosition;\n if (\n recordMin != null &&\n recordMax != null &&\n partnerMin != null &&\n partnerMax != null &&\n baseCenter != null &&\n partnerBaseCenter != null\n ) {\n const recordCenterMin = baseCenter + recordMin;\n const recordCenterMax = baseCenter + recordMax;\n const partnerCenterMin = partnerBaseCenter + partnerMin;\n const partnerCenterMax = partnerBaseCenter + partnerMax;\n const sharedCenterMin = Math.max(recordCenterMin, partnerCenterMin);\n const sharedCenterMax = Math.min(recordCenterMax, partnerCenterMax);\n if (sharedCenterMin <= sharedCenterMax) {\n this._activeFourWayPartner = partner;\n this._activeFourWaySharedCenterMin = sharedCenterMin;\n this._activeFourWaySharedCenterMax = sharedCenterMax;\n this._activeFourWayBaseCenter = baseCenter;\n this._activeFourWayPartnerBaseCenter = partnerBaseCenter;\n } else {\n this._activeFourWayPartner = null;\n }\n } else {\n this._activeFourWayPartner = null;\n }\n } else {\n this._activeFourWayPartner = null;\n }\n\n this._isIntersectionDragging = true;\n this._setIntersectionHighlight(record, true);\n if (this._activeFourWayPartner != null) {\n this._setIntersectionHighlight(this._activeFourWayPartner, true);\n }\n $(document.body).addClass('lm_intersection_dragging');\n }\n\n /**\n * Invoked when an intersection splitter's DragListener fires drag. Moves both\n * splitter lines by delegating to the existing 1D logic, which clamps each\n * axis to its own valid range. The lines moving form the 2D drag affordance.\n *\n * The stem line spans the full extent of its owner along the parent axis, so\n * when the parent line moves the junction would otherwise detach. The stem is\n * stretched to follow the parent line while its far tip stays anchored.\n *\n * The stretch is applied with a CSS `transform: scale(...)` about the far tip\n * rather than by changing the line's `width`/`height`/`top`/`left`. Splitter\n * lines are real in-flow elements (floated / `position: relative`), so\n * mutating their box size reflows sibling panes and headers (tabs jump,\n * content shifts, gaps appear). A transform is painted without affecting\n * layout, so the affordance stretches cleanly even for deeply nested grids.\n *\n * @param record The intersection handle being dragged.\n * @param offsetX Horizontal pixels moved from the drag origin. Can be negative.\n * @param offsetY Vertical pixels moved from the drag origin. Can be negative.\n */\n private _onIntersectionSplitterDrag(\n record: IntersectionRecord,\n offsetX: number,\n offsetY: number\n ) {\n const parentSplitter = this._splitter[record.parentSplitterIndex];\n const childSplitter = record.stemOwner._splitter[record.stemSplitterIndex];\n const partner = this._activeFourWayPartner;\n const partnerSplitter = partner\n ? partner.stemOwner._splitter[partner.stemSplitterIndex]\n : null;\n\n this._onSplitterDrag(parentSplitter, offsetX, offsetY);\n if (partner != null && partnerSplitter != null) {\n // Keep both stems aligned by applying one shared clamped offset across the\n // intersection axis for both stem owners.\n const desiredStemOffset = record.stemOwner._isColumn ? offsetY : offsetX;\n const sharedCenterMin = this._activeFourWaySharedCenterMin;\n const sharedCenterMax = this._activeFourWaySharedCenterMax;\n const baseCenter = this._activeFourWayBaseCenter;\n const partnerBaseCenter = this._activeFourWayPartnerBaseCenter;\n if (\n sharedCenterMin != null &&\n sharedCenterMax != null &&\n baseCenter != null &&\n partnerBaseCenter != null\n ) {\n const desiredCenter = baseCenter + desiredStemOffset;\n const sharedCenter = Math.max(\n sharedCenterMin,\n Math.min(sharedCenterMax, desiredCenter)\n );\n this._setSplitterDragOffset(\n record.stemOwner,\n childSplitter,\n sharedCenter - baseCenter\n );\n this._setSplitterDragOffset(\n partner.stemOwner,\n partnerSplitter,\n sharedCenter - partnerBaseCenter\n );\n }\n } else {\n record.stemOwner._onSplitterDrag(childSplitter, offsetX, offsetY);\n }\n\n // Scale the stem line along the parent axis so its junction tip tracks the\n // parent line while its far tip stays put. `_splitterPosition` is the\n // parent's clamped offset; the stem owner extent gives the line's length.\n const shift = this._splitterPosition ?? 0;\n const fullLength = record.stemOwner.element[this._dimension]() ?? 0;\n const newLength = record.junctionAtNearEdge\n ? fullLength - shift\n : fullLength + shift;\n // Keep the stretched stem visible and non-inverted even when the parent\n // splitter's clamped shift exceeds the stem owner's span.\n const minVisibleLength = Math.max(this._splitterSize, 1);\n const safeLength = Math.max(newLength, minVisibleLength);\n const scale = fullLength > 0 ? safeLength / fullLength : 1;\n\n // Anchor the far tip: scale about the edge opposite the junction.\n const farEdge = record.junctionAtNearEdge\n ? this._isColumn\n ? 'bottom'\n : 'right'\n : this._isColumn\n ? 'top'\n : 'left';\n\n childSplitter.element.css({\n 'transform-origin': farEdge,\n transform: this._isColumn ? `scaleY(${scale})` : `scaleX(${scale})`,\n });\n\n if (partner != null && partnerSplitter != null) {\n const partnerShift = this._splitterPosition ?? 0;\n const partnerFullLength =\n partner.stemOwner.element[this._dimension]() ?? 0;\n const partnerNewLength = partner.junctionAtNearEdge\n ? partnerFullLength - partnerShift\n : partnerFullLength + partnerShift;\n const partnerMinVisibleLength = Math.max(this._splitterSize, 1);\n const partnerSafeLength = Math.max(\n partnerNewLength,\n partnerMinVisibleLength\n );\n const partnerScale =\n partnerFullLength > 0 ? partnerSafeLength / partnerFullLength : 1;\n const partnerFarEdge = partner.junctionAtNearEdge\n ? this._isColumn\n ? 'bottom'\n : 'right'\n : this._isColumn\n ? 'top'\n : 'left';\n\n partnerSplitter.element.css({\n 'transform-origin': partnerFarEdge,\n transform: this._isColumn\n ? `scaleY(${partnerScale})`\n : `scaleX(${partnerScale})`,\n });\n }\n }\n\n /**\n * Invoked when an intersection splitter's DragListener fires dragStop.\n * Applies both axis updates atomically (via the existing 1D logic), clears the\n * highlight unless the pointer is still over the handle, then relayouts once.\n *\n * @param record The intersection handle that finished dragging.\n */\n private _onIntersectionSplitterDragStop(record: IntersectionRecord) {\n const parentSplitter = this._splitter[record.parentSplitterIndex];\n const childSplitter = record.stemOwner._splitter[record.stemSplitterIndex];\n const partner = this._activeFourWayPartner;\n const partnerSplitter = partner\n ? partner.stemOwner._splitter[partner.stemSplitterIndex]\n : null;\n\n this._applySplitterDragStop(parentSplitter);\n\n // In 4-way mode, enforce one final shared stem offset before applying stop\n // so both corners land perfectly aligned on drop.\n if (\n partner != null &&\n partnerSplitter != null &&\n this._activeFourWaySharedCenterMin != null &&\n this._activeFourWaySharedCenterMax != null &&\n this._activeFourWayBaseCenter != null &&\n this._activeFourWayPartnerBaseCenter != null\n ) {\n const baseOffset = record.stemOwner._splitterPosition ?? 0;\n const desiredCenter = this._activeFourWayBaseCenter + baseOffset;\n const sharedCenter = Math.max(\n this._activeFourWaySharedCenterMin,\n Math.min(this._activeFourWaySharedCenterMax, desiredCenter)\n );\n this._setSplitterDragOffset(\n record.stemOwner,\n childSplitter,\n sharedCenter - this._activeFourWayBaseCenter\n );\n this._setSplitterDragOffset(\n partner.stemOwner,\n partnerSplitter,\n sharedCenter - this._activeFourWayPartnerBaseCenter\n );\n }\n\n record.stemOwner._applySplitterDragStop(childSplitter);\n if (partner != null && partnerSplitter != null) {\n partner.stemOwner._applySplitterDragStop(partnerSplitter);\n }\n\n // Clear the stretch transform applied during drag so the stem line falls\n // back to its CSS full-extent size once the layout is reapplied.\n childSplitter.element.css({ transform: '', 'transform-origin': '' });\n if (partnerSplitter != null) {\n partnerSplitter.element.css({ transform: '', 'transform-origin': '' });\n }\n\n this._isIntersectionDragging = false;\n this._setIntersectionHighlight(record, false);\n if (partner != null) {\n this._setIntersectionHighlight(partner, false);\n }\n this._activeFourWayPartner = null;\n this._activeFourWaySharedCenterMin = null;\n this._activeFourWaySharedCenterMax = null;\n this._activeFourWayBaseCenter = null;\n this._activeFourWayPartnerBaseCenter = null;\n $(document.body).removeClass('lm_intersection_dragging');\n\n this._scheduleSetSize();\n }\n}\n"],"mappings":";;;AAAA,OAAOA,CAAC,MAAM,QAAQ;AAAC,OAChBC,mBAAmB;AAAA,SACjBC,SAAS;AAAA,SACTC,oBAAoB,EAAEC,QAAQ;AAIvC;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,eAAe,MAAMC,WAAW,SAASJ,mBAAmB,CAAC;EAkC3DK,WAAWA,CACTC,QAAiB,EACjBC,aAA4B,EAC5BC,MAAwC,EACxCC,MAAkC,EAClC;IACA,KAAK,CACHF,aAAa,EACbC,MAAM,EACNC,MAAM,EACNV,CAAC,CAAC,yBAAyB,IAAIO,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC,GAAG,UAAU,CAC1E,CAAC;IAACI,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,oBAvC4B,EAAE;IAAAA,eAAA,gCACoB,EAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,4BAKb,IAAI;IAAAA,eAAA,+BACD,IAAI;IAAAA,eAAA,+BACJ,IAAI;IAAAA,eAAA,kCAChB,KAAK;IAAAA,eAAA,gCACoB,IAAI;IAAAA,eAAA,wCACR,IAAI;IAAAA,eAAA,wCACJ,IAAI;IAAAA,eAAA,mCACT,IAAI;IAAAA,eAAA,0CACG,IAAI;IA0B3D,IAAI,CAACD,MAAM,GAAGA,MAAM;IAEpB,IAAI,CAACE,KAAK,GAAG,CAACL,QAAQ;IACtB,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IAExB,IAAI,CAACM,qBAAqB,GAAG,IAA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AACC,yBAAyB,CAAChB,MAAM,EAAE,KAAK,CAAC;IAC7C,IAAIwD,OAAO,IAAI,IAAI,EAAE;MACnB,IAAI,CAACxC,yBAAyB,CAACwC,OAAO,EAAE,KAAK,CAAC;IAChD;IACA,IAAI,CAACkB,qBAAqB,GAAG,IAAI;IACjC,IAAI,CAAChB,6BAA6B,GAAG,IAAI;IACzC,IAAI,CAACC,6BAA6B,GAAG,IAAI;IACzC,IAAI,CAACC,wBAAwB,GAAG,IAAI;IACpC,IAAI,CAACC,+BAA+B,GAAG,IAAI;IAC3C7O,CAAC,CAACqL,QAAQ,CAACC,IAAI,CAAC,CAAC8F,WAAW,CAAC,0BAA0B,CAAC;IAExD,IAAI,CAACzI,gBAAgB,CAAC,CAAC;EACzB;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/golden-layout",
3
- "version": "1.23.1-legacy-table-plugin.bbf55c8.0+bbf55c8",
3
+ "version": "1.24.0",
4
4
  "author": "Deephaven Data Labs LLC",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A multi-screen javascript Layout manager",
@@ -10,7 +10,7 @@
10
10
  "source": "src/index.ts",
11
11
  "type": "module",
12
12
  "dependencies": {
13
- "@deephaven/components": "^1.23.1-legacy-table-plugin.bbf55c8.0+bbf55c8",
13
+ "@deephaven/components": "^1.22.1",
14
14
  "jquery": "^3.6.0",
15
15
  "nanoid": "^5.0.7"
16
16
  },
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "bbf55c8e8e005d3d1aa6bc4800a64499a6ad7288"
49
+ "gitHead": "27e12b2ad1e57305d0bb607a8208077d01123d15"
50
50
  }
@@ -79,6 +79,36 @@ $height6: 15px; // Appears 1 time
79
79
  cursor: ew-resize;
80
80
  }
81
81
  }
82
+
83
+ // While part of an active 2D intersection (hover or drag), lift the line above
84
+ // pane content so an offset T/cross junction renders cleanly instead of being
85
+ // clipped by the neighbouring pane. Stays below the intersection handle
86
+ // (z-index 22) so the handle always wins pointer priority for 2D dragging.
87
+ &.lm_intersection_line {
88
+ z-index: 21;
89
+ }
90
+ }
91
+
92
+ // Intersection splitter: invisible grab area at crossing points for 2D resizing.
93
+ // pointer-events intentionally inherits from ancestor so foreign drags (1D splitter,
94
+ // grid column) suppress the handle without needing extra rules here.
95
+ .lm_intersection_splitter {
96
+ position: absolute;
97
+ z-index: 22;
98
+ cursor: move;
99
+
100
+ .lm_drag_handle {
101
+ position: absolute;
102
+ width: 100%;
103
+ height: 100%;
104
+ cursor: move;
105
+ }
106
+ }
107
+
108
+ // Disable the intersection handle while a golden-layout drag is active.
109
+ // The dark theme sets this on `.lm_dragging` too; this rule covers other themes.
110
+ .lm_dragging .lm_intersection_splitter {
111
+ pointer-events: none;
82
112
  }
83
113
 
84
114
  // Pane Header (container of Tabs for each pane)