@imean/sdk
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -135,2 +135,6 @@ "use strict"; | ||
} | ||
else if (step.type === 'type') { | ||
STATE.currentIndex++; | ||
refresh(); | ||
} | ||
}; | ||
@@ -170,10 +174,26 @@ elStepsCount.addEventListener('click', nextHandle); | ||
}); | ||
(0, setCss_1.default)(elSteps, { | ||
left: rect.left - padding / 2 + 'px', | ||
top: rect.bottom + padding + 'px', | ||
}); | ||
var rectMask = elMask.getBoundingClientRect(); | ||
console.log(rect, rectMask); | ||
// 判断指示器是否遮挡 | ||
if (rectMask.width - rect.right < 100) { | ||
(0, setCss_1.default)(elSteps, { | ||
margin: '0px 0px 0px 10px', | ||
left: '', | ||
top: box[1] + box[3] + padding + 'px', | ||
right: rectMask.width - rect.right - padding + 'px', | ||
bottom: '', | ||
}); | ||
} | ||
else { | ||
(0, setCss_1.default)(elSteps, { | ||
margin: '0px 10px 0px 0px', | ||
left: box[0] + 'px', | ||
top: box[1] + box[3] + padding + 'px', | ||
right: '', | ||
bottom: '', | ||
}); | ||
} | ||
elMask.setAttribute('width', rectMask.width + 'px'); | ||
elMask.setAttribute('height', rectMask.height + 'px'); | ||
// TODO 判断高亮是否在屏幕外 | ||
// 判断高亮是否在屏幕外 | ||
if (box[1] <= -box[3]) { | ||
@@ -180,0 +200,0 @@ (0, setCss_1.default)(elOverScreen, { |
{ | ||
"name": "@imean/sdk", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "lib/index.d.ts", |
53969
1235