是否有基于jQuery的360度旋转滑块,用户可以抓住它并将其旋转360度?
如何将鼠标滑动到圆形?在画布中绘制圆弧和鼠标指针.鼠标应该在圆形路径上拖拽山墙?
//function to create mouse event to drag the mouse hover the arc
function mousedrag() {
var canvasoffset = $(this.canvas).offset();
var offsetX = canvasoffset.left;
var offsetY = canvasoffset.top;
var mouseX = parseInt(e.offsetX || e.clientX - offsetX);
var mouseY = parseInt(e.offsetY || e.clientY - offsetY);
var radius = this.width / 2;
var twoPI = 2 * Math.PI;
var toRad = twoPI / 360;
var r_width = this.width * 0.8;
var radial_Angle = Math.atan2(mouseY - radius,mouseX - radius);
var p_side_x = radius …
Run Code Online (Sandbox Code Playgroud)