@gidw/image-comparison-slider
Advanced tools
Comparing version 0.0.1 to 1.0.1
@@ -5,6 +5,6 @@ 'use strict';var f='undefined'!==typeof self?self:this; | ||
a.before),'string'===typeof a.after&&(this.u=a.after));this.N()};b.prototype.N=function(){this.l.src=this.G;this.m.src=this.u;this.C()};b.prototype.C=function(){var a=100*this.A;this.f.style.width=a+'%';this.b.style.left=a+'%'};b.prototype.M=function(a){if(void 0===this.g&&a.changedTouches&&1===a.changedTouches.length){var b=a.changedTouches[0];this.g=b.identifier;this.T();this.B(a,b)}};b.prototype.K=function(a){this.S();this.B(a)};b.prototype.L=function(a){var b;'number'===typeof this.g?(b=h(a,this.g))&& | ||
this.v(a,b):this.v(a)};b.prototype.J=function(a){'number'===typeof this.g?a.changedTouches?(a=h(a,this.g))&&this.o():console.warn('No end for touch event'):this.o()};b.prototype.B=function(a,b){a.stopImmediatePropagation();a.preventDefault();var d=window.scrollX;var c=this.c.getBoundingClientRect();this.s=c.width;this.j=c.left+d;this.V=this.j+this.s;this.w(a,b)};b.prototype.v=function(a,b){a.stopImmediatePropagation();a.preventDefault();this.w(a,b)};b.prototype.o=function(){this.g=void 0;this.P(); | ||
this.O()};b.prototype.w=function(a,b){a=b?b.pageX:a.pageX;this.A=a>this.V?1:a<this.j?0:(a-this.j)/this.s;this.C()};b.prototype.T=function(){window.addEventListener('touchend',this.h,e);window.addEventListener('touchcancel',this.h,e);window.addEventListener('touchmove',this.i,c)};b.prototype.P=function(){window.removeEventListener('touchmove',this.i,c);window.removeEventListener('touchcancel',this.h,e);window.removeEventListener('touchend',this.h,e)};b.prototype.S=function(){window.addEventListener('mouseup', | ||
this.h,e);window.addEventListener('mousemove',this.i,c)};b.prototype.O=function(){window.removeEventListener('mousemove',this.i,c);window.removeEventListener('mouseup',this.h,e)};b.prototype.U=function(){this.b.addEventListener('touchstart',this.F,c);this.b.addEventListener('mousedown',this.D,c)};b.prototype.R=function(){this.b.removeEventListener('touchstart',this.F,c);this.b.removeEventListener('mousedown',this.D,c)};b.prototype.H=function(){if(this.a&&!this.a.contains(this.c)&&!this.a.contains(this.f)&& | ||
!this.a.contains(this.b)){var a=document.createDocumentFragment();a.appendChild(this.c);a.appendChild(this.f);a.appendChild(this.b);this.a.appendChild(a)}};b.prototype.I=function(){this.a&&(this.a.contains(this.c)&&this.a.removeChild(this.c),this.a.contains(this.f)&&this.a.removeChild(this.f),this.a.contains(this.b)&&this.a.removeChild(this.b))};b.prototype.destroy=function(){this.o();this.R();this.I();this.a=null};return b} | ||
this.v(a,b):this.v(a)};b.prototype.J=function(a){'number'===typeof this.g?a.changedTouches?(a=h(a,this.g))&&this.o():console.warn('No end for touch event'):this.o()};b.prototype.B=function(a,b){a.stopImmediatePropagation();a.preventDefault();this.b.classList.add('gicsh-a');var d=window.scrollX;var c=this.c.getBoundingClientRect();this.s=c.width;this.j=c.left+d;this.V=this.j+this.s;this.w(a,b)};b.prototype.v=function(a,b){a.stopImmediatePropagation();a.preventDefault();this.w(a,b)};b.prototype.o=function(){this.g= | ||
void 0;this.P();this.O();this.b.classList.remove('gicsh-a')};b.prototype.w=function(a,b){a=b?b.pageX:a.pageX;this.A=a>this.V?1:a<this.j?0:(a-this.j)/this.s;this.C()};b.prototype.T=function(){window.addEventListener('touchend',this.h,e);window.addEventListener('touchcancel',this.h,e);window.addEventListener('touchmove',this.i,c)};b.prototype.P=function(){window.removeEventListener('touchmove',this.i,c);window.removeEventListener('touchcancel',this.h,e);window.removeEventListener('touchend',this.h, | ||
e)};b.prototype.S=function(){window.addEventListener('mouseup',this.h,e);window.addEventListener('mousemove',this.i,c)};b.prototype.O=function(){window.removeEventListener('mousemove',this.i,c);window.removeEventListener('mouseup',this.h,e)};b.prototype.U=function(){this.b.addEventListener('touchstart',this.F,c);this.b.addEventListener('mousedown',this.D,c)};b.prototype.R=function(){this.b.removeEventListener('touchstart',this.F,c);this.b.removeEventListener('mousedown',this.D,c)};b.prototype.H=function(){if(this.a&& | ||
!this.a.contains(this.c)&&!this.a.contains(this.f)&&!this.a.contains(this.b)){var a=document.createDocumentFragment();a.appendChild(this.c);a.appendChild(this.f);a.appendChild(this.b);this.a.appendChild(a)}};b.prototype.I=function(){this.a&&(this.a.contains(this.c)&&this.a.removeChild(this.c),this.a.contains(this.f)&&this.a.removeChild(this.f),this.a.contains(this.b)&&this.a.removeChild(this.b))};b.prototype.destroy=function(){this.o();this.R();this.I();this.a=null};return b} | ||
'function'===typeof define&&define.amd?define([],g):'object'===typeof module&&module.exports?module.exports=g():(f.gidw||(f.gidw={}),f.gidw.ImageComparisonSlider=g()); |
{ | ||
"name": "@gidw/image-comparison-slider", | ||
"version": "0.0.1", | ||
"version": "1.0.1", | ||
"description": "Before/After image slider", | ||
@@ -5,0 +5,0 @@ "author": "Gilles De Waele", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6439
22
1