@mpxjs/api-proxy
Advanced tools
Comparing version 2.8.46 to 2.8.49
{ | ||
"name": "@mpxjs/api-proxy", | ||
"version": "2.8.46", | ||
"version": "2.8.49", | ||
"description": "convert miniprogram API at each end", | ||
@@ -42,3 +42,3 @@ "module": "src/index.js", | ||
}, | ||
"gitHead": "dcf6f000660d56207ff414cb776e8bc6d5ce651f" | ||
"gitHead": "b399e81951df7094fb0a494ae877bcf4e6a2985b" | ||
} |
@@ -100,12 +100,4 @@ import { nextTick } from '../next-tick' | ||
const { left = 0, right = 0, top = 0, bottom = 0 } = marginsTemp | ||
this._root = document.querySelector('html') | ||
const viewportWidth = window.innerWidth || document.documentElement.clientWidth | ||
const viewportHeight = window.innerHeight || document.documentElement.clientHeight | ||
const rootWidth = this._root.offsetWidth || 0 | ||
const rootHeight = this._root.offsetHeight || 0 | ||
if (rootHeight >= viewportHeight) { | ||
this._rootMargin = `${top}px ${viewportWidth - rootWidth + right}px ${viewportHeight - rootHeight + bottom}px ${left}px` | ||
} else { | ||
this._rootMargin = `${top}px ${right}px ${bottom}px ${left}px` | ||
} | ||
this._root = null | ||
this._rootMargin = `${top}px ${right}px ${bottom}px ${left}px` | ||
this._relativeInfo.push({ selector: null, margins }) | ||
@@ -112,0 +104,0 @@ }) |
@@ -78,3 +78,3 @@ import NodesRef from './NodesRef' | ||
_handleFields (fields, el, selector) { | ||
if (!el) return null | ||
if (!el || (el && !el.getBoundingClientRect)) return null | ||
const { id, dataset, rect, size, scrollOffset, properties = [], computedStyle = [], node } = fields | ||
@@ -81,0 +81,0 @@ const { left, right, top, bottom, width, height } = el.getBoundingClientRect() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120149
3165