Skip to content

Commit

Permalink
Merge pull request #14 from performant-software/pss-dev
Browse files Browse the repository at this point in the history
Added touchscreen functionality for resizing
  • Loading branch information
ajolipa authored May 13, 2024
2 parents 311da62 + a37c727 commit 0b398e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions astro-web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store

# github workflows
.github
10 changes: 5 additions & 5 deletions editioncrafter/src/component/SplitPaneView.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class SplitPaneView extends Component {

componentDidMount() {
this.updateUI();
window.addEventListener('mousemove', this.onDrag);
window.addEventListener('mouseup', this.onEndDrag);
window.addEventListener('pointermove', this.onDrag);
window.addEventListener('pointerup', this.onEndDrag);
window.addEventListener('resize', this.onResize);
console.log(this.props);
// Set the default width on mount
Expand All @@ -129,16 +129,16 @@ class SplitPaneView extends Component {
}

componentWillUnmount() {
window.removeEventListener('mousemove', this.onDrag);
window.removeEventListener('mouseup', this.onEndDrag);
window.removeEventListener('pointermove', this.onDrag);
window.removeEventListener('pointerup', this.onEndDrag);
window.removeEventListener('resize', this.onResize);
}

renderDivider(position) {
const drawerIconClass = 'drawer-icon fas fa-caret-left fa-2x';

return (
<div className={`divider ${position}_divider`} onMouseDown={() => this.onStartDrag(position)}>
<div className={`divider ${position}_divider`} onPointerDown={() => this.onStartDrag(position)}>
<div className="drawer-button hidden" onClick={this.onDrawerButton}>
<i className={drawerIconClass}> </i>
</div>
Expand Down

0 comments on commit 0b398e6

Please sign in to comment.