Skip to content

Commit f08ecac

Browse files
committed
Switch to transform-based motion in js
1 parent 0e1c88a commit f08ecac

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pace.coffee

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ class Bar
244244

245245
el = @getElement()
246246

247-
el.children[0].style.width = "#{ @progress }%"
247+
transform = "translate3d(#{ @progress }%, 0, 0)"
248+
for key in ['webkitTransform', 'msTransform', 'transform']
249+
el.children[0].style[key] = transform
248250

249251
if not @lastRenderedProgress or @lastRenderedProgress|0 != @progress|0
250252
# The whole-part of the number has changed

0 commit comments

Comments
 (0)