Remove rounding from experimental features

Summary: Rounding has been successfully adopted by multiple products and frameworks. Time to move it out of experimental mode. Rounding can still be turned of by setting the point scale factor to 0 on the config.

Reviewed By: gkassabli

Differential Revision: D4953838

fbshipit-source-id: 3ee5f27d92f95b3ed4a01c98bc35e9157f2e91c5
This commit is contained in:
Emil Sjolander
2017-04-27 07:09:24 -07:00
committed by Facebook Github Bot
parent f6b17183c5
commit 3db38f2a80
20 changed files with 48 additions and 216 deletions

View File

@@ -431,11 +431,6 @@ function getRoundedSize(node) {
function calculateTree(root, roundToPixelGrid) {
var rootLayout = [];
// Any occurrence of "Rounding" mark during node tree traverse turns this feature on for whole subtree.
if ((root.getAttribute('experiments') || '').split(' ').indexOf('Rounding') != -1) {
roundToPixelGrid = true;
}
for (var i = 0; i < root.children.length; i++) {
var child = root.children[i];
var layout = {
@@ -453,11 +448,9 @@ function calculateTree(root, roundToPixelGrid) {
: [],
};
if (roundToPixelGrid) {
var size = getRoundedSize(child);
layout.width = size.width;
layout.height = size.height;
}
var size = getRoundedSize(child);
layout.width = size.width;
layout.height = size.height;
rootLayout.push(layout);
}