Javascript/HTML/CSS命运之轮只因差异而旋转?

Javascript/HTML/CSS命运之轮只因差异而旋转?,javascript,jquery,css,rotation,dom-manipulation,Javascript,Jquery,Css,Rotation,Dom Manipulation,我正在建立一个轮盘赌,它应该现实地旋转,并通过拖轮和放手来操作 我已经得到了1:1的旋转,我只需要让它在被放开后真实地旋转 我通过测量两帧之间的距离来计算力 您可以在此处查看源代码:我不清楚您的问题,但您需要清除文档上鼠标的间隔 $('.mouse_trap').mousedown(function(){ intervalvar = setInterval(monitorClicks, 24); /*will clear the interval and unb

我正在建立一个轮盘赌,它应该现实地旋转,并通过拖轮和放手来操作

我已经得到了1:1的旋转,我只需要让它在被放开后真实地旋转

我通过测量两帧之间的距离来计算力


您可以在此处查看源代码:

我不清楚您的问题,但您需要清除文档上鼠标的间隔

$('.mouse_trap').mousedown(function(){
        intervalvar = setInterval(monitorClicks, 24);

        /*will clear the interval and unbind the function on first mouseup on the document*/
        $(document).one('mouseup', function ()
        {
            clearInterval(intervalvar);
        });
    });

我不清楚您的问题,但您需要清除文件上鼠标的间隔

$('.mouse_trap').mousedown(function(){
        intervalvar = setInterval(monitorClicks, 24);

        /*will clear the interval and unbind the function on first mouseup on the document*/
        $(document).one('mouseup', function ()
        {
            clearInterval(intervalvar);
        });
    });

哎呀,对不起我之前的回复。非常感谢,你实际上解决了另一个问题。哦,对不起,我之前的答复。非常感谢,你实际上解决了另一个问题。