@tindtechnologies/universalviewer
Version:
The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
2 lines (1 loc) • 1.48 kB
JavaScript
import{a}from"./chunk-V63MGAWK.js";import{g as r}from"./chunk-4DAZ7WDM.js";import{a as i,e,f as n,i as s,o as c}from"./chunk-VNJCZCB4.js";import"./chunk-L67DAW3A.js";var b=function(){function o(t){i(this,t),this.lastClick=-1e4,this.blocker=a.createBlocker({disableScroll:!0}),this.visible=!0,this.tappable=!0,this.stopPropagation=!0,this.ionBackdropTap=s(this,"ionBackdropTap",7)}return o.prototype.connectedCallback=function(){this.stopPropagation&&this.blocker.block()},o.prototype.disconnectedCallback=function(){this.blocker.unblock()},o.prototype.onTouchStart=function(t){this.lastClick=r(t),this.emitTap(t)},o.prototype.onMouseDown=function(t){this.lastClick<r(t)-2500&&this.emitTap(t)},o.prototype.emitTap=function(t){this.stopPropagation&&(t.preventDefault(),t.stopPropagation()),this.tappable&&this.ionBackdropTap.emit()},o.prototype.render=function(){var t,p=c(this);return e(n,{tabindex:"-1",class:(t={},t[p]=!0,t["backdrop-hide"]=!this.visible,t["backdrop-no-tappable"]=!this.tappable,t)})},Object.defineProperty(o,"style",{get:function(){return":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color,#000)}"},enumerable:!0,configurable:!0}),o}();export{b as ion_backdrop};