Skip to content

Commit

Permalink
fix typo on Point cell callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Nov 9, 2023
1 parent c23bc1f commit 2898201
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 2 additions & 4 deletions addon/components/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,19 @@ export default class DrawerComponent extends Component {
return;
}

const dx = event.clientX - this.mouseX;
const dy = event.clientY - this.mouseY;
const multiplier = -1;
const width = dx * multiplier + this.overlayWidth;
const height = dy * multiplier + this.overlayHeight;
const minResizeHeight = getWithDefault(this.args, 'minResizeHeight', 0);
const maxResizeHeight = getWithDefault(this.args, 'maxResizeHeight', 600);

// Min resize width
// Min resize height
if (height <= minResizeHeight) {
drawerPanelNode.style.height = `${minResizeHeight}px`;
return;
}

// Max resize width
// Max resize height
if (height >= maxResizeHeight) {
drawerPanelNode.style.height = `${maxResizeHeight}px`;
return;
Expand Down
17 changes: 10 additions & 7 deletions addon/components/table/cell/point.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ export default class TableCellPointComponent extends Component {
}

@action onClick() {
const { column } = this.args;
const { onClick, action } = column;
const column = this.args.column;

if (typeof onClick === 'funciton') {
onClick(this.args.row, ...arguments);
}
if (column) {
const { onClick, action } = column;

if (typeof onClick === 'function') {
onClick(this.args.row, ...arguments);
}

if (typeof action === 'funciton') {
action(this.args.row);
if (typeof action === 'function') {
action(this.args.row);
}
}
}
}

0 comments on commit 2898201

Please sign in to comment.