Skip to content

Commit 16abdfb

Browse files
committed
lint: rename variaible 'mapbox' -> 'subplot'
... to be consistent with traces/*mapbox/ modules
1 parent 6370fd2 commit 16abdfb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/plots/mapbox/layers.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
var Lib = require('../../lib');
1212
var convertTextOpts = require('./convert_text_opts');
1313

14-
function MapboxLayer(mapbox, index) {
15-
this.mapbox = mapbox;
16-
this.map = mapbox.map;
14+
function MapboxLayer(subplot, index) {
15+
this.subplot = subplot;
16+
this.map = subplot.map;
1717

18-
this.uid = mapbox.uid + '-' + 'layer' + index;
18+
this.uid = subplot.uid + '-' + 'layer' + index;
1919

2020
this.idSource = this.uid + '-source';
2121
this.idLayer = this.uid + '-layer';
@@ -108,8 +108,8 @@ proto.updateLayer = function(opts) {
108108
proto.updateStyle = function(opts) {
109109
if(isVisible(opts)) {
110110
var convertedOpts = convertOpts(opts);
111-
this.mapbox.setOptions(this.idLayer, 'setLayoutProperty', convertedOpts.layout);
112-
this.mapbox.setOptions(this.idLayer, 'setPaintProperty', convertedOpts.paint);
111+
this.subplot.setOptions(this.idLayer, 'setLayoutProperty', convertedOpts.layout);
112+
this.subplot.setOptions(this.idLayer, 'setPaintProperty', convertedOpts.paint);
113113
}
114114
};
115115

@@ -222,8 +222,8 @@ function convertSourceOpts(opts) {
222222
return sourceOpts;
223223
}
224224

225-
module.exports = function createMapboxLayer(mapbox, index, opts) {
226-
var mapboxLayer = new MapboxLayer(mapbox, index);
225+
module.exports = function createMapboxLayer(subplot, index, opts) {
226+
var mapboxLayer = new MapboxLayer(subplot, index);
227227

228228
mapboxLayer.update(opts);
229229

0 commit comments

Comments
 (0)