Famous/core — pull request #29 by jhurliman (2014-05-05 07:49:52+00:00)
Title: Prevent thrashing of Surface scale values

A fix was added in 0.1.2 to snap X/Y translation values to the nearest pixel, which partially fixed #15 but I was still seeing the issue with scaled surfaces. This fix rounds X/Y scale values off. I chose a fixed number of decimal places (the magic 1e6 seen throughout the codebase) since scale is a multiplier and can't simply be snapped to the nearest pixel.

This patch resolves #15 for me when watching with the Chrome inspector, although element.style.transform is still being assigned every frame. To skip the assign entirely would probably require a Transform.notApproxEquals() method. I can write this if it sounds like a reasonable approach.