Skip to content

Commit

Permalink
Fix Resizing Column for RTL View
Browse files Browse the repository at this point in the history
Refer to Issue  frappe#141 
Link: frappe#141
  • Loading branch information
ammarhararah committed Sep 8, 2021
1 parent 8ceadac commit 6cde048
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/columnmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,16 @@ export default class ColumnManager {

const onMouseMove = (e) => {
if (!isDragging) return;
const finalWidth = startWidth + (e.pageX - startX);

let addedWidth;

if (this.options.direction === 'rtl'){
addedWidth = startX - e.pageX;
} else {
addedWidth = e.pageX - startX;
}

const finalWidth = startWidth + addedWidth;
const {
colIndex
} = $.data($resizingCell);
Expand Down

0 comments on commit 6cde048

Please sign in to comment.