Skip to content

Commit f6be7ef

Browse files
authored
Merge pull request #45 from conveyal/dev
New release
2 parents db1790b + 1b471af commit f6be7ef

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

lib/core/network.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,13 @@ export default class Network {
239239
var edge = edgeGroup.edges[e]
240240
this.graph.splitEdgeAtInternalPoints(edge, splitPoints)
241241
}
242+
} else if (edgeGroup.hasTransit()) {
243+
// special case: transit edge with no internal vertices (i.e. intermediate stops)
244+
edgeGroup.edges.forEach(edge => {
245+
if (edge.pointGeom && edge.pointGeom.length > 0) {
246+
edge.geomCoords = edge.pointGeom[0].slice(0)
247+
}
248+
})
242249
}
243250
}
244251
}

lib/display/display.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ export default class Display {
226226
}
227227

228228
resized () {
229-
var newWidth = this.el.clientWidth
230-
var newHeight = this.el.clientHeight
229+
var newWidth = this.el ? this.el.clientWidth : this.svgContainer.clientWidth
230+
var newHeight = this.el ? this.el.clientHeight : this.svgContainer.clientHeight
231231

232232
var xDomain = this.xScale.domain()
233233
var xFactor = newWidth / this.width

lib/transitive.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ export default class Transitive {
223223
.style('height', height + 'px')
224224
this.display.resized()
225225
}
226+
227+
/**
228+
* trigger a display resize action (for externally-managed SVG containers)
229+
*/
230+
231+
resized () {
232+
this.display.resized()
233+
}
226234
}
227235

228236
/**

0 commit comments

Comments
 (0)