Skip to content

Commit 479fef4

Browse files
pdanpdanrstoenescu
andauthored
fix(QCircularProgress): safari does not support negative strokeDashOffset quasarframework#7997 (quasarframework#8126)
* fix(QCircularProgress): safari does not support negative strokeDashOffset quasarframework#7997 * Update QCircularProgress.js Co-authored-by: Razvan Stoenescu <razvan.stoenescu@gmail.com>
1 parent f776109 commit 479fef4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ui/src/components/circular-progress/QCircularProgress.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ export default Vue.extend({
6262
},
6363

6464
svgStyle () {
65-
return { transform: `rotate3d(0, 0, 1, ${this.angle - 90}deg)` }
65+
const angle = this.$q.lang.rtl === true ? -this.angle : this.angle
66+
67+
return {
68+
transform: this.reverse !== (this.$q.lang.rtl === true)
69+
? `scale3d(-1, 1, 1) rotate3d(0, 0, 1, ${-90 - angle}deg)`
70+
: `rotate3d(0, 0, 1, ${angle - 90}deg)`
71+
}
6672
},
6773

6874
circleStyle () {
@@ -85,7 +91,7 @@ export default Vue.extend({
8591

8692
strokeDashOffset () {
8793
const progress = 1 - (this.normalizedValue - this.min) / (this.max - this.min)
88-
return (this.dir * progress) * circumference
94+
return progress * circumference
8995
},
9096

9197
strokeWidth () {

0 commit comments

Comments
 (0)