Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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');
- }
Add Comment
Please, Sign In to add comment