// // Reset resets a node public static void Reset(ref Node node) { Flex.assertWithNode(node, node.Children.Count == 0, "Cannot reset a node which still has children attached"); Flex.assertWithNode(node, node.Parent == null, "Cannot reset a node still attached to a parent"); node.Children.Clear(); var config = node.config; node = CreateDefaultNode(); if (config.UseWebDefaults) { node.nodeStyle.FlexDirection = FlexDirection.Row; node.nodeStyle.AlignContent = Align.Stretch; } node.config = config; }