Skip to content

Commit 0166000

Browse files
author
Pniel (Pini) Cohen
authored
Merge pull request #58 from cloudinary/v3.1.1
v3.1.1: changed default crop from fit to limit
2 parents 6d8262b + ed41baa commit 0166000

File tree

6 files changed

+26
-9
lines changed

6 files changed

+26
-9
lines changed

app/code/community/Cloudinary/Cloudinary/Helper/Image.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ private function createTransformation()
147147
} else {
148148
return $this->_configuration->getDefaultTransformation()
149149
->withDimensions($this->_dimensions)
150-
->withCrop(Crop::fit());
150+
//->withCrop(Crop::fit());
151+
->withCrop(Crop::limit());
151152
}
152153
}
153154
}

lib/CloudinaryExtension/Image/Transformation/Crop.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
class Crop
66
{
7-
const PAD = 'lpad';
7+
const PAD = 'pad';
8+
const LPAD = 'lpad';
89
const FIT = 'fit';
10+
const LIMIT = 'limit';
911

1012
private $value;
1113

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

29+
public static function lpad()
30+
{
31+
return new Crop(self::LPAD);
32+
}
33+
2734
public static function fit()
2835
{
2936
return new Crop(self::FIT);
3037
}
3138

39+
public static function limit()
40+
{
41+
return new Crop(self::LIMIT);
42+
}
43+
3244
public function __toString()
3345
{
3446
return $this->value;
-518 KB
Binary file not shown.
518 KB
Binary file not shown.

var/connect/Cloudinary_Cloudinary.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<_>
2-
<form_key>3F4BbWrCQHzufos5</form_key>
2+
<form_key>UQi1chJu9f8zOXQ6</form_key>
33
<name>Cloudinary_Cloudinary</name>
44
<channel>community</channel>
55
<version_ids>
@@ -9,7 +9,7 @@
99
<description>Cloudinary supercharges your images! Upload images to the cloud, deliver optimized via a fast CDN, perform smart resizing and apply effects.</description>
1010
<license>MIT License (MITL)</license>
1111
<license_uri/>
12-
<version>3.1.0</version>
12+
<version>3.1.1</version>
1313
<stability>stable</stability>
1414
<notes> - Match MEQP1 coding standards
1515
</notes>
@@ -41,7 +41,7 @@
4141
<max/>
4242
</max>
4343
<files>
44-
<files> </files>
44+
<files> </files>
4545
</files>
4646
</package>
4747
<extension>
@@ -103,4 +103,8 @@
103103
<ignore/>
104104
</ignore>
105105
</contents>
106+
<page>1</page>
107+
<limit>200</limit>
108+
<folder/>
109+
<package/>
106110
</_>

var/connect/package.xml

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)