Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02b9fbc

Browse filesBrowse files
committed
rename 'layers' cartesian constant -> 'traceLayerClasses'
- which is more meaningul - other misc lint
1 parent 7b62b73 commit 02b9fbc
Copy full SHA for 02b9fbc

File tree

4 files changed

+8
-9
lines changed
Filter options

4 files changed

+8
-9
lines changed

‎src/plot_api/subroutines.js

Copy file name to clipboardExpand all lines: src/plot_api/subroutines.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ exports.lsInner = function(gd) {
180180

181181
Drawing.setClipUrl(plotinfo.plot, plotClipId);
182182

183-
for(i = 0; i < cartesianConstants.layers.length; i++) {
184-
var layer = cartesianConstants.layers[i];
183+
for(i = 0; i < cartesianConstants.traceLayerClasses.length; i++) {
184+
var layer = cartesianConstants.traceLayerClasses[i];
185185
if(layer !== 'scatterlayer') {
186186
plotinfo.plot.selectAll('g.' + layer).call(Drawing.setClipUrl, layerClipId);
187187
}

‎src/plots/cartesian/constants.js

Copy file name to clipboardExpand all lines: src/plots/cartesian/constants.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ module.exports = {
5151
DFLTRANGEX: [-1, 6],
5252
DFLTRANGEY: [-1, 4],
5353

54-
// Layers to keep plot types in the right order.
54+
// Layers to keep trace types in the right order.
5555
// from back to front:
5656
// 1. heatmaps, 2D histos and contour maps
5757
// 2. bars / 1D histos
5858
// 3. errorbars for bars and scatter
5959
// 4. scatter
6060
// 5. box plots
61-
layers: [
61+
traceLayerClasses: [
6262
'imagelayer',
6363
'maplayer',
6464
'barlayer',

‎src/plots/cartesian/index.js

Copy file name to clipboardExpand all lines: src/plots/cartesian/index.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ function makeSubplotLayer(plotinfo) {
339339

340340
// common attributes for all subplots, overlays or not
341341

342-
for(var i = 0; i < constants.layers.length; i++) {
343-
joinLayer(plotinfo.plot, 'g', constants.layers[i]);
342+
for(var i = 0; i < constants.traceLayerClasses.length; i++) {
343+
joinLayer(plotinfo.plot, 'g', constants.traceLayerClasses[i]);
344344
}
345345

346346
plotinfo.xlines

‎test/jasmine/tests/scatter_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/scatter_test.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ describe('scatter hoverPoints', function() {
675675
});
676676
});
677677

678-
describe('Test scatter *clipnaxis*', function() {
678+
describe('Test scatter *clipnaxis*:', function() {
679679
afterEach(destroyGraphDiv);
680680

681681
it('should show/hide point/text/errorbars in clipped and non-clipped layers', function(done) {
@@ -684,7 +684,7 @@ describe('Test scatter *clipnaxis*', function() {
684684
var xRange0 = fig.layout.xaxis.range.slice();
685685
var yRange0 = fig.layout.yaxis.range.slice();
686686

687-
// only show *cliponaxis: false* trace
687+
// only show 1 *cliponaxis: false* trace
688688
fig.data = [fig.data[2]];
689689

690690
// add lines
@@ -805,5 +805,4 @@ describe('Test scatter *clipnaxis*', function() {
805805
.catch(fail)
806806
.then(done);
807807
});
808-
809808
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.