mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
135 lines
2.9 KiB
JSON
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
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|