Skip to content

Commit 5427dc0

Browse files
committed
mojtaba-proof logic
1 parent e89eb06 commit 5427dc0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plots/mapbox/mapbox.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,16 @@ proto.updateData = function(calcData) {
315315
trace = calcTrace[0].trace;
316316
traceObj = traceHash[trace.uid];
317317

318+
var didUpdate = false;
318319
if(traceObj) {
319320
if(traceObj.type === trace.type) {
320321
traceObj.update(calcTrace);
322+
didUpdate = true;
321323
} else {
322324
traceObj.dispose();
323-
traceHash[trace.uid] = trace._module.plot(this, calcTrace);
324325
}
325-
} else if(trace._module) {
326+
}
327+
if(!didUpdate && trace._module) {
326328
traceHash[trace.uid] = trace._module.plot(this, calcTrace);
327329
}
328330
}

0 commit comments

Comments
 (0)