Commit d0d75fba authored by Tomas Pettersson's avatar Tomas Pettersson 🏸
Browse files

IE11 fixes

parent e07152e1
......@@ -54,7 +54,7 @@
}
.player-horizontal .irs {
height: 25px;
height: 8px;
}
.player-horizontal-control {
min-width: 130px;
......@@ -73,11 +73,17 @@
bottom: 10px;
}
.player .transition {
width: 52px;
position: relative;
bottom: 1px;
}
.player-calendar {
display: inline-block;
position: relative;
top: -3px;
float: right;
}
.player .irs-slider {
......
......@@ -221,7 +221,7 @@ var L;
self.slider = $(timeSliderDiv).data("ionRangeSlider");
self.timeSelect = L.DomUtil.create('select', 'uk-width-4-6 player-time', timeSelectDiv);
self.updateTimeSelect(self.slider.result.min, self.slider.result.max);
var transitionButton = L.DomUtil.create('button', 'uk-button uk-button-small uk-text-bold uk-width-2-6', timeSelectDiv);
var transitionButton = L.DomUtil.create('button', 'uk-button uk-button-small uk-text-bold transition', timeSelectDiv);
var tachometerIcon = L.DomUtil.create('span', 'uk-icon-tachometer', transitionButton);
var transitionSpeed = 1;
var title = document.createTextNode(' x' + transitionSpeed);
......
This diff is collapsed.
.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
.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:8px}.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 .transition{width:52px;position:relative;bottom:1px}.player-calendar{display:inline-block;position:relative;top:-3px}.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-05-03 */
/*! leaflet-player-control 2017-06-12 */
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"),b.timeDimension.setCurrentTime(e.valueOf()),c&&t(d)},onFinish:function(a){b.disable();var c=moment(1e3*a.from).utc();b.timeSelect.value=c.format("X"),b.timeDimension.setCurrentTime(c.valueOf())}}),b.slider=$(d).data("ionRangeSlider"),b.timeSelect=a.DomUtil.create("select","uk-width-4-6 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.title="Change play speed",h.onclick=function(){switch(i){case 1:i=4;break;case 4:i=8;break;case 8:i=1}if(b.player.isPlaying()){b.player.pause();var a=b.player.getSteps();b.player.setTransitionTime(b.transitionTime/i),b.player._steps=a,b.player.release()}else 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(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={}));
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"),b.timeDimension.setCurrentTime(e.valueOf()),c&&t(d)},onFinish:function(a){b.disable();var c=moment(1e3*a.from).utc();b.timeSelect.value=c.format("X"),b.timeDimension.setCurrentTime(c.valueOf())}}),b.slider=$(d).data("ionRangeSlider"),b.timeSelect=a.DomUtil.create("select","uk-width-4-6 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 transition",c),i=(a.DomUtil.create("span","uk-icon-tachometer",h),1),j=document.createTextNode(" x"+i);h.appendChild(j),h.title="Change play speed",h.onclick=function(){switch(i){case 1:i=4;break;case 4:i=8;break;case 8:i=1}if(b.player.isPlaying()){b.player.pause();var a=b.player.getSteps();b.player.setTransitionTime(b.transitionTime/i),b.player._steps=a,b.player.release()}else 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(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
......@@ -54,7 +54,7 @@
}
.player-horizontal .irs {
height: 25px;
height: 8px;
}
.player-horizontal-control {
min-width: 130px;
......@@ -73,11 +73,17 @@
bottom: 10px;
}
.player .transition {
width: 52px;
position: relative;
bottom: 1px;
}
.player-calendar {
display: inline-block;
position: relative;
top: -3px;
float: right;
}
.player .irs-slider {
......
......@@ -221,7 +221,7 @@ var L;
self.slider = $(timeSliderDiv).data("ionRangeSlider");
self.timeSelect = L.DomUtil.create('select', 'uk-width-4-6 player-time', timeSelectDiv);
self.updateTimeSelect(self.slider.result.min, self.slider.result.max);
var transitionButton = L.DomUtil.create('button', 'uk-button uk-button-small uk-text-bold uk-width-2-6', timeSelectDiv);
var transitionButton = L.DomUtil.create('button', 'uk-button uk-button-small uk-text-bold transition', timeSelectDiv);
var tachometerIcon = L.DomUtil.create('span', 'uk-icon-tachometer', transitionButton);
var transitionSpeed = 1;
var title = document.createTextNode(' x' + transitionSpeed);
......
This diff is collapsed.
......@@ -243,7 +243,7 @@ export class Player extends L.Control {
self.timeSelect = <HTMLSelectElement>L.DomUtil.create('select', 'uk-width-4-6 player-time', timeSelectDiv);
self.updateTimeSelect(self.slider.result.min, self.slider.result.max);
var transitionButton = <HTMLButtonElement>L.DomUtil.create('button', 'uk-button uk-button-small uk-text-bold uk-width-2-6', timeSelectDiv);
var transitionButton = <HTMLButtonElement>L.DomUtil.create('button', 'uk-button uk-button-small uk-text-bold transition', timeSelectDiv);
var tachometerIcon = <HTMLSpanElement>L.DomUtil.create('span', 'uk-icon-tachometer', transitionButton);
var transitionSpeed = 1;
var title = document.createTextNode(' x'+transitionSpeed);
......
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