diff options
| author | Zog | 2018-04-26 11:07:00 +0200 | 
|---|---|---|
| committer | Zog | 2018-04-26 11:07:00 +0200 | 
| commit | 22430fd5f3356986afa784956d89b030646497d1 (patch) | |
| tree | d9673439fa232c75638d392d90fc70377af6f126 | |
| parent | 0becfb7afdc1e439059c1f82ef6860c1c52d7fd6 (diff) | |
| download | chouette-core-22430fd5f3356986afa784956d89b030646497d1.tar.bz2 | |
Refs #6486; Fix bumpy front
| -rw-r--r-- | app/javascript/journey_patterns/components/JourneyPatterns.js | 4 | ||||
| -rw-r--r-- | app/javascript/vehicle_journeys/components/VehicleJourneys.js | 5 | 
2 files changed, 5 insertions, 4 deletions
| diff --git a/app/javascript/journey_patterns/components/JourneyPatterns.js b/app/javascript/journey_patterns/components/JourneyPatterns.js index 91c783189..a16f2a661 100644 --- a/app/javascript/journey_patterns/components/JourneyPatterns.js +++ b/app/javascript/journey_patterns/components/JourneyPatterns.js @@ -25,13 +25,13 @@ export default class JourneyPatterns extends Component {          var refCol = []          $(this).find('.t2e-head').children('div').each(function() { -          var h = $(this).outerHeight(); +          var h = this.getBoundingClientRect().height;            refH.push(h)          });          var i = 0          $(this).find('.t2e-item').children('div').each(function() { -          var h = $(this).outerHeight(); +          var h = this.getBoundingClientRect().height;            if(refCol.length < refH.length){              refCol.push(h)            } else { diff --git a/app/javascript/vehicle_journeys/components/VehicleJourneys.js b/app/javascript/vehicle_journeys/components/VehicleJourneys.js index 0bb00e1ea..feba4e2a6 100644 --- a/app/javascript/vehicle_journeys/components/VehicleJourneys.js +++ b/app/javascript/vehicle_journeys/components/VehicleJourneys.js @@ -112,13 +112,14 @@ export default class VehicleJourneys extends Component {          var refCol = []          $(this).find('.t2e-head').children('div').each(function() { -          var h = $(this).outerHeight(); +          var h = this.getBoundingClientRect().height; +          console.log(h)            refH.push(h)          });          var i = 0          $(this).find('.t2e-item').children('div').each(function() { -          var h = $(this).outerHeight(); +          var h = this.getBoundingClientRect().height;            if(refCol.length < refH.length){              refCol.push(h)            } else { | 
