Files
divkit/test_data/snapshot_test_data/div-transformations/rotation_extra.json
T
4eb0da 1f6a207ee2 font_variation_settings
commit_hash:e965ebcaa65a6d7f4f3f5d499f7e816dc95c4d3f
2025-12-17 12:13:48 +03:00

135 lines
2.9 KiB
JSON

{
"description": "Custom pivot and negative values",
"platforms": [
"web"
],
"templates": {
"title": {
"type": "text",
"font_size": 16
},
"block": {
"type": "container",
"orientation": "overlap",
"items": [
{
"type": "container",
"margins": {
"top": 20,
"right": 20,
"bottom": 20,
"left": 20
},
"width": {
"type": "fixed",
"value": 120
},
"height": {
"type": "fixed",
"value": 120
},
"background": [
{
"type": "solid",
"color": "#3e7"
}
]
},
{
"type": "container",
"margins": {
"top": 30,
"right": 30,
"bottom": 30,
"left": 30
},
"width": {
"type": "fixed",
"value": 100
},
"height": {
"type": "fixed",
"value": 100
},
"background": [
{
"type": "solid",
"color": "#37e"
}
],
"$transformations": "transforms"
}
]
}
},
"card": {
"log_id": "snapshot_test_card",
"states": [
{
"state_id": 0,
"div": {
"type": "container",
"orientation": "vertical",
"items": [
{
"type": "title",
"text": "Rotation in 30 30"
},
{
"type": "block",
"transforms": [
{
"type": "rotation",
"angle": 45,
"pivot_x": {
"type": "pivot-fixed",
"value": 30
},
"pivot_y": {
"type": "pivot-fixed",
"value": 30
}
}
]
},
{
"type": "title",
"text": "Rotation in -30 -30"
},
{
"type": "block",
"transforms": [
{
"type": "rotation",
"angle": 45,
"pivot_x": {
"type": "pivot-fixed",
"value": -30
},
"pivot_y": {
"type": "pivot-fixed",
"value": -30
}
}
]
},
{
"type": "title",
"text": "Negative angle"
},
{
"type": "block",
"transforms": [
{
"type": "rotation",
"angle": -10
}
]
}
]
}
}
]
}
}