UNPKG

@visactor/vtable

Version:

canvas table width high performance

13 lines (9 loc) 382 B
import { isNode } from "./helper"; export let defaultPixelRatio = 1; export function getPixelRatio() { return isNode ? defaultPixelRatio = 1 : (defaultPixelRatio = Math.ceil(window.devicePixelRatio || 1), defaultPixelRatio > 1 && defaultPixelRatio % 2 != 0 && (defaultPixelRatio += 1)), defaultPixelRatio; } getPixelRatio(); //# sourceMappingURL=pixel-ratio.js.map