有一個函數在360player.js中調用:第701行對我來說。尋找:
this.mmh = function(e) {
在這裏,deltaX變量計算錯誤,最有可能是由於您的旋轉木馬創建的偏移量。我通過從deltaX變量中減去相同的偏移量來解決頁面上的問題。 這裏是僞代碼的新功能進行修改:
this.mmh = function(e) {
/**
* Here you need to find the offset from the left of the page
* and assign it to a variable. In your case, it is simply the window's
* width multiplied by 2.
*/
offSet = 2 * $(window).width();
if (typeof e === 'undefined') {
e = window.event;
}
var oSound = self.lastTouchedSound,
coords = self.getMouseXY(e),
x = coords[0],
y = coords[1],
/* here you subtract your offset and scrubbing should work again */
deltaX = x-(oSound._360data.canvasMidXY[0]-offSet),
deltaY = y-oSound._360data.canvasMidXY[1],
angle = Math.floor(fullCircle-(self.rad2deg(Math.atan2(deltaX,deltaY))+180));
oSound.setPosition(oSound.durationEstimate*(angle/fullCircle));
self.stopEvent(e);
return false;
};
所以沒有任何解決方案? – Dan