diff --git a/packages/vehicle-manufacture-manufacturing/client/app/views/dashboard/dashboard.less b/packages/vehicle-manufacture-manufacturing/client/app/views/dashboard/dashboard.less
index 779ad033..7a975e59 100644
--- a/packages/vehicle-manufacture-manufacturing/client/app/views/dashboard/dashboard.less
+++ b/packages/vehicle-manufacture-manufacturing/client/app/views/dashboard/dashboard.less
@@ -4,9 +4,10 @@
width: 100%;
box-sizing: border-box;
margin: 42px 52px;
+ display: flex;
+ flex-direction: column;
h1 {
- margin: 0 0 60px 0;
display: flex;
justify-content: space-between;
diff --git a/packages/vehicle-manufacture-vda/client/app/directives/blockchain-view/blockchain-view.directive.js b/packages/vehicle-manufacture-vda/client/app/directives/blockchain-view/blockchain-view.directive.js
index 45fafedf..23d3e9a2 100644
--- a/packages/vehicle-manufacture-vda/client/app/directives/blockchain-view/blockchain-view.directive.js
+++ b/packages/vehicle-manufacture-vda/client/app/directives/blockchain-view/blockchain-view.directive.js
@@ -1,6 +1,6 @@
angular.module('bc-vda')
-.directive('bcView', [function () {
+.directive('bcView', ['$window', function ($window) {
return {
restrict: 'E',
replace: true,
@@ -25,6 +25,21 @@ angular.module('bc-vda')
padding: 30
};
+ function debouncer( func , timeout ) {
+ var timeoutID , timeout = timeout || 200;
+ return function () {
+ var scope = this , args = arguments;
+ clearTimeout( timeoutID );
+ timeoutID = setTimeout( function () {
+ func.apply( scope , Array.prototype.slice.call( args ) );
+ } , timeout );
+ }
+ }
+
+ angular.element($window).bind('resize', debouncer (function(){
+ updateChart();
+ }));
+
function updateChart() {
// calculate width of chain