@rdlabo/ionic-theme-ios26 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gestures/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAUjF,eAAO,MAAM,cAAc,GACzB,eAAe,WAAW,EAC1B,eAAe,MAAM,EACrB,mBAAmB,MAAM,EACzB,QAAQ,YAAY,KACnB,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gestures/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAUjF,eAAO,MAAM,cAAc,GACzB,eAAe,WAAW,EAC1B,eAAe,MAAM,EACrB,mBAAmB,MAAM,EACzB,QAAQ,YAAY,KACnB,gBAAgB,GAAG,SAyLrB,CAAC"}
|
package/dist/gestures/index.js
CHANGED
|
@@ -110,7 +110,10 @@ export const registerEffect = (targetElement, effectTagName, selectedClassName,
|
|
|
110
110
|
maxVelocity = 0;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const currentX = detail.currentX;
|
|
114
|
+
const previousY = targetElement.getBoundingClientRect().top + targetElement.getBoundingClientRect().height / 2;
|
|
115
|
+
const nextEl = targetElement.getRootNode().elementFromPoint(currentX, previousY);
|
|
116
|
+
const latestTouchedElement = nextEl?.closest(effectTagName) || undefined;
|
|
114
117
|
if (latestTouchedElement && currentTouchedElement !== latestTouchedElement) {
|
|
115
118
|
currentTouchedElement = latestTouchedElement;
|
|
116
119
|
changeSelectedElement(targetElement, currentTouchedElement, effectTagName, selectedClassName);
|
package/package.json
CHANGED
package/src/gestures/index.ts
CHANGED
|
@@ -134,7 +134,11 @@ export const registerEffect = (
|
|
|
134
134
|
maxVelocity = 0;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
|
|
138
|
+
const currentX = detail.currentX;
|
|
139
|
+
const previousY = targetElement.getBoundingClientRect().top + targetElement.getBoundingClientRect().height / 2;
|
|
140
|
+
const nextEl = (targetElement.getRootNode() as Document | ShadowRoot).elementFromPoint(currentX, previousY);
|
|
141
|
+
const latestTouchedElement = (nextEl?.closest(effectTagName) as HTMLElement) || undefined;
|
|
138
142
|
|
|
139
143
|
if (latestTouchedElement && currentTouchedElement !== latestTouchedElement) {
|
|
140
144
|
currentTouchedElement = latestTouchedElement;
|