mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Fixed issue with local-mode tooltip of position in song not showing up
This commit is contained in:
		| @@ -367,22 +367,22 @@ var Channel = { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     seekToMove: function(e){ |     seekToMove: function(e){ | ||||||
|         var pos_x = e.clientX - Math.ceil(document.getElementById("seekToDuration").outerWidth / 2) - 8; |         var pos_x = event.clientX - Math.ceil(document.getElementById("seekToDuration").offsetWidth / 2); | ||||||
|         if(pos_x < 0) pos_x = 0; |         if(pos_x < 0) pos_x = 0; | ||||||
|         else if(pos_x + document.getElementById("seekToDuration").outerWidth > document.getElementById("controls").outerWidth) { |         else if(pos_x + document.getElementById("seekToDuration").offsetWidth > document.getElementById("controls").offsetWidth) { | ||||||
|             pos_x = document.getElementById("controls").outerWidth - document.getElementById("seekToDuration").outerWidth; |             pos_x = document.getElementById("controls").offsetWidth - document.getElementById("seekToDuration").offsetWidth; | ||||||
|         } |         } | ||||||
|         Helper.css("#seekToDuration", "left", pos_x); |         Helper.css("#seekToDuration", "left", pos_x + "px"); | ||||||
|         try{ |         try{ | ||||||
|             var total = full_playlist[full_playlist.length - 1].duration / document.getElementById("controls").outerWidth; |             var total = full_playlist[full_playlist.length - 1].duration / document.getElementById("controls").offsetWidth; | ||||||
|             total = total * e.clientX; |             total = total * event.clientX; | ||||||
|             var _time = Helper.secondsToOther(total); |             var _time = Helper.secondsToOther(total); | ||||||
|             var _minutes = Helper.pad(_time[0]); |             var _minutes = Helper.pad(_time[0]); | ||||||
|             var _seconds = Helper.pad(Math.ceil(_time[1])); |             var _seconds = Helper.pad(Math.ceil(_time[1])); | ||||||
|             Helper.setHtml("#seekToDuration", _minutes + ":" + _seconds); |             Helper.setHtml("#seekToDuration", _minutes + ":" + _seconds); | ||||||
|  |  | ||||||
|             var acceptable = ["bar", "controls", "duration"]; |             var acceptable = ["bar", "controls", "duration"]; | ||||||
|             if(acceptable.indexOf(e.target.getAttribute("id")) >= 0 && dragging) { |             if(acceptable.indexOf(event.target.getAttribute("id")) >= 0 && dragging) { | ||||||
|                 document.getElementById("bar").style.width(((100 / duration) * total) + "%"); |                 document.getElementById("bar").style.width(((100 / duration) * total) + "%"); | ||||||
|             } |             } | ||||||
|         } catch(e){} |         } catch(e){} | ||||||
|   | |||||||
| @@ -589,8 +589,8 @@ function change_offline(enabled, already_offline){ | |||||||
|  |  | ||||||
|             document.querySelector("#main_components").insertAdjacentHTML("beforeend", "<div id='seekToDuration' class='hide'>00:00/01:00</div>"); |             document.querySelector("#main_components").insertAdjacentHTML("beforeend", "<div id='seekToDuration' class='hide'>00:00/01:00</div>"); | ||||||
|             var controlElement = document.querySelector("#controls"); |             var controlElement = document.querySelector("#controls"); | ||||||
|             if(!Helper.mobilecheck()) Helper.css("#seekToDuration", "top", controlElement.offsetHeight - parseInt(controlElement.style.height) - 55); |             if(!Helper.mobilecheck()) Helper.css("#seekToDuration", "top", -controlElement.offsetHeight - 25 + "px"); | ||||||
|             else if(Helper.mobilecheck()) Helper.css("#seekToDuration", "top", controlElement.offsetHeight - parseInt(controlElement.style.height) - 20); |             else if(Helper.mobilecheck()) Helper.css("#seekToDuration", "top", -controlElement.offsetHeight - 25 + "px"); | ||||||
|             Helper.addClass("#controls", "ewresize"); |             Helper.addClass("#controls", "ewresize"); | ||||||
|         } |         } | ||||||
|         if(full_playlist != undefined && !already_offline){ |         if(full_playlist != undefined && !already_offline){ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user