Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c81e35

Browse files
committed
put _hasPlotType on Plots:
- so that test files can use it to mock the fullLayout
1 parent bb2f49f commit 2c81e35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plots/plots.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ plots.supplyDefaults = function(gd) {
482482
Lib.fillUnique(basePlotModules, fullTrace._module.basePlotModule);
483483
}
484484

485-
// attach helper method
486-
newFullLayout._has = hasPlotType.bind(newFullLayout);
485+
// attach helper method to check whether a plot type is present on graph
486+
newFullLayout._has = plots._hasPlotType.bind(newFullLayout);
487487

488488
// special cases that introduce interactions between traces
489489
for(i = 0; i < modules.length; i++) {
@@ -537,7 +537,7 @@ plots.supplyDefaults = function(gd) {
537537

538538
// helper function to be bound to fullLayout to check
539539
// whether a certain plot type is present on plot
540-
function hasPlotType(category) {
540+
plots._hasPlotType = function(category) {
541541
var basePlotModules = this._basePlotModules || [];
542542

543543
for(var i = 0; i < basePlotModules.length; i++) {

0 commit comments

Comments
 (0)