alonho / angular-plotly

MIT License
41 stars 35 forks source link

Resize issue #18

Open jose-zama opened 8 years ago

jose-zama commented 8 years ago

Hi,

I am having an issue with the resize. Works in firefox but not in chrome or safari. I think that instead of watching changes on the parent div, we should watch changes on the "graph" element instead.

Updating the code to the following works:

scope.$watch(function() {
            return {
              'h': graph.offsetHeight,
              'w': graph.offsetWidth
            };
          }

Cheers!