Edit D:\chineseall_products\bak\digitalLib6\pages\screen\web\vertical\js\circleMenu.js
//?????????Path??????????????????????????????????Query??? var Radius = 200; // ?????? var Offset = 80; // ????????? var OutSpeed = 80; // ??????????? var OutIncr = 50; // ??????????? var OffsetSpeed = 200; // ?????????????? var InSpeed = 480; // ??????????? var InIncr = -80; // ??????????? var MaxMenuCount = 10; // ?????????? var ArcDir = "U"; // ????????????????????U:???D:???L:???R:?? var PathStatus = 0; // function PathRun(startTop, startLeft) { var $PathMenu = $('#PathMenu'); var PathItems = $PathMenu.children('.PathItem').slice(0, MaxMenuCount); var Count = PathItems.size(); var iteRad = 2*Math.PI / Count; //??????????????? var dirRad; //???????????????4?? switch (ArcDir) { case "U": dirRad = Math.PI * 0.5; break; case "R": dirRad = Math.PI * 2; break; case "D": dirRad = Math.PI * 1.5; break; case "L": dirRad = Math.PI * 1; break; } var firstMenuRad = dirRad; //???????????? if (PathStatus == 0) { //??????????????????????? var centerTop = ($(window).height() - $PathMenu.height())/2; var centerLeft = ($(window).width() - $PathMenu.width())/2; //??????????? $PathMenu.css({position: 'absolute', 'top' : centerTop, 'left' : centerLeft }); PathItems.each(function(index) { var currentMenuRad = firstMenuRad - index * iteRad; //??????????? var X = Math.cos(currentMenuRad) * Radius; var Y = Math.sin(currentMenuRad) * Radius; var X1 = Math.cos(currentMenuRad) * (Radius + Offset); var Y1 = Math.sin(currentMenuRad) * (Radius + Offset); $(this).show().animate({ left : X1, bottom : Y1 }, OutSpeed, function() { $(this).animate({ left : X, bottom : Y }, OffsetSpeed); }); }); //???????? $(".masking-out").show(); PathStatus = 1; } else if (PathStatus == 1) { //????????????????????? PathItems.each(function(index) { if (parseInt($(this).css('left')) == 0) { X1 = 0; } else { X1 = parseInt($(this).css('left')) + Offset; } if (parseInt($(this).css('bottom')) == 0) { Y1 = 0; } else { Y1 = parseInt($(this).css('bottom')) + Offset; } $(this).hide(); }); $(".masking-out").hide(); PathStatus = 0; //??????????? $PathMenu.css({position : 'absolute', 'top' : startTop, 'left' : startLeft }); } } $(function() { //???????????????????? var $PathMenu = $('#PathMenu'); var $PathMain = $PathMenu.find(".PathMain"); //?????????????????????????????????? var startTop = $PathMenu.css('top'); var startLeft = $PathMenu.css('left'); // $PathMain.on("click", function(event){ // PathRun(startTop, startLeft) // }); var mouseDownX,mouseDownY,initX,initY,flag = false; var isDrag=false; var isDragDist = 20; $PathMenu.on("mousedown", function(event) { mouseDownX = event.pageX; mouseDownY = event.pageY; //?????????? ??? initX = this.offsetLeft; initY = this.offsetTop; flag = true; }); $PathMenu.on("touchstart", function(event) { mouseDownX = event.originalEvent.targetTouches[0].pageX; mouseDownY = event.originalEvent.targetTouches[0].pageY; //?????????? ??? initX = this.offsetLeft; initY = this.offsetTop; flag = true; }); $PathMenu.on("touchmove", function(event) { // ??????????? if(flag) { //???????????????????? event.preventDefault(); var mouseMoveX = event.originalEvent.targetTouches[0].pageX; var mouseMoveY = event.originalEvent.targetTouches[0].pageY; this.style.left = parseInt(mouseMoveX) - parseInt(mouseDownX) + parseInt(initX) + "px"; this.style.top = parseInt(mouseMoveY) - parseInt(mouseDownY) + parseInt(initY) + "px"; if(((parseInt(mouseMoveX) - parseInt(mouseDownX)) > isDragDist || (parseInt(mouseMoveY) - parseInt(mouseDownY)) > isDragDist || (parseInt(mouseMoveX) - parseInt(mouseDownX)) < -isDragDist || (parseInt(mouseMoveY) - parseInt(mouseDownY)) < -isDragDist) && PathStatus==0) { isDrag=true; startTop = this.style.top; startLeft= this.style.left; } } }); $PathMenu.on("mousemove", function(event) { // ??????????? if(flag) { var mouseMoveX = event.pageX,mouseMoveY = event.pageY; this.style.left = parseInt(mouseMoveX) - parseInt(mouseDownX) + parseInt(initX) + "px"; this.style.top = parseInt(mouseMoveY) - parseInt(mouseDownY) + parseInt(initY) + "px"; if(((parseInt(mouseMoveX) - parseInt(mouseDownX)) > isDragDist || (parseInt(mouseMoveY) - parseInt(mouseDownY)) > isDragDist || (parseInt(mouseMoveX) - parseInt(mouseDownX)) < -isDragDist || (parseInt(mouseMoveY) - parseInt(mouseDownY)) < -isDragDist) && PathStatus==0) { isDrag=true; startTop = this.style.top; startLeft= this.style.left; } } }); $PathMenu.on("mouseup touchend", function() { //??????????? flag = false; isDrag=false; }); $PathMenu.find(".PathMain").on("mouseup touchend", function(){ if(!isDrag){ PathRun(startTop, startLeft) } }); });
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de