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){ | ||||
|         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; | ||||
|         else if(pos_x + document.getElementById("seekToDuration").outerWidth > document.getElementById("controls").outerWidth) { | ||||
|             pos_x = document.getElementById("controls").outerWidth - document.getElementById("seekToDuration").outerWidth; | ||||
|         else if(pos_x + document.getElementById("seekToDuration").offsetWidth > document.getElementById("controls").offsetWidth) { | ||||
|             pos_x = document.getElementById("controls").offsetWidth - document.getElementById("seekToDuration").offsetWidth; | ||||
|         } | ||||
|         Helper.css("#seekToDuration", "left", pos_x); | ||||
|         Helper.css("#seekToDuration", "left", pos_x + "px"); | ||||
|         try{ | ||||
|             var total = full_playlist[full_playlist.length - 1].duration / document.getElementById("controls").outerWidth; | ||||
|             total = total * e.clientX; | ||||
|             var total = full_playlist[full_playlist.length - 1].duration / document.getElementById("controls").offsetWidth; | ||||
|             total = total * event.clientX; | ||||
|             var _time = Helper.secondsToOther(total); | ||||
|             var _minutes = Helper.pad(_time[0]); | ||||
|             var _seconds = Helper.pad(Math.ceil(_time[1])); | ||||
|             Helper.setHtml("#seekToDuration", _minutes + ":" + _seconds); | ||||
|  | ||||
|             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) + "%"); | ||||
|             } | ||||
|         } 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>"); | ||||
|             var controlElement = document.querySelector("#controls"); | ||||
|             if(!Helper.mobilecheck()) Helper.css("#seekToDuration", "top", controlElement.offsetHeight - parseInt(controlElement.style.height) - 55); | ||||
|             else if(Helper.mobilecheck()) Helper.css("#seekToDuration", "top", controlElement.offsetHeight - parseInt(controlElement.style.height) - 20); | ||||
|             if(!Helper.mobilecheck()) Helper.css("#seekToDuration", "top", -controlElement.offsetHeight - 25 + "px"); | ||||
|             else if(Helper.mobilecheck()) Helper.css("#seekToDuration", "top", -controlElement.offsetHeight - 25 + "px"); | ||||
|             Helper.addClass("#controls", "ewresize"); | ||||
|         } | ||||
|         if(full_playlist != undefined && !already_offline){ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user