mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Update charts on orientation change
This commit is contained in:
@@ -71,7 +71,7 @@ angular.module('app').directive('areaChart', ['$window', function ($window) {
|
||||
* Watch for changes in the series data (mass changes, etc)
|
||||
*/
|
||||
scope.$watchCollection('series', render);
|
||||
angular.element($window).bind('resize render', render);
|
||||
angular.element($window).bind('orientationchange resize render', render);
|
||||
|
||||
function render() {
|
||||
var width = element[0].parentElement.offsetWidth,
|
||||
|
||||
@@ -37,7 +37,7 @@ angular.module('app').directive('slider', ['$window', function ($window) {
|
||||
render();
|
||||
});
|
||||
|
||||
angular.element($window).bind('resize', render);
|
||||
angular.element($window).bind('orientationchange resize', render);
|
||||
|
||||
function render() {
|
||||
var width = element[0].offsetWidth, w = width - margin.left - margin.right;
|
||||
|
||||
Reference in New Issue
Block a user