re-resizable
Advanced tools
Comparing version 6.6.0 to 6.6.1
@@ -24,2 +24,12 @@ # Changelog | ||
## [6.6.0 (2020-09-22)](https://github.com/bokuweb/re-resizable/compare/v6.5.5...v6.6.0) | ||
### :bug: Bug Fix | ||
- Fixed a bug, a base element is removed even though there are other resizable components. (#667) | ||
### :nail_care: Enhancement | ||
- Expose `NumberSize`. | ||
## [6.5.5 (2020-08-28)](https://github.com/bokuweb/re-resizable/compare/v6.5.4...v6.5.5) | ||
@@ -26,0 +36,0 @@ |
@@ -183,2 +183,5 @@ 'use strict'; | ||
if (size && typeof size === 'string') { | ||
if (endsWith(size, 'px')) { | ||
return Number(size.replace('px', '')); | ||
} | ||
if (endsWith(size, '%')) { | ||
@@ -188,7 +191,7 @@ var ratio = Number(size.replace('%', '')) / 100; | ||
} | ||
else if (endsWith(size, 'vw')) { | ||
if (endsWith(size, 'vw')) { | ||
var ratio = Number(size.replace('vw', '')) / 100; | ||
return innerWidth * ratio; | ||
} | ||
else if (endsWith(size, 'vh')) { | ||
if (endsWith(size, 'vh')) { | ||
var ratio = Number(size.replace('vh', '')) / 100; | ||
@@ -195,0 +198,0 @@ return innerHeight * ratio; |
@@ -81,2 +81,5 @@ var __extends = (this && this.__extends) || (function () { | ||
if (size && typeof size === 'string') { | ||
if (endsWith(size, 'px')) { | ||
return Number(size.replace('px', '')); | ||
} | ||
if (endsWith(size, '%')) { | ||
@@ -86,7 +89,7 @@ var ratio = Number(size.replace('%', '')) / 100; | ||
} | ||
else if (endsWith(size, 'vw')) { | ||
if (endsWith(size, 'vw')) { | ||
var ratio = Number(size.replace('vw', '')) / 100; | ||
return innerWidth * ratio; | ||
} | ||
else if (endsWith(size, 'vh')) { | ||
if (endsWith(size, 'vh')) { | ||
var ratio = Number(size.replace('vh', '')) / 100; | ||
@@ -93,0 +96,0 @@ return innerHeight * ratio; |
{ | ||
"name": "re-resizable", | ||
"version": "6.6.0", | ||
"version": "6.6.1", | ||
"description": "Resizable component for React.", | ||
@@ -5,0 +5,0 @@ "title": "re-resizable", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179908
2905