Skip to content

Commit

Permalink
bugfix width handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mfix22 committed Jun 13, 2022
1 parent 3f6b14d commit 4f4a383
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/Editor.js
Expand Up @@ -411,6 +411,7 @@ class Editor extends React.Component {
onChange={this.updateWidth}
onChangeComplete={this.sync}
paddingHorizontal={config.paddingHorizontal}
paddingVertical={config.paddingVertical}
/>
}
>
Expand Down
12 changes: 9 additions & 3 deletions components/WidthHandler.js
Expand Up @@ -13,7 +13,13 @@ function clamp(value, min, max) {
return value
}

export default function WidthHandler({ onChange, onChangeComplete, innerRef, paddingHorizontal }) {
export default function WidthHandler({
innerRef,
onChange,
onChangeComplete,
paddingHorizontal,
paddingVertical,
}) {
const startX = React.useRef(null)
const startWidth = React.useRef(null)

Expand Down Expand Up @@ -60,8 +66,8 @@ export default function WidthHandler({ onChange, onChangeComplete, innerRef, pad
z-index: 2;
position: absolute;
background-color: ${COLORS.BLUE};
top: ${paddingHorizontal};
bottom: ${paddingHorizontal};
top: ${paddingVertical};
bottom: ${paddingVertical};
right: ${paddingHorizontal};
width: 8px;
cursor: ew-resize;
Expand Down

0 comments on commit 4f4a383

Please sign in to comment.