mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
add rtl images flag
This commit is contained in:
@@ -14399,6 +14399,7 @@
|
||||
"schema/div-edge-insets.json":"divkit/public/schema/div-edge-insets.json",
|
||||
"schema/div-extension.json":"divkit/public/schema/div-extension.json",
|
||||
"schema/div-fade-transition.json":"divkit/public/schema/div-fade-transition.json",
|
||||
"schema/div-filter-rtl-mirror.json":"divkit/public/schema/div-filter-rtl-mirror.json",
|
||||
"schema/div-filter.json":"divkit/public/schema/div-filter.json",
|
||||
"schema/div-fixed-count.json":"divkit/public/schema/div-fixed-count.json",
|
||||
"schema/div-fixed-length-input-mask.json":"divkit/public/schema/div-fixed-length-input-mask.json",
|
||||
|
||||
@@ -274,6 +274,7 @@ internal class DivBackgroundBinder @Inject constructor(
|
||||
|
||||
private fun DivFilter.toBackgroundState(resolver: ExpressionResolver) = when (this) {
|
||||
is DivFilter.Blur -> DivBackgroundState.Image.Filter.Blur(value.radius.evaluate(resolver).toIntSafely(), this)
|
||||
is DivFilter.RtlMirror -> DivBackgroundState.Image.Filter.RTLMirror(this)
|
||||
}
|
||||
|
||||
private sealed class DivBackgroundState {
|
||||
@@ -331,9 +332,11 @@ internal class DivBackgroundBinder @Inject constructor(
|
||||
): DivBackgroundState() {
|
||||
sealed class Filter {
|
||||
data class Blur(val radius: Int, val div: DivFilter.Blur) : Filter()
|
||||
data class RTLMirror(val div: DivFilter.RtlMirror) : Filter()
|
||||
|
||||
fun toDiv(): DivFilter = when (this) {
|
||||
is Blur -> div
|
||||
is RTLMirror -> div
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "object",
|
||||
"$description": "translations.json#/div_filter_rtl_mirror",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"rtl_mirror"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
}
|
||||
@@ -3,6 +3,11 @@
|
||||
{
|
||||
"$ref": "div-blur.json",
|
||||
"$description": "translations.json#/div_filter"
|
||||
},
|
||||
{
|
||||
"$ref": "div-filter-rtl-mirror.json",
|
||||
"$description": "translations.json#/div_filter_rtl_mirror",
|
||||
"platforms": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -859,6 +859,10 @@
|
||||
"en": "Blend mode of the color specified in `tint_color`.",
|
||||
"ru": "Метод наложения цвета, указанного в `tint_color`."
|
||||
},
|
||||
"div_filter_rtl_mirror": {
|
||||
"en": "The image is mirrored if the RTL (Right-to-Left) direction is specified in the system.",
|
||||
"ru": "Изображение зеркально отображается, в случае если в системе указан RTL (Right-to-Left)."
|
||||
},
|
||||
"div_indicator": {
|
||||
"en": "Progress indicator for [pager](div-pager.md).",
|
||||
"ru": "Индикатор прогресса для [пейджера](div-pager.md)."
|
||||
|
||||
Reference in New Issue
Block a user