aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-04-26 11:07:00 +0200
committerZog2018-04-26 11:07:00 +0200
commit22430fd5f3356986afa784956d89b030646497d1 (patch)
treed9673439fa232c75638d392d90fc70377af6f126
parent0becfb7afdc1e439059c1f82ef6860c1c52d7fd6 (diff)
downloadchouette-core-22430fd5f3356986afa784956d89b030646497d1.tar.bz2
Refs #6486; Fix bumpy front
-rw-r--r--app/javascript/journey_patterns/components/JourneyPatterns.js4
-rw-r--r--app/javascript/vehicle_journeys/components/VehicleJourneys.js5
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 {