div-focus
Поведение элемента при фокусировке или потере фокуса.
Параметры
| Параметры | Описание | 
|---|---|
background | 
array Фон элемента, когда он в фокусе. Может содержать несколько слоев. Список возможных значений:  | 
border | 
object Рамка элемента, когда он в фокусе. Значение имеет тип   | 
next_focus_ids | 
object Идентификаторы элементов, которые следующими получат фокус. Значение имеет тип   | 
on_blur | 
array Действия, когда элемент теряет фокус.  | 
on_focus | 
array Действия, когда элемент получает фокус.  | 
next_focus_ids
| Параметры | Описание | 
|---|---|
down | 
string Доступные платформы: Android.  | 
forward | 
string Доступные платформы: Android, iOS.  | 
left | 
string Доступные платформы: Android.  | 
right | 
string Доступные платформы: Android.  | 
up | 
string Доступные платформы: Android.  | 
JSON
{
  background: [ div-background, ... ],
  border: {
    corner_radius: "int",
    corners_radius: {
      bottom-left: "int",
      bottom-right: "int",
      top-left: "int",
      top-right: "int"
    },
    has_shadow: "bool_int",
    shadow: {
      alpha: "number",
      blur: "int",
      color: "string",
      offset*: {
        x*: {
          unit: "string",
          value*: "number"
        },
        y*: {
          unit: "string",
          value*: "number"
        }
      }
    },
    stroke: {
      color*: "string",
      style: div-stroke-style,
      unit: "string",
      width: "number"
    }
  },
  next_focus_ids: {
    down: "string",
    forward: "string",
    left: "string",
    right: "string",
    up: "string"
  },
  on_blur: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ],
  on_focus: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ]
}
        
    Была ли статья полезна?
Предыдущая
Следующая