taffy-layout 1.0.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +16 -1
- package/README.md +16 -1
- package/README.zh-CN.md +16 -1
- package/package.json +1 -1
- package/pkg/README.md +16 -1
- package/pkg/taffy_wasm.d.ts +428 -2
- package/pkg/taffy_wasm.js +907 -16
- package/pkg/taffy_wasm_bg.wasm +0 -0
- package/pkg/taffy_wasm_bg.wasm.d.ts +63 -1
package/README.ja-JP.md
CHANGED
|
@@ -45,13 +45,28 @@ const containerStyle = new Style();
|
|
|
45
45
|
containerStyle.display = Display.Flex;
|
|
46
46
|
containerStyle.flexDirection = FlexDirection.Column;
|
|
47
47
|
containerStyle.alignItems = AlignItems.Center;
|
|
48
|
+
|
|
49
|
+
// size オブジェクトで設定
|
|
48
50
|
containerStyle.size = { width: 300, height: 200 };
|
|
51
|
+
|
|
52
|
+
// または個別の width/height プロパティを使用
|
|
53
|
+
containerStyle.width = 300;
|
|
54
|
+
containerStyle.height = 200;
|
|
55
|
+
|
|
56
|
+
// padding オブジェクトで設定
|
|
49
57
|
containerStyle.padding = { left: 10, right: 10, top: 10, bottom: 10 };
|
|
50
58
|
|
|
59
|
+
// または個別の padding プロパティを使用
|
|
60
|
+
containerStyle.paddingLeft = 10;
|
|
61
|
+
containerStyle.paddingRight = 10;
|
|
62
|
+
containerStyle.paddingTop = 10;
|
|
63
|
+
containerStyle.paddingBottom = 10;
|
|
64
|
+
|
|
51
65
|
// 子要素のスタイル
|
|
52
66
|
const childStyle = new Style();
|
|
53
67
|
childStyle.flexGrow = 1;
|
|
54
|
-
childStyle.
|
|
68
|
+
childStyle.width = "100%";
|
|
69
|
+
childStyle.height = "auto";
|
|
55
70
|
|
|
56
71
|
// ノードを生成
|
|
57
72
|
const child1 = tree.newLeaf(childStyle);
|
package/README.md
CHANGED
|
@@ -45,13 +45,28 @@ const containerStyle = new Style();
|
|
|
45
45
|
containerStyle.display = Display.Flex;
|
|
46
46
|
containerStyle.flexDirection = FlexDirection.Column;
|
|
47
47
|
containerStyle.alignItems = AlignItems.Center;
|
|
48
|
+
|
|
49
|
+
// You can set size as an object
|
|
48
50
|
containerStyle.size = { width: 300, height: 200 };
|
|
51
|
+
|
|
52
|
+
// Or use individual width/height properties
|
|
53
|
+
containerStyle.width = 300;
|
|
54
|
+
containerStyle.height = 200;
|
|
55
|
+
|
|
56
|
+
// Set padding as an object
|
|
49
57
|
containerStyle.padding = { left: 10, right: 10, top: 10, bottom: 10 };
|
|
50
58
|
|
|
59
|
+
// Or use individual padding properties
|
|
60
|
+
containerStyle.paddingLeft = 10;
|
|
61
|
+
containerStyle.paddingRight = 10;
|
|
62
|
+
containerStyle.paddingTop = 10;
|
|
63
|
+
containerStyle.paddingBottom = 10;
|
|
64
|
+
|
|
51
65
|
// Create child styles
|
|
52
66
|
const childStyle = new Style();
|
|
53
67
|
childStyle.flexGrow = 1;
|
|
54
|
-
childStyle.
|
|
68
|
+
childStyle.width = "100%";
|
|
69
|
+
childStyle.height = "auto";
|
|
55
70
|
|
|
56
71
|
// Create nodes
|
|
57
72
|
const child1 = tree.newLeaf(childStyle);
|
package/README.zh-CN.md
CHANGED
|
@@ -45,13 +45,28 @@ const containerStyle = new Style();
|
|
|
45
45
|
containerStyle.display = Display.Flex;
|
|
46
46
|
containerStyle.flexDirection = FlexDirection.Column;
|
|
47
47
|
containerStyle.alignItems = AlignItems.Center;
|
|
48
|
+
|
|
49
|
+
// 可以设置 size 对象
|
|
48
50
|
containerStyle.size = { width: 300, height: 200 };
|
|
51
|
+
|
|
52
|
+
// 或使用独立的 width/height 属性
|
|
53
|
+
containerStyle.width = 300;
|
|
54
|
+
containerStyle.height = 200;
|
|
55
|
+
|
|
56
|
+
// 设置 padding 对象
|
|
49
57
|
containerStyle.padding = { left: 10, right: 10, top: 10, bottom: 10 };
|
|
50
58
|
|
|
59
|
+
// 或使用独立的 padding 属性
|
|
60
|
+
containerStyle.paddingLeft = 10;
|
|
61
|
+
containerStyle.paddingRight = 10;
|
|
62
|
+
containerStyle.paddingTop = 10;
|
|
63
|
+
containerStyle.paddingBottom = 10;
|
|
64
|
+
|
|
51
65
|
// 子元素样式
|
|
52
66
|
const childStyle = new Style();
|
|
53
67
|
childStyle.flexGrow = 1;
|
|
54
|
-
childStyle.
|
|
68
|
+
childStyle.width = "100%";
|
|
69
|
+
childStyle.height = "auto";
|
|
55
70
|
|
|
56
71
|
// 创建节点
|
|
57
72
|
const child1 = tree.newLeaf(childStyle);
|
package/package.json
CHANGED
package/pkg/README.md
CHANGED
|
@@ -45,13 +45,28 @@ const containerStyle = new Style();
|
|
|
45
45
|
containerStyle.display = Display.Flex;
|
|
46
46
|
containerStyle.flexDirection = FlexDirection.Column;
|
|
47
47
|
containerStyle.alignItems = AlignItems.Center;
|
|
48
|
+
|
|
49
|
+
// You can set size as an object
|
|
48
50
|
containerStyle.size = { width: 300, height: 200 };
|
|
51
|
+
|
|
52
|
+
// Or use individual width/height properties
|
|
53
|
+
containerStyle.width = 300;
|
|
54
|
+
containerStyle.height = 200;
|
|
55
|
+
|
|
56
|
+
// Set padding as an object
|
|
49
57
|
containerStyle.padding = { left: 10, right: 10, top: 10, bottom: 10 };
|
|
50
58
|
|
|
59
|
+
// Or use individual padding properties
|
|
60
|
+
containerStyle.paddingLeft = 10;
|
|
61
|
+
containerStyle.paddingRight = 10;
|
|
62
|
+
containerStyle.paddingTop = 10;
|
|
63
|
+
containerStyle.paddingBottom = 10;
|
|
64
|
+
|
|
51
65
|
// Create child styles
|
|
52
66
|
const childStyle = new Style();
|
|
53
67
|
childStyle.flexGrow = 1;
|
|
54
|
-
childStyle.
|
|
68
|
+
childStyle.width = "100%";
|
|
69
|
+
childStyle.height = "auto";
|
|
55
70
|
|
|
56
71
|
// Create nodes
|
|
57
72
|
const child1 = tree.newLeaf(childStyle);
|