Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
auto-code-ui.static.js.viewer.viewer.min.js Maven / Gradle / Ivy
/*!
* Viewer.js v1.3.1
* https://fengyuanchen.github.io/viewerjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-09T07:48:29.436Z
*/
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.Viewer=i()}(this,function(){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,i){for(var e=0;e ")}),i.innerHTML=h.join(""),this.items=i.getElementsByTagName("li"),nt(this.items,function(i){var t=i.firstElementChild;mt(t,"filled",!0),r.loading&&rt(i,v),vt(t,Y,function(t){r.loading&&ht(i,v),a.loadImage(t)},{once:!0})}),r.transition&&vt(t,V,function(){rt(i,E)},{once:!0})},renderList:function(t){var i=t||this.index,e=this.items[i].offsetWidth||30,n=e+1;at(this.list,st({width:n*this.length},wt({translateX:(this.viewerData.width-e)/2-n*i})))},resetList:function(){var t=this.list;t.innerHTML="",ht(t,E),at(t,wt({translateX:0}))},initImage:function(r){var t,h=this,l=this.options,i=this.image,e=this.viewerData,n=this.footer.offsetHeight,c=e.width,d=Math.max(e.height-n,n),u=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=yt(i,function(t,i){var e=t/i,n=c,s=d;h.imageInitializing=!1,c=this.length||this.viewed&&t===this.index)return this;this.viewing&&this.viewing.abort();var i=this.element,n=this.options,s=this.title,o=this.canvas,a=this.items[t],r=a.querySelector("img"),h=ut(r,"originalUrl"),l=r.getAttribute("alt"),c=document.createElement("img");if(c.src=h,c.alt=l,et(n.view)&&vt(i,j,n.view,{once:!0}),!1===pt(i,j,{originalImage:this.images[t],index:t,image:c})||!this.isShown||this.hiding||this.played)return this;this.image=c,ht(this.items[this.index],m),rt(a,m),this.viewed=!1,this.index=t,this.imageData={},rt(c,z),n.loading&&rt(o,v),o.innerHTML="",o.appendChild(c),this.renderList(),s.innerHTML="";var d,u=function(){var t=e.imageData,i=Array.isArray(n.title)?n.title[1]:n.title;s.innerHTML=et(i)?i.call(e,c,t):"".concat(l," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")")};return vt(i,V,u,{once:!0}),this.viewing={abort:function(){gt(i,V,u),c.complete?this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort():(gt(c,Y,d),this.timeout&&clearTimeout(this.timeout))}},c.complete?this.load():(vt(c,Y,d=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){ht(c,z),e.timeout=!1},1e3)),this},prev:function(){var t=0Math.abs(r)&&(this.pointers={},1