File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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/**
You can’t perform that action at this time.
0 commit comments