Browse Source

Allow Chrome to optimize for…in loop in animate()

Making this a local variable allows Chrome to optimize the
loop, which is called frequently while scrolling
pull/681/head
Chris Adams 10 years ago
parent
commit
cabe8f42e6
  1. 2
      source/js/Core/Core/VMM.Library.js

2
source/js/Core/Core/VMM.Library.js

@ -484,7 +484,7 @@ if(typeof VMM != 'undefined') {
_ease = " cubic-bezier(0.33, 0.66, 0.66, 1)"; _ease = " cubic-bezier(0.33, 0.66, 0.66, 1)";
//_ease = " ease-in-out"; //_ease = " ease-in-out";
for (x in _att) { for (var x in _att) {
if (Object.prototype.hasOwnProperty.call(_att, x)) { if (Object.prototype.hasOwnProperty.call(_att, x)) {
trace(x + " to " + _att[x]); trace(x + " to " + _att[x]);
VMM.Lib.css(element, '-webkit-transition', x + ' ' + __duration + _ease); VMM.Lib.css(element, '-webkit-transition', x + ' ' + __duration + _ease);

Loading…
Cancel
Save