UNPKG

@vuesax-alpha/nightly

Version:
29 lines (24 loc) 815 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var index = require('../../utils/index.js'); var dom = require('../../utils/dom.js'); const noOffsets = index.createCoords(0); function getVisualOffsets(element) { const win = dom.getWindow(element); if (!dom.isWebKit() || !win.visualViewport) { return noOffsets; } return { x: win.visualViewport.offsetLeft, y: win.visualViewport.offsetTop }; } function shouldAddVisualOffsets(element, isFixed = false, floatingOffsetParent) { if (!floatingOffsetParent || isFixed && floatingOffsetParent !== dom.getWindow(element)) { return false; } return isFixed; } exports.getVisualOffsets = getVisualOffsets; exports.shouldAddVisualOffsets = shouldAddVisualOffsets; //# sourceMappingURL=get-visual-offsets.js.map