Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Commit

Permalink
v0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Fengyuan Chen committed May 10, 2015
1 parent ab3f4c5 commit 7b6f5ff
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 74 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog


## 0.9.3 (May 10, 2015)

- Add one new option: "data"
- Add two new method: "setData" (#290, #296), "crop" (#275)
- Fix incorrect minWidth/Height size of canvas (#295)
- Fix the strict mode bug (#280)
- Fix the crop box resizing bug (#277)


## 0.9.2 (Apr 18, 2015)

- Improve strict mode to show full image
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = function (grunt) {
options: {
compatibility: 'ie8',
keepSpecialComments: '*',
noAdvanced: true
advanced: false
},
dist: {
src: 'dist/<%= pkg.name %>.css',
Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
dist/
├── cropper.css ( 5 KB)
├── cropper.min.css ( 4 KB)
├── cropper.js (54 KB)
├── cropper.js (56 KB)
└── cropper.min.js (21 KB)
```

Expand Down Expand Up @@ -109,6 +109,14 @@ If you want to change the global default options, You may use `$.fn.cropper.setD
Set the aspect ratio of the crop box. By default, the crop box is free ratio.


### data

- Type: `Object`
- Default: `null`

The previous cropped data if you had stored, will be passed to `setData` method automatically.


### crop

- Type: `Function`
Expand Down Expand Up @@ -473,11 +481,25 @@ Destroy the cropper and remove the instance from the image.
- `height`: the height of the cropped area
- `rotate`: the rotated degrees of the image

Get the cropped area data in the original image for cropping image.
Get the cropped area data (base on the original image).

![a schematic diagram of data's properties](assets/img/data.png)


### setData(data)

- **data**:
- Type: `Object`
- Properties:
- `x`: the offset left of the cropped area
- `y`: the offset top of the cropped area
- `width`: the width of the cropped area
- `height`: the height of the cropped area
- `rotate`: the rotated degrees of the image

Set the cropped area data (base on the original image).


### getContainerData()

- (return value):
Expand Down
16 changes: 7 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "cropper",
"description": "A simple jQuery image cropping plugin.",
"version": "0.9.2",
"version": "0.9.3",
"main": [
"dist/cropper.js",
"dist/cropper.css"
],
"keywords": [
"image",
"cropping",
"crop",
"jquery",
"plugin",
"html",
Expand All @@ -27,20 +27,18 @@
"**/.*",
"node_modules",
"bower_components",
"tests",
"test",
"examples",
"assets",
"demo",
"docs",
"_*"
"docs"
],
"dependencies": {
"jquery": ">= 1.9.0"
"jquery": ">= 1.9.1"
},
"devDependencies": {
"jquery": "~1.11.2",
"bootstrap": "~3.3.2",
"qunit": "~1.17.1"
"bootstrap": "~3.3.4",
"jquery": "~1.11.3",
"qunit": "~1.18.0"
}
}
4 changes: 2 additions & 2 deletions dist/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper v0.9.2
* Cropper v0.9.3
* https://github.com/fengyuanchen/cropper
*
* Copyright (c) 2014-2015 Fengyuan Chen and contributors
* Released under the MIT license
*
* Date: 2015-04-18T04:35:01.500Z
* Date: 2015-05-10T07:25:08.257Z
*/
.cropper-container {
position: relative;
Expand Down
Loading

0 comments on commit 7b6f5ff

Please sign in to comment.