UNPKG

@tencentcloud/roomkit-electron-vue3

Version:

<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,

21 lines (20 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); require("./environment.js"); function getContentSize(element) { const computedStyle = getComputedStyle(element); const paddingTop = Number(computedStyle.paddingTop.replace("px", "")); const paddingBottom = Number(computedStyle.paddingBottom.replace("px", "")); const borderTop = Number(computedStyle.borderTopWidth.replace("px", "")); const borderBottom = Number( computedStyle.borderBottomWidth.replace("px", "") ); const paddingLeft = Number(computedStyle.paddingLeft.replace("px", "")); const paddingRight = Number(computedStyle.paddingRight.replace("px", "")); const borderLeft = Number(computedStyle.borderLeftWidth.replace("px", "")); const borderRight = Number(computedStyle.borderRightWidth.replace("px", "")); const contentWidth = element.offsetWidth - paddingLeft - paddingRight - borderLeft - borderRight; const contentHeight = element.offsetHeight - paddingTop - paddingBottom - borderTop - borderBottom; return { width: contentWidth, height: contentHeight }; } exports.getContentSize = getContentSize;