@@ -46,6 +46,7 @@ function LineWithMarkers(scene, uid) {
46
46
this . hoverinfo = 'all' ;
47
47
this . connectgaps = true ;
48
48
49
+ this . index = null ;
49
50
this . idToIndex = [ ] ;
50
51
this . bounds = [ 0 , 0 , 0 , 0 ] ;
51
52
@@ -103,7 +104,7 @@ function LineWithMarkers(scene, uid) {
103
104
104
105
var proto = LineWithMarkers . prototype ;
105
106
106
- proto . initObject = function ( createFn , options , index ) {
107
+ proto . initObject = function ( createFn , options , objIndex ) {
107
108
var _this = this ;
108
109
var glplot = _this . scene . glplot ;
109
110
var options0 = Lib . extendFlat ( { } , options ) ;
@@ -113,7 +114,7 @@ proto.initObject = function(createFn, options, index) {
113
114
if ( ! obj ) {
114
115
obj = createFn ( glplot , options ) ;
115
116
obj . _trace = _this ;
116
- obj . _index = index ;
117
+ obj . _index = objIndex ;
117
118
}
118
119
obj . update ( options ) ;
119
120
return obj ;
@@ -299,6 +300,9 @@ proto.update = function(options) {
299
300
return a . _index - b . _index ;
300
301
} ) ;
301
302
303
+ // set trace index so that scene2d can sort object per traces
304
+ this . index = options . index ;
305
+
302
306
// not quite on-par with 'scatter', but close enough for now
303
307
// does not handle the colorscale case
304
308
this . color = getTraceColor ( options , { } ) ;
0 commit comments