Skip to content

Commit

Permalink
Release v0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Fengyuan Chen committed Nov 30, 2015
1 parent 6d4db9c commit b65292d
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 44 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Changelog


## 0.3.2 (Nov 20, 2015)
## 0.3.3 (Nov 30, 2015)

- Floor the numerical parameters for `CanvasRenderingContext2D.drawImage`


## 0.3.2 (Nov 18, 2015)

- Fixed #10: improve new crop box creating

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Cropper](https://github.com/fengyuanchen/cropperjs)
# [Cropper.js](https://github.com/fengyuanchen/cropperjs)

> JavaScript image cropper.
Expand Down Expand Up @@ -28,7 +28,7 @@
dist/
├── cropper.css ( 5 KB)
├── cropper.min.css ( 4 KB)
├── cropper.js (78 KB)
├── cropper.js (80 KB)
└── cropper.min.js (28 KB)
```

Expand Down
4 changes: 3 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"keywords": [
"image",
"crop",
"cropper",
"cropping",
"move",
"zoom",
"rotate",
"scale",
"cropper",
"cropperjs",
"cropper.js",
"html",
"css",
"javascript",
Expand Down
42 changes: 21 additions & 21 deletions dist/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper v0.3.2
* Cropper v0.3.3
* https://github.com/fengyuanchen/cropperjs
*
* Copyright (c) 2015 Fengyuan Chen
* Released under the MIT license
*
* Date: 2015-11-18T02:52:53.353Z
* Date: 2015-11-30T02:54:22.268Z
*/
.cropper-container {
position: relative;
Expand All @@ -27,7 +27,7 @@
width: 100%;
min-width: 0 !important;
max-width: none !important;
height: 100%;
height: 100%;
min-height: 0 !important;
max-height: none !important;

Expand All @@ -52,20 +52,20 @@

.cropper-drag-box {
background-color: #fff;
filter: alpha(opacity=0);
filter: alpha(opacity=0);
opacity: 0;
}

.cropper-modal {
background-color: #000;
filter: alpha(opacity=50);
filter: alpha(opacity=50);
opacity: .5;
}

.cropper-view-box {
display: block;
width: 100%;
height: 100%;
height: 100%;
overflow: hidden;
outline: 1px solid #39f;
outline-color: rgba(51, 153, 255, .75);
Expand All @@ -74,23 +74,23 @@
.cropper-dashed {
position: absolute;
display: block;
filter: alpha(opacity=50);
filter: alpha(opacity=50);
border: 0 dashed #eee;
opacity: .5;
}
.cropper-dashed.dashed-h {
top: 33.33333%;
left: 0;
width: 100%;
height: 33.33333%;
height: 33.33333%;
border-top-width: 1px;
border-bottom-width: 1px;
}
.cropper-dashed.dashed-v {
top: 0;
left: 33.33333%;
width: 33.33333%;
height: 100%;
height: 100%;
border-right-width: 1px;
border-left-width: 1px;
}
Expand All @@ -102,13 +102,13 @@
display: block;
width: 0;
height: 0;
filter: alpha(opacity=75);
filter: alpha(opacity=75);
opacity: .75;
}
.cropper-center:before, .cropper-center:after {
position: absolute;
display: block;
content: " ";
content: " ";
background-color: #eee;
}
.cropper-center:before {
Expand All @@ -131,7 +131,7 @@
display: block;
width: 100%;
height: 100%;
filter: alpha(opacity=10);
filter: alpha(opacity=10);
opacity: .1;
}

Expand Down Expand Up @@ -173,7 +173,7 @@
width: 5px;
height: 5px;
background-color: #39f;
filter: alpha(opacity=75);
filter: alpha(opacity=75);
opacity: .75;
}
.cropper-point.point-e {
Expand Down Expand Up @@ -221,7 +221,7 @@
width: 20px;
height: 20px;
cursor: se-resize;
filter: alpha(opacity=100);
filter: alpha(opacity=100);
opacity: 1;
}
.cropper-point.point-se:before {
Expand All @@ -233,7 +233,7 @@
height: 200%;
content: " ";
background-color: #39f;
filter: alpha(opacity=0);
filter: alpha(opacity=0);
opacity: 0;
}
@media (min-width: 768px) {
Expand All @@ -252,20 +252,20 @@
.cropper-point.point-se {
width: 5px;
height: 5px;
filter: alpha(opacity=75);
filter: alpha(opacity=75);
opacity: .75;
}
}

.cropper-bg {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");
}

.cropper-invisible {
filter: alpha(opacity=0);
filter: alpha(opacity=0);
opacity: 0;
}

.cropper-bg {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");
}

.cropper-hide {
position: absolute;
display: block;
Expand Down
13 changes: 7 additions & 6 deletions dist/cropper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper v0.3.2
* Cropper v0.3.3
* https://github.com/fengyuanchen/cropperjs
*
* Copyright (c) 2015 Fengyuan Chen
* Released under the MIT license
*
* Date: 2015-11-18T02:52:57.879Z
* Date: 2015-11-30T02:54:53.110Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -87,10 +87,11 @@
var cos = Math.cos;
var sqrt = Math.sqrt;
var round = Math.round;
var floor = Math.floor;

// Prototype
var prototype = {
version: '0.3.2'
version: '0.3.3'
};

// Utilities
Expand Down Expand Up @@ -560,7 +561,7 @@
context.scale(scaleX, scaleY);
}

context.drawImage(image, x, y, width, height);
context.drawImage(image, floor(x), floor(y), floor(width), floor(height));

if (advanced) {
context.restore();
Expand Down Expand Up @@ -2784,7 +2785,7 @@
srcHeight = dstHeight = min(originalHeight, sourceHeight - srcY);
}

args.push(srcX, srcY, srcWidth, srcHeight);
args.push(floor(srcX), floor(srcY), floor(srcWidth), floor(srcHeight));

// Scale destination sizes
if (scaledRatio) {
Expand All @@ -2796,7 +2797,7 @@

// Avoid "IndexSizeError" in IE and Firefox
if (dstWidth > 0 && dstHeight > 0) {
args.push(dstX, dstY, dstWidth, dstHeight);
args.push(floor(dstX), floor(dstY), floor(dstWidth), floor(dstHeight));
}

return args;
Expand Down
6 changes: 3 additions & 3 deletions dist/cropper.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/cropper.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
Expand All @@ -7,7 +7,7 @@
<meta name="description" content="JavaScript image cropper.">
<meta name="keywords" content="HTML, CSS, JS, JavaScript, image crop, image move, image zoom, image rotate, image scale, front-end, frontend, web development">
<meta name="author" content="Fengyuan Chen">
<title>Cropper</title>
<title>Cropper.js</title>
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="favicon.ico">
Expand All @@ -33,11 +33,11 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./">Cropper</a>
<a class="navbar-brand" href="./">Cropper.js</a>
</div>
<nav class="collapse navbar-collapse" id="navbar-collapse-1" role="navigation">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/fengyuanchen/cropperjs/tree/v0.3.2/README.md">Docs</a></li>
<li><a href="https://github.com/fengyuanchen/cropperjs/tree/v0.3.3/README.md">Docs</a></li>
<li><a href="https://github.com/fengyuanchen/cropperjs">Github</a></li>
<li><a href="https://chenfengyuan.com">About</a></li>
<li><a href="https://fengyuanchen.github.io">More</a></li>
Expand All @@ -49,7 +49,7 @@
<!-- Jumbotron -->
<div class="jumbotron docs-jumbotron">
<div class="container">
<h1>Cropper <small class="version">v0.3.2</small></h1>
<h1>Cropper.js <small class="version">v0.3.3</small></h1>
<p class="lead">JavaScript image cropper.</p>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cropperjs",
"description": "JavaScript image cropper.",
"version": "0.3.2",
"version": "0.3.3",
"main": "dist/cropper.js",
"license": "MIT",
"repository": "fengyuanchen/cropperjs",
Expand All @@ -12,12 +12,14 @@
"keywords": [
"image",
"crop",
"cropper",
"cropping",
"move",
"zoom",
"rotate",
"scale",
"cropper",
"cropperjs",
"cropper.js",
"html",
"css",
"javascript",
Expand Down

0 comments on commit b65292d

Please sign in to comment.