|
@@ -21,7 +21,7 @@ function browserRedirect() {
|
|
|
pre_titlelen: 0,
|
|
|
max_fontcount: 10,
|
|
|
hymenuObj: {
|
|
|
- oneQ_ratote_max: "pc" == browserRedirect() ? 40 : 34,
|
|
|
+ oneQ_ratote_max: "pc" == browserRedirect() ? 40 : 50,
|
|
|
twoQ_ratote_max: "pc" == browserRedirect() ? 63 : 32,
|
|
|
threeQ_ratote_max: "pc" == browserRedirect() ? 83 : 40
|
|
|
},
|
|
@@ -37,11 +37,8 @@ function browserRedirect() {
|
|
|
for (let y = 0; y < a.length; y++) {
|
|
|
var c = document.createElement("span"),
|
|
|
h = document.createElement("a"),
|
|
|
- img = document.createElement("img");
|
|
|
- img.src = a[y].icon
|
|
|
- img.style.display='block'
|
|
|
- img.style.width='40px'
|
|
|
- img.style.margin='0 auto -2px'
|
|
|
+ div = document.createElement("div");
|
|
|
+ div.style.backgroundImage = `url(${a[y].icon})`
|
|
|
"scene" == n && (a[y].scenename = "scene" + a[y].id);
|
|
|
var d = a[y].name
|
|
|
, g = d.length;
|
|
@@ -52,8 +49,8 @@ function browserRedirect() {
|
|
|
s.areaClick(t)
|
|
|
cb(t)
|
|
|
}),
|
|
|
- isIcon && c.appendChild(img),
|
|
|
- isIcon && t(img).bind("click", function (t) {
|
|
|
+ isIcon && c.appendChild(div),
|
|
|
+ isIcon && t(div).bind("click", function (t) {
|
|
|
s.areaClick(t)
|
|
|
cb(t)
|
|
|
}),
|
|
@@ -65,7 +62,7 @@ function browserRedirect() {
|
|
|
, m = 3 * (s.max_fontcount - d.length) / 2;
|
|
|
if (y > 0) {
|
|
|
var _ = 3 * s.pre_titlelen + 3 * (s.max_fontcount - s.pre_titlelen) / 2;
|
|
|
- l = s.pre_rotate + _ + 3 - m + ("pc" == browserRedirect() ? (n=='two'? 2 : 8) : (isIcon ? 6 : (n=='two'? 3 : 8)))
|
|
|
+ l = s.pre_rotate + _ + 3 - m + ("pc" == browserRedirect() ? (n=='two'? 2 : 8) : (isIcon ? 5 : (n=='two'? 3 : 8)))
|
|
|
}
|
|
|
".hymenu_industry" == e ? l -= 3 : ".hymenu_sub" == e && (l -= 5),
|
|
|
s.pre_rotate = l,
|
|
@@ -73,12 +70,15 @@ function browserRedirect() {
|
|
|
t(h).attr({
|
|
|
datarotate: l,
|
|
|
"data-typee": n,
|
|
|
- "data-gid": a[y].id
|
|
|
+ "data-gid": a[y].id,
|
|
|
+ "data-isIcon": isIcon ?1:0
|
|
|
+
|
|
|
});
|
|
|
- isIcon && t(img).attr({
|
|
|
+ isIcon && t(div).attr({
|
|
|
datarotate: l,
|
|
|
"data-typee": n,
|
|
|
- "data-gid": a[y].id
|
|
|
+ "data-gid": a[y].id,
|
|
|
+ "data-isIcon": 1
|
|
|
});
|
|
|
|
|
|
g > 3 && t(h).addClass("acr" + g),
|
|
@@ -140,14 +140,23 @@ function browserRedirect() {
|
|
|
},
|
|
|
areaClick: function (e) {
|
|
|
var n = t(e.target).attr("datarotate")
|
|
|
+ , isIcon = t(e.target).attr("data-isIcon")
|
|
|
, a = t(e.target).attr("class")
|
|
|
, r = t(e.target).parent();
|
|
|
- console.log(r);
|
|
|
-
|
|
|
+ console.log(isIcon,'isIconisIcon');
|
|
|
+ if (isIcon == 1) {
|
|
|
+ r = t(e.target).parent()
|
|
|
+ r.addClass("on").siblings().removeClass("on")
|
|
|
+ setTimeout(() => {
|
|
|
+ r.removeClass("on")
|
|
|
+ }, 1000);
|
|
|
+ } else{
|
|
|
"char1char2char3char4char5char6".indexOf(a) > -1 && (n = t(e.target).parent().attr("datarotate"),
|
|
|
r = t(e.target).parent().parent()),
|
|
|
this.rotateReset(r.parent().attr("class"), 0 - n),
|
|
|
r.addClass("on").siblings().removeClass("on")
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
industryClick: function (t) {
|
|
|
showSub(t),
|
|
@@ -276,43 +285,11 @@ function browserRedirect() {
|
|
|
t("#hymenu_area").css("transition", e.transition),
|
|
|
e.nowDeg = t._Rouslette.getRotate("hymenu_area");
|
|
|
let n = t(".hymenu>span:last a").attr("datarotate");
|
|
|
+
|
|
|
n < t._Rouslette.hymenuObj.oneQ_ratote_max && t._Rouslette.rotateReset("hymenu_area", 0 - t._Rouslette.hymenuObj.hymenu_rotate_center)
|
|
|
}
|
|
|
}),
|
|
|
- t(".hymenu1").on({
|
|
|
- touchstart: function (n) {
|
|
|
- e.startX = n.originalEvent.changedTouches[0].pageX,
|
|
|
- e.startY = n.originalEvent.changedTouches[0].pageY,
|
|
|
- e.nowDeg = t._Rouslette.getRotate("hymenu_area1"),
|
|
|
- e.transition = t("#hymenu_area1").css("transition"),
|
|
|
- e.direction = ""
|
|
|
- },
|
|
|
- touchmove: function (a) {
|
|
|
- e.ismove = 1,
|
|
|
- e.endX = a.originalEvent.changedTouches[0].pageX,
|
|
|
- e.endY = a.originalEvent.changedTouches[0].pageY;
|
|
|
- var r = e.endX - e.startX
|
|
|
- , o = e.endY - e.startY;
|
|
|
- if (1 == n)
|
|
|
- var s = r / 5;
|
|
|
- else
|
|
|
- s = -o / 5;
|
|
|
- t(".hymenu1").css({
|
|
|
- "-webkit-transform": "rotate(" + (e.nowDeg + s) + "deg)",
|
|
|
- transition: "none"
|
|
|
- })
|
|
|
- },
|
|
|
- touchend: function () {
|
|
|
- if (t("#toast").remove(),
|
|
|
- 0 == e.ismove)
|
|
|
- return;
|
|
|
- e.ismove = 0,
|
|
|
- t("#hymenu_area1").css("transition", e.transition),
|
|
|
- e.nowDeg = t._Rouslette.getRotate("hymenu_area1");
|
|
|
- let n = t(".hymenu1>span:last a").attr("datarotate");
|
|
|
- n < t._Rouslette.hymenuObj.oneQ_ratote_max && t._Rouslette.rotateReset("hymenu_area1", 0 - t._Rouslette.hymenuObj.hymenu_rotate_center)
|
|
|
- }
|
|
|
- }),
|
|
|
+
|
|
|
t(".hymenu_industry").on({
|
|
|
touchstart: function (n) {
|
|
|
e.startX = n.originalEvent.changedTouches[0].pageX,
|