Skip to content

Commit 26ca553

Browse files
committed
Fix warning log
1 parent de7ca48 commit 26ca553

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plot_api/subroutines.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var d3 = require('@plotly/d3');
44
var Registry = require('../registry');
55
var Plots = require('../plots/plots');
6+
var Loggers = require('../lib/loggers');
67

78
var Lib = require('../lib');
89
var svgTextUtils = require('../lib/svg_text_utils');
@@ -463,8 +464,8 @@ function getDflts(title) {
463464
}
464465

465466
function setDflts(title, titleY, titleYanchor) {
466-
if(title.yref === 'paper' && title.y !== 0 && title.y !== 1) {
467-
console.warn('title.automargin=true so resetting the supplied title.y value to 1.');
467+
if(title.yref === 'paper' && title.y !== 0 && title.y !== 1 && title.y !== 'auto') {
468+
Loggers.warn('title.automargin=true so resetting the supplied title.y value to 1.');
468469
}
469470
title.y = titleY;
470471
title.yanchor = titleYanchor;

0 commit comments

Comments
 (0)