get-window-offset
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -12,2 +12,3 @@ "use strict"; | ||
*/ | ||
/** | ||
@@ -14,0 +15,0 @@ * @param {HTMLElement} node |
@@ -12,2 +12,3 @@ "use strict"; | ||
*/ | ||
/** | ||
@@ -14,0 +15,0 @@ * @param {HTMLElement} node |
@@ -5,3 +5,4 @@ "use strict"; | ||
exports.__esModule = true; | ||
exports.getNearLocation = exports["default"] = void 0; | ||
exports["default"] = nearWhere; | ||
exports.getNearLocation = exports.getDomCenter = void 0; | ||
var _getDomPositionInfo3 = _interopRequireDefault(require("./getDomPositionInfo.js")); | ||
@@ -30,3 +31,3 @@ var _type = require("./type.js"); | ||
*/ | ||
var getDomCenter = function getDomCenter(dom) { | ||
var getDomCenter = exports.getDomCenter = function getDomCenter(dom) { | ||
var _getDomPositionInfo; | ||
@@ -83,3 +84,3 @@ var _ref = ((_getDomPositionInfo = (0, _getDomPositionInfo3["default"])(dom)) === null || _getDomPositionInfo === void 0 ? void 0 : _getDomPositionInfo.domInfo) || {}, | ||
*/ | ||
var nearWhere = function nearWhere(targetEl, floatElOrFloatXY) { | ||
function nearWhere(targetEl, floatElOrFloatXY) { | ||
var tarCenter = getDomCenter(targetEl); | ||
@@ -103,3 +104,3 @@ var floatXY; | ||
return getNearLocation(tarCenter, floatXY); | ||
}; | ||
var _default = exports["default"] = nearWhere; | ||
} | ||
; |
{ | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"name": "get-window-offset", | ||
@@ -25,2 +25,3 @@ "repository": { | ||
"exports": { | ||
"types": "./types/index.d.ts", | ||
"require": "./build/cjs/src/index.js", | ||
@@ -27,0 +28,0 @@ "import": "./build/es/src/index.mjs" |
@@ -1,2 +0,1 @@ | ||
export default nearWhere; | ||
/** | ||
@@ -7,10 +6,6 @@ * @param {HTMLElement} targetEl | ||
*/ | ||
declare function nearWhere(targetEl: HTMLElement, floatElOrFloatXY: HTMLElement | Coordinate): NearLocType; | ||
/** | ||
* @param {Coordinate} center | ||
* @param {Coordinate} floatInfo | ||
* @returns {NearLocType} | ||
*/ | ||
export default function nearWhere(targetEl: HTMLElement, floatElOrFloatXY: HTMLElement | Coordinate): NearLocType; | ||
export function getDomCenter(dom: HTMLElement): Coordinate; | ||
export function getNearLocation(center: Coordinate, floatInfo: Coordinate): NearLocType; | ||
import { Coordinate } from "./type"; | ||
import { NearLocType } from "./type"; |
Sorry, the diff of this file is not supported yet
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
68821
2213