Skip to content

Commit 4f4a383

Browse files
committed
bugfix width handler
1 parent 3f6b14d commit 4f4a383

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

components/Editor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ class Editor extends React.Component {
411411
onChange={this.updateWidth}
412412
onChangeComplete={this.sync}
413413
paddingHorizontal={config.paddingHorizontal}
414+
paddingVertical={config.paddingVertical}
414415
/>
415416
}
416417
>

components/WidthHandler.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ function clamp(value, min, max) {
1313
return value
1414
}
1515

16-
export default function WidthHandler({ onChange, onChangeComplete, innerRef, paddingHorizontal }) {
16+
export default function WidthHandler({
17+
innerRef,
18+
onChange,
19+
onChangeComplete,
20+
paddingHorizontal,
21+
paddingVertical,
22+
}) {
1723
const startX = React.useRef(null)
1824
const startWidth = React.useRef(null)
1925

@@ -60,8 +66,8 @@ export default function WidthHandler({ onChange, onChangeComplete, innerRef, pad
6066
z-index: 2;
6167
position: absolute;
6268
background-color: ${COLORS.BLUE};
63-
top: ${paddingHorizontal};
64-
bottom: ${paddingHorizontal};
69+
top: ${paddingVertical};
70+
bottom: ${paddingVertical};
6571
right: ${paddingHorizontal};
6672
width: 8px;
6773
cursor: ew-resize;

0 commit comments

Comments
 (0)