@@ -46,6 +46,7 @@ function LineWithMarkers(scene, uid) {
4646 this . hoverinfo = 'all' ;
4747 this . connectgaps = true ;
4848
49+ this . index = null ;
4950 this . idToIndex = [ ] ;
5051 this . bounds = [ 0 , 0 , 0 , 0 ] ;
5152
@@ -103,7 +104,7 @@ function LineWithMarkers(scene, uid) {
103104
104105var proto = LineWithMarkers . prototype ;
105106
106- proto . initObject = function ( createFn , options , index ) {
107+ proto . initObject = function ( createFn , options , objIndex ) {
107108 var _this = this ;
108109 var glplot = _this . scene . glplot ;
109110 var options0 = Lib . extendFlat ( { } , options ) ;
@@ -113,7 +114,7 @@ proto.initObject = function(createFn, options, index) {
113114 if ( ! obj ) {
114115 obj = createFn ( glplot , options ) ;
115116 obj . _trace = _this ;
116- obj . _index = index ;
117+ obj . _index = objIndex ;
117118 }
118119 obj . update ( options ) ;
119120 return obj ;
@@ -299,6 +300,9 @@ proto.update = function(options) {
299300 return a . _index - b . _index ;
300301 } ) ;
301302
303+ // set trace index so that scene2d can sort object per traces
304+ this . index = options . index ;
305+
302306 // not quite on-par with 'scatter', but close enough for now
303307 // does not handle the colorscale case
304308 this . color = getTraceColor ( options , { } ) ;
0 commit comments