Commit 1a9ab687 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸
Browse files

test

parent 11ed2389
.player-control {
background: #fafafa;
}
.player {
padding: 10px;
background: #fafafa;
color: #444;
border: 1px solid #ddd;
border-radius: 4px;
}
.player-horizontal-padding {
padding-bottom: 0;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
}
.player-button {
width: 34px;
}
.player-play-reverse {
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
position: relative;
bottom: 1px;
}
.player-play-progress {
font-size: 12px;
position: relative;
left: -6px;
}
.player-disable {
pointer-events: none;
opacity: 0.4;
}
.player-img-icon {
width: 19px;
height: 19px;
max-width: none;
position: relative;
left: -7px;
opacity: 0.8;
}
.player-horizontal {
display: inline-block;
padding-right: 5px;
}
.player-horizontal .irs {
height: 25px;
}
.player-horizontal-control {
min-width: 130px;
}
.player-time {
height: 24px;
}
.player-horizontal-timeselect {
min-width: 200px;
}
.player-horizontal-timeslider {
min-width: 200px;
position: relative;
bottom: 10px;
}
.player-calendar {
display: inline-block;
position: relative;
top: -3px;
float: right;
}
.player .irs-slider {
top: 3px;
}
.player .irs-line {
top: 10px;
}
.player .irs-bar-edge {
top: 10px;
}
.player .irs-bar {
top: 10px;
}
.player .irs-with-grid {
height: 40px;
}
This diff is collapsed.
{"version":3,"sources":["leaflet-player-control.js"],"names":["__extends","this","extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__","constructor","prototype","create","L","Control","Player","_super","options","_this","call","domain","lang","langdata","langData","display","transitionTime","interval","datetimeformat","datetimeformatZ","onAdd","map","self","container","DomUtil","setup","reqwest","url","method","type","success","disable","DomEvent","disableClickPropagation","onRemove","player","off","onPlayerWaiting","addLayout","timeDimension","TimeDimension","times","on","time","enable","buffer","minBufferReady","loop","evt","getSteps","playForwardIcon","classList","remove","innerHTML","Math","floor","available","playBackwardIcon","getTimeDimension","getCurrentTimeIndex","setCurrentTimeIndex","index","refresh","keepTimeIndex","allAvailableTimes","filterAvailableTimes","i","_syncedLayers","length","layer","playerTimes","getPlayerTimes","Util","union_arrays","forcePlayerTimes","validtimes","explodeTimeRange","Date","setAvailableTimes","timeIndex","update","date","moment","getCurrentTime","utc","format","min","max","startOf","subtract","add","clear","playerDiv","timeSelectDiv","timeSliderDiv","timeSliderWrapper","controlsDiv","showGrid","appendChild","$","ionRangeSlider","from","step","grid","keyboard","keyboard_step","hide_min_max","hide_from_to","force_edges","prettify","num","onChange","data","play","isPlaying","steps","stopPlay","timeSelect","value","startPlay","onFinish","setCurrentTime","valueOf","slider","updateTimeSelect","result","transitionButton","transitionSpeed","title","document","createTextNode","onclick","setTransitionTime","replaceText","timeButtonGroup","stepStart","playBackwardButton","stepBack","stepForward","playForwardButton","stepEnd","playUpdate","forward","stop","startPlayForward","startPlayBackward","start","_availableTimes","onchange","parseInt","item","newText","oldChild","newChild","replaceChild","contains","firstChild","removeChild","counter","datetime","option","textContent","u","sliderOpt","getDate"],"mappings":";;AAKA,GAAIA,WAAaC,MAAQA,KAAKD,WAAc,WACxC,GAAIE,GAAgBC,OAAOC,iBACpBC,uBAA2BC,QAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,GAAIC,KAAKD,GAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,IACzE,OAAO,UAAUF,EAAGC,GAEhB,QAASG,KAAOV,KAAKW,YAAcL,EADnCL,EAAcK,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaL,OAAOW,OAAON,IAAMG,EAAGE,UAAYL,EAAEK,UAAW,GAAIF,QAGnFI,GACJ,SAAWA,IAEP,SAAWC,GACP,GAAIC,GAAU,SAAUC,GAEpB,QAASD,GAAOE,GACZ,GAAIC,GAAQF,EAAOG,KAAKpB,KAAMkB,IAAYlB,IAyB1C,OAxBIkB,GAAQG,SACRF,EAAME,OAASH,EAAQG,QAE3BF,EAAMG,KAAO,KACTJ,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AAcF,EAAS1E,OAAO/D,EAAKJ,gBAC1C8I,EAAO1C,MAAQyC,EAAS1E,OAAO,KAAO,GACtCyE,GAAWxI,EAAKL,WAGxBX,EAAOJ,UAAU8E,OAAS,SAAUkF,GAChC,GAAI5I,GAAOhC,KACP6K,KACA7E,EAAMhE,EAAKqG,OAAOE,OAAOvC,IACzBC,EAAMjE,EAAKqG,OAAOE,OAAOtC,GACzB2E,GAAE5E,MACFA,EAAM4E,EAAE5E,KAER4E,EAAE3E,MACFA,EAAM2E,EAAE3E,KAEZ4E,EAAe,IAAI7E,EACnB6E,EAAe,IAAI5E,EACnBjE,EAAKsG,iBAAiBtC,EAAKC,GAC3BjE,EAAK+F,WAAWC,MAAQhG,EAAKqG,OAAOE,OAAOxB,KAAO,GAC9C6D,EAAEjF,OACFkF,EAAgB,KAAID,EAAEjF,KACtB3D,EAAK+F,WAAWC,MAAQ4C,EAAEjF,KAAO,IAErC3D,EAAKqG,OAAO3C,OAAOmF,IAEvB7J,EAAOJ,UAAUkK,QAAU,WACvB,MAAOlF,QAAiC,IAA1B5F,KAAKqI,OAAOE,OAAOxB,MAAajB,OAE3C9E,GACTF,EAAEC,QACJA,GAAQC,OAASA,GACRF,EAAEC,UAAYD,EAAEC,cAC9BD,IAAMA","file":"leaflet-player-control.min.js"}
\ No newline at end of file
.player,.player-control{background:#fafafa}.player{padding:10px;color:#444;border:1px solid #ddd;border-radius:4px}.player-horizontal-padding{padding-bottom:0;padding-left:5px;padding-right:5px;padding-top:5px}.player-button{width:34px}.player-play-reverse{-ms-transform:rotate(180deg);-webkit-transform:rotate(180deg);transform:rotate(180deg);position:relative;bottom:1px}.player-play-progress{font-size:12px;position:relative;left:-6px}.player-disable{pointer-events:none;opacity:.4}.player-img-icon{width:19px;height:19px;max-width:none;position:relative;left:-7px;opacity:.8}.player-horizontal{display:inline-block;padding-right:5px}.player-horizontal .irs{height:25px}.player-horizontal-control{min-width:130px}.player-time{height:24px}.player-horizontal-timeselect{min-width:200px}.player-horizontal-timeslider{min-width:200px;position:relative;bottom:10px}.player-calendar{display:inline-block;position:relative;top:-3px;float:right}.player .irs-slider{top:3px}.player .irs-bar,.player .irs-bar-edge,.player .irs-line{top:10px}.player .irs-with-grid{height:40px}
\ No newline at end of file
/*! leaflet-player-control 2017-04-26 */
var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),L;!function(a){!function(b){var c=function(b){function c(a){var c=b.call(this,a)||this;return a.domain&&(c.domain=a.domain),c.lang="en",a.lang&&(c.lang=a.lang),a.langdata&&(c.langData=a.langdata),c.display="vertical",a.display&&(c.display=a.display),c.transitionTime=500,a.transitionTime&&(c.transitionTime=a.transitionTime),c.interval=900,a.interval&&(c.interval=a.interval),c.datetimeformat="YYYY-MM-DD HH:mm",c.datetimeformatZ="YYYY-MM-DDTHH:mm:ss[Z]",c}return __extends(c,b),c.prototype.onAdd=function(b){var c=this;return this.container=a.DomUtil.create("div","player-control"),c.langData?c.setup():reqwest({url:"lang/player."+c.lang+".json",method:"get",type:"json",success:function(a){c.langData=a,c.setup()}}),c.disable(),a.DomEvent.disableClickPropagation(this.container),this.container},c.prototype.onRemove=function(a){var b=this;b.player.off("waiting",b.onPlayerWaiting,this)},c.prototype.setup=function(){var b=this;b.addLayout(),b.timeDimension=new a.TimeDimension({times:[]}),b.timeDimension.on("timeload",function(a){b.enable()}),b.player=new a.TimeDimension.Player({transitionTime:b.transitionTime,buffer:15,minBufferReady:10,loop:!0},b.timeDimension),b.player.on("waiting",b.onPlayerWaiting,this)},c.prototype.onPlayerWaiting=function(a){var b=this;b.player.getSteps()>0&&(b.playForwardIcon.classList.remove("uk-icon-pause"),b.playForwardIcon.innerHTML='<span class="player-play-progress">'+Math.floor(a.available/a.buffer*100)+"%</span>"),b.player.getSteps()<0&&(b.playBackwardIcon.classList.remove("uk-icon-pause"),b.playBackwardIcon.innerHTML='<span class="player-play-progress">'+Math.floor(a.available/a.buffer*100)+"%</span>")},c.prototype.getTimeDimension=function(){return this.timeDimension},c.prototype.getCurrentTimeIndex=function(){return this.timeDimension.getCurrentTimeIndex()},c.prototype.setCurrentTimeIndex=function(a){return this.timeDimension.setCurrentTimeIndex(a)},c.prototype.refresh=function(b){var c=this;if(c.timeDimension){for(var d=[],e=[],f=0;f<c.timeDimension._syncedLayers.length;f++){var g=c.timeDimension._syncedLayers[f],h=g.getPlayerTimes();d=a.TimeDimension.Util.union_arrays(h,d),g.forcePlayerTimes()&&(e=a.TimeDimension.Util.union_arrays(h,e))}var i=a.TimeDimension.Util.explodeTimeRange(new Date(d[0]),new Date(d[d.length-1]),"PT15M");e.length>0&&(i=a.TimeDimension.Util.explodeTimeRange(new Date(e[0]),new Date(e[e.length-1]),"PT15M")),c.timeDimension.setAvailableTimes(i,"replace"),c.timeDimension.setCurrentTimeIndex(b&&c.timeIndex||0),this.timeDimension._syncedLayers.length>0?(c.update({date:+moment(c.timeDimension.getCurrentTime()).utc().format("X"),min:+moment(i[0]).utc().format("X"),max:+moment(i[i.length-1]).utc().format("X")}),c.enable()):(c.timeIndex=c.timeDimension.getCurrentTimeIndex(),c.update({date:+moment().utc().startOf("hour").format("X"),min:+moment().utc().startOf("day").subtract(6,"hours").format("X"),max:+moment().utc().startOf("day").add(2,"days").format("X")}),c.clear())}},c.prototype.clear=function(){this.disable()},c.prototype.addLayout=function(){var b=this;b.playerDiv=a.DomUtil.create("div","player",b.container);var c=a.DomUtil.create("div",""),d=a.DomUtil.create("div",""),e=a.DomUtil.create("div",""),f=a.DomUtil.create("div",""),g=!1;"vertical"==b.display?(g=!0,b.playerDiv.classList.add("uk-margin-top"),f.classList.add("uk-margin-top"),c.classList.add("uk-width-1-1"),d.classList.add("uk-width-1-1"),f.classList.add("uk-width-1-1"),b.playerDiv.appendChild(c),b.playerDiv.appendChild(e),b.playerDiv.appendChild(f)):(b.playerDiv.classList.add("player-horizontal-padding"),e.classList.add("player-horizontal"),e.classList.add("uk-width-1-3"),e.classList.add("player-horizontal-timeslider"),c.classList.add("player-horizontal"),c.classList.add("uk-width-1-3"),c.classList.add("player-horizontal-timeselect"),f.classList.add("player-horizontal"),f.classList.add("uk-width-1-3"),f.classList.add("player-horizontal-control"),b.playerDiv.appendChild(f),b.playerDiv.appendChild(c),b.playerDiv.appendChild(e));var d=a.DomUtil.create("div","",e);$(d).ionRangeSlider({type:"single",min:+moment().utc().startOf("day").subtract(6,"hours").format("X"),max:+moment().utc().startOf("day").add(2,"days").format("X"),from:+moment().utc().startOf("hour").format("X"),step:b.interval,grid:g,keyboard:!0,keyboard_step:1,hide_min_max:!0,hide_from_to:!0,force_edges:!0,prettify:function(a){return moment(a,"X").utc().format("YYYY-MM-DD, HH:mm")},onChange:function(a){var c=b.player.isPlaying(),d=b.player.getSteps();c&&s();var e=moment(1e3*a.from).utc();b.timeSelect.value=e.format("X"),c&&t(d)},onFinish:function(a){b.disable();var c=moment(1e3*a.from).utc();b.timeDimension.setCurrentTime(c.valueOf()),b.timeSelect.value=c.format("X")}}),b.slider=$(d).data("ionRangeSlider"),b.timeSelect=a.DomUtil.create("select","uk-width-4-6 uk-text-bold player-time",c),b.updateTimeSelect(b.slider.result.min,b.slider.result.max);var h=a.DomUtil.create("button","uk-button uk-button-small uk-text-bold uk-width-2-6",c),i=(a.DomUtil.create("span","uk-icon-tachometer",h),1),j=document.createTextNode(" x"+i);h.appendChild(j),h.onclick=function(){switch(i){case 1:i=4;break;case 4:i=8;break;case 8:i=1}b.player.setTransitionTime(b.transitionTime/i),j=b.replaceText(h," x"+i,j)};var k=a.DomUtil.create("div","uk-button-group",f),l=a.DomUtil.create("button","uk-button player-button",k),m=(a.DomUtil.create("span","uk-icon-step-backward",l),a.DomUtil.create("button","uk-button player-button",k));b.playBackwardIcon=a.DomUtil.create("span","uk-icon-play player-play-reverse",m);var n=a.DomUtil.create("button","uk-button player-button",k),o=(a.DomUtil.create("span","uk-icon-chevron-left",n),a.DomUtil.create("button","uk-button player-button",k)),p=(a.DomUtil.create("span","uk-icon-chevron-right",o),a.DomUtil.create("button","uk-button player-button",k));b.playForwardIcon=a.DomUtil.create("span","uk-icon-play",p);var q=a.DomUtil.create("button","uk-button player-button",k),r=(a.DomUtil.create("span","uk-icon-step-forward",q),function(a){var c=moment(b.timeDimension.getCurrentTime()).utc();b.timeSelect.value=c.format("X"),b.slider.update({from:+c.format("X")}),b.player.getSteps()>0?(b.playForwardIcon.innerHTML="",b.playForwardIcon.classList.add("uk-icon-pause")):(b.playBackwardIcon.innerHTML="",b.playBackwardIcon.classList.add("uk-icon-pause"))}),s=function(){b.player.isPlaying()&&(b.playBackwardIcon.innerHTML="",b.playForwardIcon.innerHTML="",b.playForwardIcon.classList.remove("uk-icon-pause"),b.playForwardIcon.classList.add("uk-icon-play"),b.playBackwardIcon.classList.remove("uk-icon-pause"),b.playBackwardIcon.classList.add("uk-icon-play"),b.player.stop(),b.timeDimension.off("timeload",r))},t=function(a){a>0?u():v()},u=function(){b.playForwardIcon.classList.remove("uk-icon-play"),b.playForwardIcon.classList.add("uk-icon-pause"),b.player.start(1),b.timeDimension.on("timeload",r)},v=function(){b.playBackwardIcon.classList.remove("uk-icon-play"),b.playBackwardIcon.classList.add("uk-icon-pause"),b.player.start(-1),b.timeDimension.on("timeload",r)};p.onclick=function(){b.player.isPlaying()?s():u()},m.onclick=function(){b.player.isPlaying()?s():v()},l.onclick=function(){b.disable(),s();var a=moment(1e3*b.slider.result.min).utc();b.timeSelect.value=a.format("X"),b.timeDimension.setCurrentTimeIndex(0),b.slider.update({from:+a.format("X")})},n.onclick=function(){b.disable(),s();var a=moment(1e3*b.slider.result.from).subtract(b.interval,"seconds").utc();a<moment(1e3*b.slider.result.min)&&(a=moment(1e3*b.slider.result.min)),b.timeSelect.value=a.format("X"),b.timeDimension.setCurrentTime(a.valueOf()),b.slider.update({from:+a.format("X")})},o.onclick=function(){b.disable(),s();var a=moment(1e3*b.slider.result.from).add(b.interval,"seconds").utc();a>moment(1e3*b.slider.result.max)&&(a=moment(1e3*b.slider.result.max).utc()),b.timeSelect.value=a.format("X"),b.timeDimension.setCurrentTime(a.valueOf()),b.slider.update({from:+a.format("X")})},q.onclick=function(){b.disable(),s();var a=moment(1e3*b.slider.result.max).utc();b.timeSelect.value=a.format("X"),b.timeDimension.setCurrentTimeIndex(b.timeDimension._availableTimes.length-1),b.slider.update({from:+a.format("X")})},b.timeSelect.value=moment(1e3*b.slider.result.from).valueOf()+"",b.timeSelect.onchange=function(){b.disable(),s();var a=moment(1e3*parseInt(b.timeSelect.value)).utc();b.timeDimension.setCurrentTime(a.valueOf()),b.slider.update({from:+a.format("X")})}},c.prototype.replaceText=function(a,b,c){var d=document.createTextNode(b);return a.replaceChild(d,c),d},c.prototype.disable=function(){this.playerDiv.classList.add("player-disable")},c.prototype.enable=function(){this.playerDiv.classList.contains("player-disable")&&this.playerDiv.classList.remove("player-disable")},c.prototype.updateTimeSelect=function(b,c){for(var d=this;d.timeSelect.firstChild;)d.timeSelect.removeChild(d.timeSelect.firstChild);for(var e=b;e<=c;){var f=moment(1e3*e).utc(),g=a.DomUtil.create("option","",d.timeSelect);g.textContent=f.format(d.datetimeformat),g.value=f.format("X")+"",e+=d.interval}},c.prototype.update=function(a){var b=this,c={},d=b.slider.result.min,e=b.slider.result.max;a.min&&(d=a.min),a.max&&(e=a.max),c.min=d,c.max=e,b.updateTimeSelect(d,e),b.timeSelect.value=b.slider.result.from+"",a.date&&(c.from=a.date,b.timeSelect.value=a.date+""),b.slider.update(c)},c.prototype.getDate=function(){return moment(1e3*this.slider.result.from).utc()},c}(a.Control);b.Player=c}(a.Control||(a.Control={}))}(L||(L={}));
//# sourceMappingURL=leaflet-player-control.map
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment