Guest User

Untitled

a guest
Mar 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. link(scope, elem) {
  2. this.elem = elem;
  3. setTimeout(() => {
  4. this.resizePanel();
  5. this.renderViewBox();
  6. }, 50);
  7. }
  8.  
  9. resizePanel() {
  10. // set height and width of panel
  11. const width = this.elem.find('.panel-container')[0].offsetWidth;
  12. this.updateHeight(width * 0.33);
  13. }
  14.  
  15. updateHeight(height = 500) {
  16. const rowHeight = GRID_CELL_HEIGHT + GRID_CELL_VMARGIN;
  17. this.panel.updateGridPos({
  18. ...this.panel.gridPos,
  19. h: Math.ceil(height / rowHeight)
  20. });
  21. this.dashboard.events.emit('row-expanded');
  22. }
Add Comment
Please, Sign In to add comment