private static void applyLayoutOverride()

in litho-editor-flipper/src/main/java/com/facebook/litho/editor/flipper/DebugComponentDescriptor.java [622:704]


  private static void applyLayoutOverride(
      DebugLayoutNodeEditor node, String[] path, FlipperDynamic value) {
    switch (path[0]) {
      case "background":
        node.setBackgroundColor(value.asInt());
        break;
      case "foreground":
        node.setForegroundColor(value.asInt());
        break;
      case "direction":
        node.setLayoutDirection(YogaDirection.valueOf(value.asString().toUpperCase()));
        break;
      case "flex-direction":
        node.setFlexDirection(YogaFlexDirection.valueOf(value.asString().toUpperCase()));
        break;
      case "justify-content":
        node.setJustifyContent(YogaJustify.valueOf(value.asString().toUpperCase()));
        break;
      case "align-items":
        node.setAlignItems(YogaAlign.valueOf(value.asString().toUpperCase()));
        break;
      case "align-self":
        node.setAlignSelf(YogaAlign.valueOf(value.asString().toUpperCase()));
        break;
      case "align-content":
        node.setAlignContent(YogaAlign.valueOf(value.asString().toUpperCase()));
        break;
      case "position-type":
        node.setPositionType(YogaPositionType.valueOf(value.asString().toUpperCase()));
        break;
      case "flex-grow":
        node.setFlexGrow(value.asFloat());
        break;
      case "flex-shrink":
        node.setFlexShrink(value.asFloat());
        break;
      case "flex-basis":
        node.setFlexBasis(YogaValue.parse(value.asString()));
        break;
      case "width":
        node.setWidth(YogaValue.parse(value.asString()));
        break;
      case "min-width":
        node.setMinWidth(YogaValue.parse(value.asString()));
        break;
      case "max-width":
        node.setMaxWidth(YogaValue.parse(value.asString()));
        break;
      case "height":
        node.setHeight(YogaValue.parse(value.asString()));
        break;
      case "min-height":
        node.setMinHeight(YogaValue.parse(value.asString()));
        break;
      case "max-height":
        node.setMaxHeight(YogaValue.parse(value.asString()));
        break;
      case "aspect-ratio":
        node.setAspectRatio(value.asFloat());
        break;
      case "margin":
        node.setMargin(edgeFromString(path[1]), YogaValue.parse(value.asString()));
        break;
      case "padding":
        node.setPadding(edgeFromString(path[1]), YogaValue.parse(value.asString()));
        break;
      case "border":
        node.setBorderWidth(edgeFromString(path[1]), value.asFloat());
        break;
      case "position":
        node.setPosition(edgeFromString(path[1]), YogaValue.parse(value.asString()));
        break;
      case "alpha":
        node.setAlpha(value.asFloat());
        break;
      case "scale":
        node.setScale(value.asFloat());
        break;
      case "rotation":
        node.setRotation(value.asFloat());
        break;
    }
  }