Skip to content

Commit 66e9961

Browse files
committed
Slightly increase default boundary and viewport size
1 parent 17c32b7 commit 66e9961

7 files changed

Lines changed: 33 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# Changelog
22

3+
## [0.8.8] - 2023-11-21
4+
5+
### Fixed
6+
- Correctly handle uncached pointer move events.
7+
- Resolves janky behavior in Safari when a pinch zoom is initiated with one pointer outside the preview image.
8+
9+
### Changed
10+
- Slightly increased default boundary and viewport size.
11+
12+
313
## [0.8.6] - 2023-11-14
414

515
### Changed
616
- For browsers that don't support WebP output (Safari), fall back to JPEG instead of PNG when `quality < 1` to avoid unexpectedly large files.
717

8-
(v0.8.5 was skipped due to a mistake when publishing).
9-
1018

1119
## [0.8.4] - 2023-11-12
1220

@@ -46,6 +54,7 @@ This is the initial pre-release after forking from [Foliotek/Croppie](https://gi
4654
- `showZoomer` option (hide via CSS instead if desired).
4755

4856

49-
[Unreleased]: https://github.com/theodorejb/cropt/compare/v0.8.6...HEAD
57+
[Unreleased]: https://github.com/theodorejb/cropt/compare/v0.8.8...HEAD
58+
[0.8.8]: https://github.com/theodorejb/cropt/compare/v0.8.6...v0.8.8
5059
[0.8.6]: https://github.com/theodorejb/cropt/compare/v0.8.4...v0.8.6
5160
[0.8.4]: https://github.com/theodorejb/cropt/releases/tag/v0.8.4

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ c.bind("path/to/image.jpg");
2525

2626
### Sizing
2727

28-
The Cropt boundary defaults to 300px wide and 300px high.
28+
The Cropt boundary defaults to 320px wide and 320px high.
2929
To customize this, override the `.cropt-container .cr-boundary` width and height via CSS.
3030

3131
## Options
@@ -40,7 +40,7 @@ If set to `"off"`, the mouse wheel cannot be used to zoom in and out of the imag
4040
### `viewport`
4141

4242
Type: `{ width: number, height: number, type: "square" | "circle" }`
43-
Default value: `{ width: 200, height: 200, type: "square" }`
43+
Default value: `{ width: 220, height: 220, type: "square" }`
4444

4545
Defines the size and shape of the crop box.
4646

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cropt",
3-
"version": "0.8.6",
3+
"version": "0.8.8",
44
"description": "A lightweight JavaScript image cropper",
55
"files": [
66
"src/cropt.*"
@@ -10,14 +10,14 @@
1010
"main": "./src/cropt.js",
1111
"devDependencies": {
1212
"bootstrap": "^5.3.2",
13-
"gh-pages": "^6.0.0",
13+
"gh-pages": "^6.1.0",
1414
"grunt": "^1.6.1",
1515
"grunt-cli": "^1.4.3",
1616
"grunt-contrib-copy": "^1.0.0",
1717
"grunt-contrib-sass": "^2.0.0",
1818
"http-server": "^14.1.1",
1919
"sass": "^1.69.5",
20-
"typescript": "^5.2.2"
20+
"typescript": "^5.3.2"
2121
},
2222
"scripts": {
2323
"deploy": "gh-pages -d ./demo",

src/cropt.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
overflow: hidden;
2121
margin: 0 auto;
2222
z-index: 1;
23-
height: 300px;
23+
height: 320px;
2424
}
2525

2626
.cropt-container .cr-boundary,
2727
.cropt-container .cr-slider-wrap {
28-
width: 300px;
28+
width: 320px;
2929
}
3030

3131
.cropt-container .cr-viewport {

src/cropt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export class Cropt {
141141
options: CroptOptions = {
142142
mouseWheelZoom: "on",
143143
viewport: {
144-
width: 200,
145-
height: 200,
144+
width: 220,
145+
height: 220,
146146
type: 'square',
147147
},
148148
zoomerInputClass: 'cr-slider',

src/demo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ let photoSrc = "photos/" + photos[Math.floor(Math.random() * photos.length)];
3232

3333
let options: CroptOptions = {
3434
viewport: {
35-
width: 200,
36-
height: 200,
35+
width: 220,
36+
height: 220,
3737
type: "circle",
3838
},
3939
mouseWheelZoom: "on",

0 commit comments

Comments
 (0)