You are here

function theme_imagecrop_javascript in Image javascript crop 6

Same name and namespace in other branches
  1. 5 imagecrop_actions.inc \theme_imagecrop_javascript()

Display properties of a single action

Parameters

$element passed on by imagecache:

Return value

string

File

./imagecrop_actions.inc, line 115
Imagecache actions implementation.

Code

function theme_imagecrop_javascript($element) {
  $data = $element['#value'];
  $description = t('width') . ': ' . $data['width'] . ', ' . t('height') . ': ' . $data['height'];
  if (!empty($data['xoffset'])) {
    $description .= ', ' . t('xoffset') . ': ' . $data['xoffset'];
  }
  if (!empty($data['yoffset'])) {
    $description .= ', ' . t('yoffset') . ': ' . $data['yoffset'];
  }
  if ($data['resizable']) {
    $description .= ', ' . t('resizable');
  }
  if ($data['aspect']) {
    $description .= ', aspect ratio: ' . $data['aspect'];
  }
  if ($data['disable_if_no_data']) {
    $description .= ', ' . t("don't crop if region is not set");
  }
  if ($data['downscaling']) {
    $description .= ', ' . t('no downscaling allowed');
  }
  return $description;
}