You are here

function _calc_indent in Calendar 8

Same name and namespace in other branches
  1. 6.2 calendar_multiday/theme/theme.inc \_calc_indent()
  2. 7.3 theme/theme.inc \_calc_indent()
  3. 7 calendar_multiday/theme/theme.inc \_calc_indent()
  4. 7.2 calendar_multiday/theme/theme.inc \_calc_indent()

Calculates the indent based of the current depth and the depth of this branch in the tree.

Parameters

int $cur_depth: Current depth to calculate indent.

int $depth: Depth of this branch.

Return value

int Returns the calculated value in int.

1 call to _calc_indent()
_calc_indents in ./calendar.theme.inc
Indent items based off a nested tree structure of overlapping items.

File

./calendar.theme.inc, line 897
Theme functions for the Calendar module.

Code

function _calc_indent($cur_depth, $depth) {
  return round(10 * $cur_depth / ($depth + 1));
}