Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
toggleCollapse: alias('collapse.click'),
isSelected: hasClass('is-selected'),
/**
Helper function to click with options like the meta key and ctrl key set
@param {Object} options - click event options
*/
async clickWith(options) {
await click(findElement(this), options);
},
doubleClick: triggerable('dblclick'),
}),
/**
A shortcut to return cell page object specified by row & column indexes.
*/
getCell(rowIndex, columnIndex) {
return this.rows.objectAt(rowIndex).cells.objectAt(columnIndex);
},
});
/**
* Retrieves selected header cell height.
*/
get height() {
return findElement(this).offsetHeight;
},
get isLeaf() {
return findElement(this).dataset.testLeafHeader;
},
isFixedLeft: hasClass('is-fixed-left'),
isFixedRight: hasClass('is-fixed-right'),
contextMenu: triggerable('contextmenu'),
/**
* Resizes this column by dragging right border several pixels.
*/
async resize(targetSize) {
let resizeHandle = findElement(this, '.et-header-resize-area');
if (!resizeHandle) {
return;
}
let box = resizeHandle.getBoundingClientRect();
let startX = (box.right + box.left) / 2;
let deltaX = (targetSize - this.width) / getScale(resizeHandle);
if (this.isFixedRight) {