Skip to content

Commit 744f3c8

Browse files
committedJun 30, 2017
rename glTrace ref on scattergl fullTrace to _glTrace
- ... as it should have been all along, non-attribute keys in fullTrace (and fullLayout for that matter) should be named with a leading underscore. - scattergl glTrace ref is now consistent with the scattermapbox version
1 parent 294e5f6 commit 744f3c8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎src/lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ lib.minExtend = function(obj1, obj2) {
451451
for(i = 0; i < keys.length; i++) {
452452
k = keys[i];
453453
v = obj1[k];
454-
if(k.charAt(0) === '_' || typeof v === 'function' || k === 'glTrace') continue;
454+
if(k.charAt(0) === '_' || typeof v === 'function') continue;
455455
else if(k === 'module') objOut[k] = v;
456456
else if(Array.isArray(v)) objOut[k] = v.slice(0, arrayLen);
457457
else if(v && (typeof v === 'object')) objOut[k] = lib.minExtend(obj1[k], obj2[k]);

‎src/traces/scattergl/convert.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ proto.update = function(options, cdscatter) {
322322
this.color = getTraceColor(options, {});
323323

324324
// provide reference for selecting points
325-
if(cdscatter && cdscatter[0] && !cdscatter[0].glTrace) {
326-
cdscatter[0].glTrace = this;
325+
if(cdscatter && cdscatter[0] && !cdscatter[0]._glTrace) {
326+
cdscatter[0]._glTrace = this;
327327
}
328328
};
329329

‎src/traces/scattergl/select.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ module.exports = function selectPoints(searchInfo, polygon) {
2222
x,
2323
y;
2424

25-
var scattergl = cd[0].glTrace;
26-
var scene = cd[0].glTrace.scene;
25+
var glTrace = cd[0]._glTrace;
26+
var scene = glTrace.scene;
2727

2828
var hasOnlyLines = (!subtypes.hasMarkers(trace) && !subtypes.hasText(trace));
2929
if(trace.visible !== true || hasOnlyLines) return;
@@ -53,7 +53,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
5353
// highlight selected points here
5454
trace.selection = selection;
5555

56-
scattergl.update(trace, cd);
56+
glTrace.update(trace, cd);
5757
scene.glplot.setDirty();
5858

5959
return selection;

0 commit comments

Comments
 (0)
Please sign in to comment.