mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +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)
|
* Watch for changes in the series data (mass changes, etc)
|
||||||
*/
|
*/
|
||||||
scope.$watchCollection('series', render);
|
scope.$watchCollection('series', render);
|
||||||
angular.element($window).bind('resize render', render);
|
angular.element($window).bind('orientationchange resize render', render);
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
var width = element[0].parentElement.offsetWidth,
|
var width = element[0].parentElement.offsetWidth,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ angular.module('app').directive('slider', ['$window', function ($window) {
|
|||||||
render();
|
render();
|
||||||
});
|
});
|
||||||
|
|
||||||
angular.element($window).bind('resize', render);
|
angular.element($window).bind('orientationchange resize', render);
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
var width = element[0].offsetWidth, w = width - margin.left - margin.right;
|
var width = element[0].offsetWidth, w = width - margin.left - margin.right;
|
||||||
|
|||||||
Reference in New Issue
Block a user