Skip to content

Commit f03d5c4

Browse files
authored
10.4.6 (#927)
* 10.4.4 * 10.4.5 * fix: readme * 10.4.6
1 parent 0940631 commit f03d5c4

File tree

4 files changed

+30
-31
lines changed

4 files changed

+30
-31
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,12 @@ If you have a bug to report, please reproduce the bug in [CodeSandbox](https://c
511511

512512
## Changelog
513513

514+
#### v10.4.6
515+
516+
- Upgrade `re-resizable` to `6.9.11`
517+
- Upgrade `react-draggable` to `4.4.6`
518+
- Fixed a bug, wrong position in `onDrag` #910
519+
514520
#### v10.4.1
515521

516522
- Support Element for bounds.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-rnd",
3-
"version": "10.4.2",
4-
"description": "",
3+
"version": "10.4.6",
4+
"description": "A draggable and resizable React Component",
55
"title": "react-rnd",
66
"main": "./lib/index.es5.js",
77
"module": "./lib/index.js",
@@ -89,7 +89,7 @@
8989
"tslint-eslint-rules": "5.4.0",
9090
"tslint-plugin-prettier": "2.3.0",
9191
"tslint-react": "5.0.0",
92-
"typescript": "4.6.3"
92+
"typescript": "5.4.5"
9393
},
9494
"files": [
9595
"lib"
@@ -98,9 +98,9 @@
9898
"fixture": "./fixture.html"
9999
},
100100
"dependencies": {
101-
"re-resizable": "6.9.6",
102-
"react-draggable": "4.4.5",
103-
"tslib": "2.3.1"
101+
"re-resizable": "6.9.11",
102+
"react-draggable": "4.4.6",
103+
"tslib": "2.6.2"
104104
},
105105
"peerDependencies": {
106106
"react": ">=16.3.0",

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ export class Rnd extends React.PureComponent<Props, State> {
489489
const newPos = { x: this.originalPosition.x, y: this.originalPosition.y };
490490
const left = -delta.width;
491491
const top = -delta.height;
492-
const directions = ["top", "left", "topLeft", "bottomLeft", "topRight"];
492+
const directions: ResizeDirection[] = ["top", "left", "topLeft", "bottomLeft", "topRight"];
493493

494-
if (directions.indexOf(direction) !== -1) {
494+
if (directions.includes(direction)) {
495495
if (direction === "bottomLeft") {
496496
newPos.x += left;
497497
} else if (direction === "topRight") {

yarn.lock

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7267,11 +7267,6 @@ fast-levenshtein@~2.0.6:
72677267
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
72687268
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
72697269

7270-
fast-memoize@^2.5.1:
7271-
version "2.5.1"
7272-
resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.5.1.tgz#c3519241e80552ce395e1a32dcdde8d1fd680f5d"
7273-
integrity sha512-xdmw296PCL01tMOXx9mdJSmWY29jQgxyuZdq0rEHMu+Tpe1eOEtCycoG6chzlcrWsNgpZP7oL8RiQr7+G6Bl6g==
7274-
72757270
fastq@^1.6.0:
72767271
version "1.11.0"
72777272
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858"
@@ -11312,12 +11307,10 @@ rc@^1.1.7, rc@^1.2.7:
1131211307
minimist "^1.2.0"
1131311308
strip-json-comments "~2.0.1"
1131411309

11315-
11316-
version "6.9.6"
11317-
resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.6.tgz#b95d37e3821481b56ddfb1e12862940a791e827d"
11318-
integrity sha512-0xYKS5+Z0zk+vICQlcZW+g54CcJTTmHluA7JUUgvERDxnKAnytylcyPsA+BSFi759s5hPlHmBRegFrwXs2FuBQ==
11319-
dependencies:
11320-
fast-memoize "^2.5.1"
11310+
11311+
version "6.9.11"
11312+
resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.11.tgz#f356e27877f12d926d076ab9ad9ff0b95912b475"
11313+
integrity sha512-a3hiLWck/NkmyLvGWUuvkAmN1VhwAz4yOhS6FdMTaxCUVN9joIWkT11wsO68coG/iEYuwn+p/7qAmfQzRhiPLQ==
1132111314

1132211315
react-addons-create-fragment@^15.6.2:
1132311316
version "15.6.2"
@@ -11425,10 +11418,10 @@ react-dom@^16.8.3:
1142511418
prop-types "^15.6.2"
1142611419
scheduler "^0.18.0"
1142711420

11428-
11429-
version "4.4.5"
11430-
resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.5.tgz#9e37fe7ce1a4cf843030f521a0a4cc41886d7e7c"
11431-
integrity sha512-OMHzJdyJbYTZo4uQE393fHcqqPYsEtkjfMgvCHr6rejT+Ezn4OZbNyGH50vv+SunC1RMvwOTSWkEODQLzw1M9g==
11421+
11422+
version "4.4.6"
11423+
resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.6.tgz#63343ee945770881ca1256a5b6fa5c9f5983fe1e"
11424+
integrity sha512-LtY5Xw1zTPqHkVmtM3X8MUOxNDOUhv/khTgBgrUvwaS064bwVvxT+q5El0uUFNx5IEPKXuRejr7UqLwBIg5pdw==
1143211425
dependencies:
1143311426
clsx "^1.1.1"
1143411427
prop-types "^15.8.1"
@@ -13408,10 +13401,10 @@ [email protected]:
1340813401
version "1.9.0"
1340913402
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
1341013403

13411-
tslib@2.3.1:
13412-
version "2.3.1"
13413-
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
13414-
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
13404+
tslib@2.6.2:
13405+
version "2.6.2"
13406+
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
13407+
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
1341513408

1341613409
tslib@^1.13.0:
1341713410
version "1.14.1"
@@ -13542,10 +13535,10 @@ typedarray@^0.0.6:
1354213535
version "0.0.6"
1354313536
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1354413537

13545-
typescript@4.6.3:
13546-
version "4.6.3"
13547-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c"
13548-
integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==
13538+
typescript@5.4.5:
13539+
version "5.4.5"
13540+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
13541+
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
1354913542

1355013543
ua-parser-js@^0.7.18:
1355113544
version "0.7.28"

0 commit comments

Comments
 (0)