javascript - Call function after highchart is loaded Ember.js -


i need set boxes on same height. i've done have problem highcharts. it's loading after function , when it`s loaded in boxes have half chart.

how can call function after highcharts loaded?

import ember 'ember';  export default ember.component.extend({     /**      * equal heights of each box wrapper      */     sameheight: ember.run.schedule('afterrender', function () {          let boxes = document.getelementsbyclassname("box");         var tallest = 0;          // loop on matching , finding tallest         (let = 0; < boxes.length; i++) {             let elementheight = boxes[i].offsetheight; //get height , width of element, including padding , border             if (elementheight > tallest) {                 tallest = elementheight;             }         }         //add same height         var findclass = document.getelementsbyclassname('box');         (let = 0; < findclass.length; i++) {             findclass[i].style.height = tallest + "px";         }     })  }); 

this function in ember component.

import ember 'ember';  export default ember.component.extend({      sameheight: ember.run.next('afterrender', function () {          let boxes = document.getelementsbyclassname("box");         var tallest = 0;          // loop on matching , finding tallest         (let = 0; < boxes.length; i++) {             let elementheight = boxes[i].offsetheight; //get height , width of element, including padding , border             if (elementheight > tallest) {                 tallest = elementheight;             }         }         //add same height         var findclass = document.getelementsbyclassname('box');         (let = 0; < findclass.length; i++) {             findclass[i].style.height = tallest + "px";         }     })  }); 

Comments

Popular posts from this blog

ruby on rails - Permission denied @ sys_fail2 - (D:/RoR/projects/grp/public/uploads/ -

c++ - nodejs socket.io closes connection before upgrading to websocket -

java - What is the equivalent of @Value in CDI world? -