Comparing version 6.1.1 to 6.1.2
/*! | ||
* zoom.ts v6.1.1 | ||
* zoom.ts v6.1.2 | ||
* https://www.michael-bull.com/projects/zoom.ts | ||
@@ -8,2 +8,2 @@ * | ||
*/ | ||
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="dist/",e(e.s=12)}([function(t,e,n){"use strict";function i(t){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){return t()}):t()}function o(){return(document.documentElement||document.body).clientWidth}function r(){return(document.documentElement||document.body).clientHeight}function s(){return void 0===window.pageYOffset?(document.documentElement||document.body).scrollTop:window.pageYOffset}Object.defineProperty(e,"__esModule",{value:!0}),e.ready=i,e.viewportWidth=o,e.viewportHeight=r,e.scrollY=s},function(t,e,n){"use strict";function i(t){t.offsetHeight}function o(t,e){var i=n(10);return i?"translate3d("+t+"px, "+e+"px, 0)":"translate("+t+"px, "+e+"px)"}function r(t){var e=t.getBoundingClientRect();return new u.Dimension(e.left,e.top,t.clientWidth,t.clientHeight)}function s(t,e){var i=n(9);if(i)for(var o=0,r=f;o<r.length;o++){var s=r[o];t.addEventListener(s,e)}else e(new Event(f[0]))}function a(t,e){for(var n=0,i=f;n<i.length;n++){var o=i[n];t.removeEventListener(o,e)}}function c(t){var e=t.parentElement;if(null!==e){var n=e.getAttribute("data-src");if(null!==n)return n}return t.src}function l(t,e){var n=Number(t.getAttribute("data-width")||1/0),i=Number(t.getAttribute("data-height")||1/0),o=Math.min(d.viewportWidth(),n)/e.width,r=Math.min(d.viewportHeight(),i)/e.height;return Math.min(o,r)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),d=n(0),f=["transitionend","webkitTransitionEnd","oTransitionEnd","MSTransitionEnd"];e.repaint=i,e.translate=o,e.dimensions=r,e.addTransitionEndListener=s,e.removeTransitionEndListener=a,e.srcAttribute=c,e.fillViewportScale=l},function(t,e){for(var n,i=["webkitTransform","MozTransform","msTransform","OTransform","transform"],o=document.createElement("p"),r=0;r<i.length;r++)if(n=i[r],null!=o.style[n]){t.exports=n;break}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=n(6),r=n(2),s=function(){function t(){var t=this;this.overlay=document.createElement("div"),this.clickListener=function(e){var n=e.target;n instanceof HTMLImageElement&&n.classList.contains("zoom__element")&&(e.preventDefault(),!r||e.metaKey||e.ctrlKey?window.open(i.srcAttribute(n),"_blank"):t.zoom(n))}}return t.prototype.start=function(){this.overlay.classList.add("zoom__overlay"),document.body.addEventListener("click",this.clickListener)},t.prototype.zoom=function(t){var e=t.parentElement;if(null!==e){var n=e.classList;if(n.contains("zoom")&&!n.contains("zoom--active")){var i=new o.Zoom(this.overlay,e,t);i.show()}}},t}();e.Listener=s},function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]);n(11)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n,i){this.left=t,this.top=e,this.width=n,this.height=i}return t}();e.Dimension=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=n(0),r=27,s=50,a=function(){function t(t,e,n){var a=this;this.transforming=!1,this.finishedExpandingContainer=function(){i.removeTransitionEndListener(a.container,a.finishedExpandingContainer),a.container.style.transition="initial",a.transforming=!1,a.scaleContainer(),i.repaint(a.container),a.container.style.transition=""},this.finishedCollapsingContainer=function(){i.removeTransitionEndListener(a.container,a.finishedCollapsingContainer),document.body.removeChild(a.overlay),a.container.classList.remove("zoom--active"),a.element.classList.remove("zoom__element--active"),a.removeClone()},this.finishedLoadingClone=function(){a.container.appendChild(a.clone),a.element.style.opacity="0"},this.resizeListener=function(){a.scaleContainer()},this.scrollListener=function(){Math.abs(a.initialScrollY-o.scrollY())>s&&a.hide()},this.clickListener=function(){a.hide()},this.keyboardListener=function(t){t.keyCode===r&&a.hide()},this.overlay=t,this.container=e,this.element=n,this.original=i.dimensions(n)}return t.prototype.show=function(){this.showOverlay(),this.expandContainer(),this.addClone(),this.addEventListeners()},t.prototype.hide=function(){this.removeEventListeners(),this.hideOverlay(),this.collapseContainer()},t.prototype.scaleContainer=function(){var t=i.fillViewportScale(this.container,this.original),e=this.original.width*t,n=this.original.height*t,r=(o.viewportWidth()-e)/2,s=(o.viewportHeight()-n)/2,a=this.original.left+(this.original.width-e)/2,c=this.original.top+(this.original.height-n)/2;if(this.transforming){var l=(r-a)/t,u=(s-c)/t;this.container.style.transform="scale("+t+") "+i.translate(l,u)}else this.container.style.transform="",this.container.style.left=r-this.original.left+"px",this.container.style.top=s-this.original.top+"px",this.container.style.width=e+"px",this.container.style.maxWidth=e+"px",this.container.style.height=n+"px"},t.prototype.showOverlay=function(){document.body.appendChild(this.overlay),i.repaint(this.overlay),this.overlay.classList.add("zoom__overlay--visible")},t.prototype.hideOverlay=function(){this.overlay.classList.remove("zoom__overlay--visible"),i.removeTransitionEndListener(this.container,this.finishedExpandingContainer)},t.prototype.expandContainer=function(){this.container.classList.add("zoom--active"),this.element.classList.add("zoom__element--active"),i.addTransitionEndListener(this.container,this.finishedExpandingContainer),this.transforming=!0,this.scaleContainer()},t.prototype.collapseContainer=function(){i.addTransitionEndListener(this.container,this.finishedCollapsingContainer),this.container.style.transition="initial",this.transforming=!0,this.scaleContainer(),i.repaint(this.container),this.container.style.transition="",this.container.style.transform="",this.container.style.left="",this.container.style.top="",this.container.style.width="",this.container.style.maxWidth="",this.container.style.height=""},t.prototype.addClone=function(){this.clone=document.createElement("img"),this.clone.classList.add("zoom__clone"),this.clone.addEventListener("load",this.finishedLoadingClone),this.clone.src=i.srcAttribute(this.element)},t.prototype.removeClone=function(){this.clone.removeEventListener("load",this.finishedLoadingClone),this.element.style.opacity="",this.container.contains(this.clone)&&this.container.removeChild(this.clone)},t.prototype.addEventListeners=function(){this.initialScrollY=o.scrollY(),window.addEventListener("resize",this.resizeListener),window.addEventListener("scroll",this.scrollListener),document.addEventListener("keyup",this.keyboardListener),this.container.addEventListener("click",this.clickListener)},t.prototype.removeEventListeners=function(){window.removeEventListener("resize",this.resizeListener),window.removeEventListener("scroll",this.scrollListener),document.removeEventListener("keyup",this.keyboardListener),this.container.removeEventListener("click",this.clickListener)},t}();e.Zoom=a},function(t,e,n){e=t.exports=n(8)(),e.push([t.i,'.zoom{position:relative;line-height:0;text-align:center;-webkit-transition:-webkit-transform .3s cubic-bezier(.2,0,.2,1);transition:-webkit-transform .3s cubic-bezier(.2,0,.2,1);transition:transform .3s cubic-bezier(.2,0,.2,1);transition:transform .3s cubic-bezier(.2,0,.2,1),-webkit-transform .3s cubic-bezier(.2,0,.2,1);will-change:transition}.zoom--active{z-index:2}.zoom__element{cursor:pointer;cursor:-moz-zoom-in;cursor:-webkit-zoom-in}.zoom__element--active{width:100%}.zoom__clone{position:absolute;cursor:pointer;cursor:-moz-zoom-out;cursor:-webkit-zoom-out}.zoom__clone,.zoom__overlay{top:0;right:0;bottom:0;left:0}.zoom__overlay{position:fixed;z-index:1;background:#fff;opacity:0;filter:"alpha(opacity=0)";-webkit-transition:opacity .3s;transition:opacity .3s;will-change:opacity,filter}.zoom__overlay--visible{opacity:1;filter:"alpha(opacity=100)"}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(t,e){function n(t){if(!i)return!1;if(!t)return null!=i;var e=getComputedStyle(t)[i];return""!==e&&0!==parseFloat(e)}for(var i,o=["transitionDuration","MozTransitionDuration","webkitTransitionDuration"];o.length;){var r=o.shift();r in document.body.style&&(i=r)}t.exports=n},function(t,e,n){var i=n(2);if(i&&window.getComputedStyle){var o={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"},r=document.createElement("div");r.style[i]="translate3d(1px,1px,1px)",document.body.insertBefore(r,null);var s=getComputedStyle(r).getPropertyValue(o[i]);document.body.removeChild(r),t.exports=null!=s&&s.length&&"none"!=s}else t.exports=!1},function(t,e){function n(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=f[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(c(i.parts[r],e))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(c(i.parts[r],e));f[i.id]={id:i.id,refs:1,parts:s}}}}function i(t){for(var e=[],n={},i=0;i<t.length;i++){var o=t[i],r=o[0],s=o[1],a=o[2],c=o[3],l={css:s,media:a,sourceMap:c};n[r]?n[r].parts.push(l):e.push(n[r]={id:r,parts:[l]})}return e}function o(t,e){var n=m(),i=g[g.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),g.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function r(t){t.parentNode.removeChild(t);var e=g.indexOf(t);e>=0&&g.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function a(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function c(t,e){var n,i,o;if(e.singleton){var c=y++;n=v||(v=s(e)),i=l.bind(null,n,c,!1),o=l.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=a(e),i=d.bind(null,n),o=function(){r(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),i=u.bind(null,n),o=function(){r(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function l(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=b(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function u(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e){var n=e.css,i=e.sourceMap;i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var f={},h=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,y=0,g=[];t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var o=i(t);return n(o,e),function(t){for(var r=[],s=0;s<o.length;s++){var a=o[s],c=f[a.id];c.refs--,r.push(c)}if(t){var l=i(t);n(l,e)}for(var s=0;s<r.length;s++){var c=r[s];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete f[c.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(4);var i=n(0),o=n(3),r=new o.Listener;i.ready(function(){return r.start()})}]); | ||
!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=12)}([function(e,t,n){"use strict";function i(e){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){return e()}):e()}function o(){return(document.documentElement||document.body).clientWidth}function r(){return(document.documentElement||document.body).clientHeight}function s(){return void 0===window.pageYOffset?(document.documentElement||document.body).scrollTop:window.pageYOffset}Object.defineProperty(t,"__esModule",{value:!0}),t.ready=i,t.viewportWidth=o,t.viewportHeight=r,t.scrollY=s},function(e,t,n){"use strict";function i(e){e.offsetHeight}function o(e,t){var i=n(10);return i?"translate3d("+e+"px, "+t+"px, 0)":"translate("+e+"px, "+t+"px)"}function r(e){var t=e.getBoundingClientRect();return new u.Dimension(t.left,t.top,e.clientWidth,e.clientHeight)}function s(e,t){var i=n(9);if(i)for(var o=0,r=f;o<r.length;o++){var s=r[o];e.addEventListener(s,t)}else t(new Event(f[0]))}function a(e,t){for(var n=0,i=f;n<i.length;n++){var o=i[n];e.removeEventListener(o,t)}}function l(e){var t=e.parentElement;if(null!==t){var n=t.getAttribute("data-src");if(null!==n)return n}return e.src}function c(e,t){var n=Number(e.getAttribute("data-width")||1/0),i=Number(e.getAttribute("data-height")||1/0),o=Math.min(d.viewportWidth(),n)/t.width,r=Math.min(d.viewportHeight(),i)/t.height;return Math.min(o,r)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(5),d=n(0),f=["transitionend","webkitTransitionEnd","oTransitionEnd","MSTransitionEnd"];t.repaint=i,t.translate=o,t.dimensions=r,t.addTransitionEndListener=s,t.removeTransitionEndListener=a,t.srcAttribute=l,t.fillViewportScale=c},function(e,t){for(var n,i=["webkitTransform","MozTransform","msTransform","OTransform","transform"],o=document.createElement("p"),r=0;r<i.length;r++)if(n=i[r],null!=o.style[n]){e.exports=n;break}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(6),r=n(2),s=function(){function e(){var e=this;this.overlay=document.createElement("div"),this.clickListener=function(t){var n=t.target;n instanceof HTMLImageElement&&n.classList.contains("zoom__element")&&(t.preventDefault(),!r||t.metaKey||t.ctrlKey?window.open(i.srcAttribute(n),"_blank"):e.zoom(n))}}return e.prototype.start=function(){this.overlay.classList.add("zoom__overlay"),document.body.addEventListener("click",this.clickListener)},e.prototype.zoom=function(e){var t=e.parentElement;if(null!==t){var n=t.classList;if(n.contains("zoom")&&!n.contains("zoom--active")){var i=new o.Zoom(this.overlay,t,e);i.show()}}},e}();t.Listener=s},function(e,t,n){var i=n(7);"string"==typeof i&&(i=[[e.i,i,""]]);n(11)(i,{});i.locals&&(e.exports=i.locals)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,i){this.left=e,this.top=t,this.width=n,this.height=i}return e}();t.Dimension=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=27,s=50,a=function(){function e(e,t,n){var a=this;this.transforming=!1,this.finishedExpandingContainer=function(){i.removeTransitionEndListener(a.container,a.finishedExpandingContainer),a.container.style.transition="initial",a.transforming=!1,a.scaleContainer(),i.repaint(a.container),a.container.style.transition=""},this.finishedCollapsingContainer=function(){i.removeTransitionEndListener(a.container,a.finishedCollapsingContainer),document.body.removeChild(a.overlay),a.container.classList.remove("zoom--active"),a.element.classList.remove("zoom__element--active"),a.removeClone()},this.finishedLoadingClone=function(){a.container.appendChild(a.clone),a.element.style.opacity="0"},this.resizeListener=function(){a.scaleContainer()},this.scrollListener=function(){Math.abs(a.initialScrollY-o.scrollY())>s&&a.hide()},this.clickListener=function(){a.hide()},this.keyboardListener=function(e){e.keyCode===r&&a.hide()},this.overlay=e,this.container=t,this.element=n,this.original=i.dimensions(n)}return e.prototype.show=function(){this.showOverlay(),this.expandContainer(),this.addClone(),this.addEventListeners()},e.prototype.hide=function(){this.removeEventListeners(),this.hideOverlay(),this.collapseContainer()},e.prototype.scaleContainer=function(){var e=i.fillViewportScale(this.container,this.original),t=this.original.width*e,n=this.original.height*e,r=(o.viewportWidth()-t)/2,s=(o.viewportHeight()-n)/2,a=this.original.left+(this.original.width-t)/2,l=this.original.top+(this.original.height-n)/2;if(this.transforming){var c=(r-a)/e,u=(s-l)/e;this.container.style.transform="scale("+e+") "+i.translate(c,u)}else this.container.style.transform="",this.clone.style.left=r-this.original.left+"px",this.clone.style.top=s-this.original.top+"px",this.clone.style.width=t+"px",this.clone.style.maxWidth=t+"px",this.clone.style.height=n+"px"},e.prototype.showOverlay=function(){document.body.appendChild(this.overlay),i.repaint(this.overlay),this.overlay.classList.add("zoom__overlay--visible")},e.prototype.hideOverlay=function(){this.overlay.classList.remove("zoom__overlay--visible"),i.removeTransitionEndListener(this.container,this.finishedExpandingContainer)},e.prototype.expandContainer=function(){this.container.classList.add("zoom--active"),this.element.classList.add("zoom__element--active"),i.addTransitionEndListener(this.container,this.finishedExpandingContainer),this.transforming=!0,this.scaleContainer()},e.prototype.collapseContainer=function(){i.addTransitionEndListener(this.container,this.finishedCollapsingContainer),this.container.style.transition="initial",this.transforming=!0,this.scaleContainer(),i.repaint(this.container),this.container.style.transition="",this.container.style.transform="",this.clone.style.left="",this.clone.style.top="",this.clone.style.width="",this.clone.style.maxWidth="",this.clone.style.height=""},e.prototype.addClone=function(){this.clone=document.createElement("img"),this.clone.classList.add("zoom__clone"),this.clone.addEventListener("load",this.finishedLoadingClone),this.clone.src=i.srcAttribute(this.element)},e.prototype.removeClone=function(){this.clone.removeEventListener("load",this.finishedLoadingClone),this.element.style.opacity="",this.container.contains(this.clone)&&this.container.removeChild(this.clone)},e.prototype.addEventListeners=function(){this.initialScrollY=o.scrollY(),window.addEventListener("resize",this.resizeListener),window.addEventListener("scroll",this.scrollListener),document.addEventListener("keyup",this.keyboardListener),this.container.addEventListener("click",this.clickListener)},e.prototype.removeEventListeners=function(){window.removeEventListener("resize",this.resizeListener),window.removeEventListener("scroll",this.scrollListener),document.removeEventListener("keyup",this.keyboardListener),this.container.removeEventListener("click",this.clickListener)},e}();t.Zoom=a},function(e,t,n){t=e.exports=n(8)(),t.push([e.i,'.zoom{position:relative;line-height:0;text-align:center;-webkit-transition:-webkit-transform .3s cubic-bezier(.2,0,.2,1);transition:-webkit-transform .3s cubic-bezier(.2,0,.2,1);transition:transform .3s cubic-bezier(.2,0,.2,1);transition:transform .3s cubic-bezier(.2,0,.2,1),-webkit-transform .3s cubic-bezier(.2,0,.2,1);will-change:transition}.zoom--active{z-index:2}.zoom__element{cursor:pointer;cursor:-moz-zoom-in;cursor:-webkit-zoom-in}.zoom__element--active{width:100%}.zoom__clone{position:absolute;cursor:pointer;cursor:-moz-zoom-out;cursor:-webkit-zoom-out}.zoom__clone,.zoom__overlay{top:0;right:0;bottom:0;left:0}.zoom__overlay{position:fixed;z-index:1;background:#fff;opacity:0;filter:"alpha(opacity=0)";-webkit-transition:opacity .3s;transition:opacity .3s;will-change:opacity,filter}.zoom__overlay--visible{opacity:1;filter:"alpha(opacity=100)"}',""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(e,t){function n(e){if(!i)return!1;if(!e)return null!=i;var t=getComputedStyle(e)[i];return""!==t&&0!==parseFloat(t)}for(var i,o=["transitionDuration","MozTransitionDuration","webkitTransitionDuration"];o.length;){var r=o.shift();r in document.body.style&&(i=r)}e.exports=n},function(e,t,n){var i=n(2);if(i&&window.getComputedStyle){var o={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"},r=document.createElement("div");r.style[i]="translate3d(1px,1px,1px)",document.body.insertBefore(r,null);var s=getComputedStyle(r).getPropertyValue(o[i]);document.body.removeChild(r),e.exports=null!=s&&s.length&&"none"!=s}else e.exports=!1},function(e,t){function n(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=f[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(l(i.parts[r],t))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(l(i.parts[r],t));f[i.id]={id:i.id,refs:1,parts:s}}}}function i(e){for(var t=[],n={},i=0;i<e.length;i++){var o=e[i],r=o[0],s=o[1],a=o[2],l=o[3],c={css:s,media:a,sourceMap:l};n[r]?n[r].parts.push(c):t.push(n[r]={id:r,parts:[c]})}return t}function o(e,t){var n=m(),i=g[g.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function r(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function a(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var n,i,o;if(t.singleton){var l=y++;n=v||(v=s(t)),i=c.bind(null,n,l,!1),o=c.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=a(t),i=d.bind(null,n),o=function(){r(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),i=u.bind(null,n),o=function(){r(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}function c(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function u(e,t){var n=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,i=t.sourceMap;i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([n],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var f={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},p=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,y=0,g=[];e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},"undefined"==typeof t.singleton&&(t.singleton=p()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var o=i(e);return n(o,t),function(e){for(var r=[],s=0;s<o.length;s++){var a=o[s],l=f[a.id];l.refs--,r.push(l)}if(e){var c=i(e);n(c,t)}for(var s=0;s<r.length;s++){var l=r[s];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete f[l.id]}}}};var b=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(4);var i=n(0),o=n(3),r=new o.Listener;i.ready(function(){return r.start()})}]); |
@@ -68,7 +68,8 @@ import { Dimension } from './Dimension'; | ||
this.container.style.transform = ''; | ||
this.container.style.left = `${centreX - this.original.left}px`; | ||
this.container.style.top = `${centreY - this.original.top}px`; | ||
this.container.style.width = `${scaledWidth}px`; | ||
this.container.style.maxWidth = `${scaledWidth}px`; | ||
this.container.style.height = `${scaledHeight}px`; | ||
this.clone.style.left = `${centreX - this.original.left}px`; | ||
this.clone.style.top = `${centreY - this.original.top}px`; | ||
this.clone.style.width = `${scaledWidth}px`; | ||
this.clone.style.maxWidth = `${scaledWidth}px`; | ||
this.clone.style.height = `${scaledHeight}px`; | ||
} | ||
@@ -114,9 +115,9 @@ } | ||
this.container.style.transition = ''; | ||
this.container.style.transform = ''; | ||
this.container.style.transform = ''; | ||
this.container.style.left = ''; | ||
this.container.style.top = ''; | ||
this.container.style.width = ''; | ||
this.container.style.maxWidth = ''; | ||
this.container.style.height = ''; | ||
this.clone.style.left = ''; | ||
this.clone.style.top = ''; | ||
this.clone.style.width = ''; | ||
this.clone.style.maxWidth = ''; | ||
this.clone.style.height = ''; | ||
} | ||
@@ -123,0 +124,0 @@ |
{ | ||
"name": "zoom.ts", | ||
"version": "6.1.1", | ||
"version": "6.1.2", | ||
"description": "A lightweight TypeScript library for image zooming, as seen on Medium.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
2337021