From bac25244f1ae7e9e77f710b8f862481e84f468b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=B1=E5=BA=8F?= Date: Wed, 13 Sep 2017 23:26:00 +0800 Subject: [PATCH] feat: replace style will recover the origin style if replace style (handle style) are provided, origin style should be omitted. --- src/resizer.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/resizer.js b/src/resizer.js index 4d402f73..b467f662 100644 --- a/src/resizer.js +++ b/src/resizer.js @@ -37,7 +37,6 @@ const styles = { topRight: { width: '20px', height: '20px', - position: 'absolute', right: '-10px', top: '-10px', cursor: 'ne-resize', @@ -45,7 +44,6 @@ const styles = { bottomRight: { width: '20px', height: '20px', - position: 'absolute', right: '-10px', bottom: '-10px', cursor: 'se-resize', @@ -53,7 +51,6 @@ const styles = { bottomLeft: { width: '20px', height: '20px', - position: 'absolute', left: '-10px', bottom: '-10px', cursor: 'sw-resize', @@ -61,7 +58,6 @@ const styles = { topLeft: { width: '20px', height: '20px', - position: 'absolute', left: '-10px', top: '-10px', cursor: 'nw-resize', @@ -88,8 +84,7 @@ export default (props: Props): React.Element<'div'> => { className={props.className} style={{ ...styles.base, - ...styles[props.direction], - ...(props.replaceStyles || {}), + ...(props.replaceStyles || styles[props.direction]), }} onMouseDown={(e: SyntheticMouseEvent) => { props.onResizeStart(e, props.direction);