Last active
March 15, 2018 21:17
-
-
Save limscoder/f29a444afe50161664d41392f7dd5499 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
link(scope, elem) { | |
this.elem = elem; | |
setTimeout(() => { | |
this.resizePanel(); | |
this.renderViewBox(); | |
}, 50); | |
} | |
resizePanel() { | |
// set height and width of panel | |
const width = this.elem.find('.panel-container')[0].offsetWidth; | |
this.updateHeight(width * 0.33); | |
} | |
updateHeight(height = 500) { | |
const rowHeight = GRID_CELL_HEIGHT + GRID_CELL_VMARGIN; | |
this.panel.updateGridPos({ | |
...this.panel.gridPos, | |
h: Math.ceil(height / rowHeight) | |
}); | |
this.dashboard.events.emit('row-expanded'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment