Skip to content

Commit

Permalink
Cleanup and change version to 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed May 22, 2015
1 parent 0b88f6f commit 848fb05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
7 changes: 0 additions & 7 deletions Classes/ViewHelpers/ImageViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace HDNET\Focuspoint\ViewHelpers;

use HDNET\Focuspoint\Service\DimensionService;
use TYPO3\CMS\Core\Resource\FileInterface;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
Expand Down Expand Up @@ -61,12 +60,6 @@ public function render($src = NULL, $width = NULL, $height = NULL, $minWidth = N
// Ratio calculation
$focusPointY = $internalImage->getProperty('focus_point_y');
$focusPointX = $internalImage->getProperty('focus_point_x');
$width = $this->tag->getAttribute('width');
$height = $this->tag->getAttribute('height');

/** @var \HDNET\Focuspoint\Service\DimensionService $service */
$dimensionService = GeneralUtility::makeInstance('HDNET\\Focuspoint\\Service\\DimensionService');
list($focusWidth, $focusHeight) = $dimensionService->getFocusWidthAndHeight($width, $height, $ratio);

$focusTag = '<div class="focuspoint" data-image-imageSrc="' . $this->tag->getAttribute('src') . '" data-focus-x="' . ($focusPointX / 100) . '" data-focus-y="' . ($focusPointY / 100) . '" data-image-w="' . $this->tag->getAttribute('width') . '" data-image-h="' . $this->tag->getAttribute('height') . '">';
return $focusTag . $this->tag->render() . '</div>';
Expand Down
11 changes: 7 additions & 4 deletions Classes/Xclass/LocalCropScaleMaskHelper.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* @todo General file information
* Local crop scale mask helper (overwrite)
*
* @package Hdnet
* @package Focuspoint\Xclass
* @author Tim Lochmüller
*/

Expand All @@ -16,10 +16,9 @@
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;

/**
* @todo General class information
* Local crop scale mask helper (overwrite)
*
* @author Tim Lochmüller
*/
Expand All @@ -42,6 +41,8 @@ class LocalCropScaleMaskHelper extends \TYPO3\CMS\Core\Resource\Processing\Local
protected $focusCropService;

/**
* Build up the object
*
* @param LocalImageProcessor $processor
*/
public function __construct(LocalImageProcessor $processor) {
Expand All @@ -50,6 +51,8 @@ public function __construct(LocalImageProcessor $processor) {
}

/**
* Processing the focus point crop (fallback to LocalCropScaleMaskHelper)
*
* @param TaskInterface $task
*
* @return array|NULL
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'title' => 'Focuspoint',
'description' => 'Focuspoint integrate the focal point method to crop images in the frontend of the web page. Use the jQuery-focuspoint plugin (https://github.com/jonom/jquery-focuspoint example http://jonom.github.io/jquery-focuspoint/demos/helper/index.html) to crop the images. Use the function as wizard in the file list view and directly in the content element.',
'category' => 'be',
'version' => '1.1.1',
'version' => '1.2.0',
'state' => 'beta',
'clearcacheonload' => TRUE,
'author' => 'Tim Lochmüller',
Expand Down

0 comments on commit 848fb05

Please sign in to comment.