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

Skip to content

Commit 73d46fe

Browse files
committed
lint: make html2unicode require statement consistent
1 parent e73ab70 commit 73d46fe

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/plots/gl2d/convert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
var Plotly = require('../../plotly');
1313

14-
var htmlToUnicode = require('../../lib/html2unicode');
14+
var convertHTMLToUnicode = require('../../lib/html2unicode');
1515
var str2RGBArray = require('../../lib/str2rgbarray');
1616

1717
function Axes2DOptions(scene) {
@@ -115,7 +115,7 @@ proto.merge = function(options) {
115115

116116
for(j = 0; j <= 2; j += 2) {
117117
this.labelEnable[i + j] = false;
118-
this.labels[i + j] = htmlToUnicode(axTitle);
118+
this.labels[i + j] = convertHTMLToUnicode(axTitle);
119119
this.labelColor[i + j] = str2RGBArray(ax.titlefont.color);
120120
this.labelFont[i + j] = ax.titlefont.family;
121121
this.labelSize[i + j] = ax.titlefont.size;

src/plots/gl2d/scene2d.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var createSelectBox = require('gl-select-box');
1818

1919
var createOptions = require('./convert');
2020
var createCamera = require('./camera');
21-
var htmlToUnicode = require('../../lib/html2unicode');
21+
var convertHTMLToUnicode = require('../../lib/html2unicode');
2222
var showNoWebGlMsg = require('../../lib/show_no_webgl_msg');
2323

2424
var AXES = ['xaxis', 'yaxis'];
@@ -231,7 +231,7 @@ proto.computeTickMarks = function() {
231231
for(var i = 0; i < nextTicks[j].length; ++i) {
232232
// TODO add support for '\n' in gl-plot2d,
233233
// For now, replace '\n' with ' '
234-
nextTicks[j][i].text = htmlToUnicode(nextTicks[j][i].text + '').replace(/\n/g, ' ');
234+
nextTicks[j][i].text = convertHTMLToUnicode(nextTicks[j][i].text + '').replace(/\n/g, ' ');
235235
}
236236
}
237237

src/plots/gl3d/layout/convert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'use strict';
1111

1212
var arrtools = require('arraytools');
13-
var convertHTML = require('../../../lib/html2unicode');
13+
var convertHTMLToUnicode = require('../../../lib/html2unicode');
1414
var str2RgbaArray = require('../../../lib/str2rgbarray');
1515

1616
var arrayCopy1D = arrtools.copy1D;
@@ -77,7 +77,7 @@ proto.merge = function(sceneLayout) {
7777
var axes = sceneLayout[AXES_NAMES[i]];
7878

7979
/////// Axes labels //
80-
opts.labels[i] = convertHTML(axes.title);
80+
opts.labels[i] = convertHTMLToUnicode(axes.title);
8181
if('titlefont' in axes) {
8282
if(axes.titlefont.color) opts.labelColor[i] = str2RgbaArray(axes.titlefont.color);
8383
if(axes.titlefont.family) opts.labelFont[i] = axes.titlefont.family;

src/plots/gl3d/layout/tick_marks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
module.exports = computeTickMarks;
1515

1616
var Plotly = require('../../../plotly');
17-
var convertHTML = require('../../../lib/html2unicode');
17+
var convertHTMLToUnicode = require('../../../lib/html2unicode');
1818

1919
var AXES_NAMES = ['xaxis', 'yaxis', 'zaxis'];
2020

@@ -70,7 +70,7 @@ function computeTickMarks(scene) {
7070
var dataTicks = Plotly.Axes.calcTicks(axes);
7171
for(var j = 0; j < dataTicks.length; ++j) {
7272
dataTicks[j].x = dataTicks[j].x * scene.dataScale[i];
73-
dataTicks[j].text = convertHTML(dataTicks[j].text);
73+
dataTicks[j].text = convertHTMLToUnicode(dataTicks[j].text);
7474
}
7575
ticks[i] = dataTicks;
7676

0 commit comments

Comments
 (0)