Improved pull to refresh on higher dpis.

This commit is contained in:
MattMo 2022-06-01 08:40:24 -07:00
parent 133b888764
commit 3b497beb96

View File

@ -2414,7 +2414,7 @@ class list extends IgniteTemplate {
} else { } else {
var diff = Math.max(touch.clientY - this.refreshTouchStartY, 0) / 2; var diff = Math.max(touch.clientY - this.refreshTouchStartY, 0) / 2;
if (diff < 75) { if (diff < (40 * window.devicePixelRatio)) {
if (this.refreshPlaceholderElement instanceof IgniteTemplate) { if (this.refreshPlaceholderElement instanceof IgniteTemplate) {
this.refreshPlaceholderElement.element.style.setProperty("min-height", `${diff}px`); this.refreshPlaceholderElement.element.style.setProperty("min-height", `${diff}px`);
this.refreshPlaceholderElement.element.style.setProperty("height", `${diff}px`); this.refreshPlaceholderElement.element.style.setProperty("height", `${diff}px`);