fix issue #117 progress indicator stuck problem
This commit is contained in:
commit
531f2af213
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,3 +11,4 @@ npm-debug.log
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea
|
|
@ -69,9 +69,11 @@ function setHeights() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCircleStyles() {
|
function setCircleStyles() {
|
||||||
const radiusCircle = $progressCircle.parent().width() / 2
|
const svgWidth = $progressCircle.parent().width();
|
||||||
|
const radiusCircle = svgWidth / 2
|
||||||
const borderWidth = isMobile() ? 2 : 3
|
const borderWidth = isMobile() ? 2 : 3
|
||||||
|
|
||||||
|
$progressCircle.parent().attr('viewBox', `0 0 ${svgWidth} ${svgWidth}`)
|
||||||
$progressCircle.attr('stroke-width', borderWidth)
|
$progressCircle.attr('stroke-width', borderWidth)
|
||||||
$progressCircle.attr('r', radiusCircle - (borderWidth - 1))
|
$progressCircle.attr('r', radiusCircle - (borderWidth - 1))
|
||||||
$progressCircle.attr('cx', radiusCircle)
|
$progressCircle.attr('cx', radiusCircle)
|
||||||
|
|
Loading…
Reference in a new issue