Skip to content

Commit

Permalink
Merge pull request #58 from cloudinary/v3.1.1
Browse files Browse the repository at this point in the history
v3.1.1: changed default crop from fit to limit
  • Loading branch information
Pniel (Pini) Cohen authored Mar 19, 2020
2 parents 6d8262b + ed41baa commit 0166000
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 9 deletions.
3 changes: 2 additions & 1 deletion app/code/community/Cloudinary/Cloudinary/Helper/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ private function createTransformation()
} else {
return $this->_configuration->getDefaultTransformation()
->withDimensions($this->_dimensions)
->withCrop(Crop::fit());
//->withCrop(Crop::fit());
->withCrop(Crop::limit());
}
}
}
14 changes: 13 additions & 1 deletion lib/CloudinaryExtension/Image/Transformation/Crop.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class Crop
{
const PAD = 'lpad';
const PAD = 'pad';
const LPAD = 'lpad';
const FIT = 'fit';
const LIMIT = 'limit';

private $value;

Expand All @@ -24,11 +26,21 @@ public static function pad()
return new Crop(self::PAD);
}

public static function lpad()
{
return new Crop(self::LPAD);
}

public static function fit()
{
return new Crop(self::FIT);
}

public static function limit()
{
return new Crop(self::LIMIT);
}

public function __toString()
{
return $this->value;
Expand Down
Binary file removed var/connect/Cloudinary_Cloudinary-3.1.0.tgz
Binary file not shown.
Binary file added var/connect/Cloudinary_Cloudinary-3.1.1.tgz
Binary file not shown.
10 changes: 7 additions & 3 deletions var/connect/Cloudinary_Cloudinary.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<_>
<form_key>3F4BbWrCQHzufos5</form_key>
<form_key>UQi1chJu9f8zOXQ6</form_key>
<name>Cloudinary_Cloudinary</name>
<channel>community</channel>
<version_ids>
Expand All @@ -9,7 +9,7 @@
<description>Cloudinary supercharges your images! Upload images to the cloud, deliver optimized via a fast CDN, perform smart resizing and apply effects.</description>
<license>MIT License (MITL)</license>
<license_uri/>
<version>3.1.0</version>
<version>3.1.1</version>
<stability>stable</stability>
<notes> - Match MEQP1 coding standards
</notes>
Expand Down Expand Up @@ -41,7 +41,7 @@
<max/>
</max>
<files>
<files> </files>
<files> </files>
</files>
</package>
<extension>
Expand Down Expand Up @@ -103,4 +103,8 @@
<ignore/>
</ignore>
</contents>
<page>1</page>
<limit>200</limit>
<folder/>
<package/>
</_>
8 changes: 4 additions & 4 deletions var/connect/package.xml

Large diffs are not rendered by default.

0 comments on commit 0166000

Please sign in to comment.