Skip to content

Commit 97ece17

Browse files
committed
version + build
1 parent 148ab9f commit 97ece17

File tree

7 files changed

+32
-15
lines changed

7 files changed

+32
-15
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,11 @@ Button like link.
13961396
## Changelog
13971397
13981398
1399+
### 2.0.8
1400+
<ul>
1401+
<li>Two new resize strategies `width` and `height`</li>
1402+
</ul>
1403+
13991404
### 2.0.7
14001405
<ul>
14011406
<li>#214: iframe transport under IE8</li>

dist/FileAPI.html5.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.7 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.8 - BSD | git://github.com/mailru/FileAPI.git
22
* FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
33
*/
44

@@ -278,7 +278,7 @@
278278
* FileAPI (core object)
279279
*/
280280
api = {
281-
version: '2.0.7',
281+
version: '2.0.8',
282282

283283
cors: false,
284284
html5: true,
@@ -1864,7 +1864,7 @@
18641864
},
18651865

18661866
resize: function (w, h, strategy){
1867-
if( /min|max/.test(h) ){
1867+
if( /min|max|height|width/.test(h) ){
18681868
strategy = h;
18691869
h = w;
18701870
}
@@ -2047,6 +2047,12 @@
20472047
}
20482048
}
20492049
}
2050+
else if( strategy == 'height' ){
2051+
dw = dh * sf;
2052+
}
2053+
else if( strategy == 'width' ){
2054+
dh = dw / sf;
2055+
}
20502056
else if( strategy ){
20512057
if( !(sw > dw || sh > dh) ){
20522058
dw = sw;

dist/FileAPI.html5.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/FileAPI.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.7 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.8 - BSD | git://github.com/mailru/FileAPI.git
22
* FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
33
*/
44

@@ -278,7 +278,7 @@
278278
* FileAPI (core object)
279279
*/
280280
api = {
281-
version: '2.0.7',
281+
version: '2.0.8',
282282

283283
cors: false,
284284
html5: true,
@@ -1864,7 +1864,7 @@
18641864
},
18651865

18661866
resize: function (w, h, strategy){
1867-
if( /min|max/.test(h) ){
1867+
if( /min|max|height|width/.test(h) ){
18681868
strategy = h;
18691869
h = w;
18701870
}
@@ -2047,6 +2047,12 @@
20472047
}
20482048
}
20492049
}
2050+
else if( strategy == 'height' ){
2051+
dw = dh * sf;
2052+
}
2053+
else if( strategy == 'width' ){
2054+
dh = dw / sf;
2055+
}
20502056
else if( strategy ){
20512057
if( !(sw > dw || sh > dh) ){
20522058
dw = sw;
@@ -3491,8 +3497,8 @@
34913497
_css(dummy, {
34923498
top: 0
34933499
, left: 0
3494-
, width: target.offsetWidth + 100
3495-
, height: target.offsetHeight + 100
3500+
, width: target.offsetWidth
3501+
, height: target.offsetHeight
34963502
, zIndex: 1e6+'' // set max zIndex
34973503
, position: 'absolute'
34983504
});

dist/FileAPI.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/FileAPI.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
* FileAPI (core object)
185185
*/
186186
api = {
187-
version: '2.0.7',
187+
version: '2.0.8',
188188

189189
cors: false,
190190
html5: true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fileapi",
33
"exportName": "FileAPI",
4-
"version": "2.0.7",
4+
"version": "2.0.8",
55
"devDependencies": {
66
"grunt": "~0.4.5",
77
"grunt-version": "~0.3.0",

0 commit comments

Comments
 (0)