SourceTermAnalysisSystem_vue/node_modules/@antv/x6-common/es/dom/style.js
2026-05-15 10:22:44 +08:00

25 lines
888 B
JavaScript

import { getVendorPrefixedName } from './prefix';
export function setPrefixedStyle(style, name, value) {
const vendor = getVendorPrefixedName(name);
if (vendor != null) {
style[vendor] = value;
}
style[name] = value;
}
export function getComputedStyle(elem, name) {
// IE9+
const computed = elem.ownerDocument &&
elem.ownerDocument.defaultView &&
elem.ownerDocument.defaultView.opener
? elem.ownerDocument.defaultView.getComputedStyle(elem, null)
: window.getComputedStyle(elem, null);
if (computed && name) {
return computed.getPropertyValue(name) || computed[name];
}
return computed;
}
export function hasScrollbars(container) {
const style = getComputedStyle(container);
return (style != null && (style.overflow === 'scroll' || style.overflow === 'auto'));
}
//# sourceMappingURL=style.js.map