@zag-js/dom-event
Advanced tools
Comparing version 0.0.0-dev-20230409191656 to 0.0.0-dev-20230414151834
@@ -177,4 +177,4 @@ "use strict"; | ||
const relativePoint = getRelativePointValue(absolutePoint, element); | ||
const x = clamp(relativePoint.x / element.offsetWidth) * 100; | ||
const y = clamp(relativePoint.y / element.offsetHeight) * 100; | ||
const x = clamp(relativePoint.x / element.offsetWidth); | ||
const y = clamp(relativePoint.y / element.offsetHeight); | ||
return { | ||
@@ -187,3 +187,3 @@ x, | ||
if (orientation === "horizontal" && dir === "rtl") | ||
newX = 100 - newX; | ||
newX = 1 - newX; | ||
return orientation === "horizontal" ? newX : y; | ||
@@ -190,0 +190,0 @@ } |
@@ -68,4 +68,4 @@ "use strict"; | ||
const relativePoint = getRelativePointValue(absolutePoint, element); | ||
const x = clamp(relativePoint.x / element.offsetWidth) * 100; | ||
const y = clamp(relativePoint.y / element.offsetHeight) * 100; | ||
const x = clamp(relativePoint.x / element.offsetWidth); | ||
const y = clamp(relativePoint.y / element.offsetHeight); | ||
return { | ||
@@ -78,3 +78,3 @@ x, | ||
if (orientation === "horizontal" && dir === "rtl") | ||
newX = 100 - newX; | ||
newX = 1 - newX; | ||
return orientation === "horizontal" ? newX : y; | ||
@@ -81,0 +81,0 @@ } |
{ | ||
"name": "@zag-js/dom-event", | ||
"version": "0.0.0-dev-20230409191656", | ||
"version": "0.0.0-dev-20230414151834", | ||
"description": "", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/types": "0.0.0-dev-20230409191656", | ||
"@zag-js/types": "0.5.0", | ||
"@zag-js/text-selection": "0.0.1" | ||
@@ -30,0 +30,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
47326
+ Added@zag-js/types@0.5.0(transitive)
- Removed@zag-js/types@0.0.0-dev-20230409191656(transitive)
Updated@zag-js/types@0.5.0