Skip to content

Commit 07f1b2e

Browse files
committed
Revert four previous commits
This reverts commit 8811849c04b0c13a90f65de812e700970db4fae7.
1 parent 166ffa8 commit 07f1b2e

File tree

7 files changed

+8
-58
lines changed

7 files changed

+8
-58
lines changed

shelly/plotlyjs/static/plotlyjs/compress_attributes.js

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

88
var through = require('through2');
99

10-
var attributeNamesToRemove = [
11-
'description', 'requiredOpts', 'otherOpts', '_hrName', 'role'
12-
];
13-
14-
var regexStr = '';
10+
var attributeNamesToRemove = ['description', 'requiredOpts', 'otherOpts', 'hrName', 'role'],
11+
regexStr = '';
1512

1613
// ref: http://www.regexr.com/3bj6p
1714
attributeNamesToRemove.forEach(function(attr, i) {

shelly/plotlyjs/static/plotlyjs/src/contour.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Plotly.Plots.register(contour, 'contour',
2323

2424
Plotly.Plots.register(contour, 'histogram2dcontour',
2525
['cartesian', '2dMap', 'contour', 'histogram'], {
26-
_hrName: 'histogram_2d_contour',
26+
hrName: 'histogram_2d_contour',
2727
description: [
2828
'The sample data from which statistics are computed is set in `x`',
2929
'and `y` (where `x` and `y` represent marginal distributions,',

shelly/plotlyjs/static/plotlyjs/src/geo/defaults/scattergeo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var ScatterGeo = module.exports = {};
66

77
Plotly.Plots.register(ScatterGeo, 'scattergeo',
88
['geo', 'symbols', 'markerColorscale', 'showLegend'], {
9-
_hrName: 'scatter_geo',
9+
hrName: 'scatter_geo',
1010
description: [
1111
'The data visualized as scatter point or lines on a geographic map',
1212
'is provided either by longitude/latitude pairs in `lon` and `lat`',

shelly/plotlyjs/static/plotlyjs/src/gl3d/defaults/scatter3d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var Scatter3D = module.exports = {};
77

88
Plotly.Plots.register(Scatter3D,
99
'scatter3d', ['gl3d', 'symbols', 'markerColorscale', 'showLegend'], {
10-
_hrName: 'scatter_3d',
10+
hrName: 'scatter_3d',
1111
description: [
1212
'The data visualized as scatter point or lines in 3D dimension',
1313
'is set in `x`, `y`, `z`.',

shelly/plotlyjs/static/plotlyjs/src/histogram.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Plotly.Plots.register(Plotly.Bars, 'histogram',
2525

2626
Plotly.Plots.register(Plotly.Heatmap, 'histogram2d',
2727
['cartesian', '2dMap', 'histogram'], {
28-
_hrName: 'histogram_2d',
28+
hrName: 'histogram_2d',
2929
description: [
3030
'The sample data from which statistics are computed is set in `x`',
3131
'and `y` (where `x` and `y` represent marginal distributions,',
@@ -42,9 +42,6 @@ Plotly.Plots.register(Plotly.Heatmap, 'histogram2d',
4242

4343
function makeBinsAttr(axLetter) {
4444
return {
45-
_hrName: [
46-
axLetter, '_bins'
47-
].join(''),
4845
start: {
4946
valType: 'number',
5047
dflt: null,

shelly/plotlyjs/static/plotlyjs/src/plotschema.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ var extendDeepAll = Plotly.Lib.extendDeepAll;
99
var NESTED_MODULE = '_nestedModules',
1010
COMPOSED_MODULE = '_composedModules',
1111
IS_SUBPLOT_OBJ = '_isSubplotObj',
12-
IS_LINKED_TO_ARRAY = '_isLinkedToArray',
13-
HR_NAME = '_hrName';
12+
IS_LINKED_TO_ARRAY = '_isLinkedToArray';
1413

1514
// list of underscore attributes to keep in schema as is
16-
var UNDERSCORE_ATTRS = ['_isSubplotObj', '_deprecated', '_hrName'];
15+
var UNDERSCORE_ATTRS = ['_isSubplotObj', '_deprecated'];
1716

1817
var plotSchema = {
1918
traces: {},
@@ -207,11 +206,6 @@ function mergeValTypeAndRole(attrs) {
207206
else if(Plotly.Lib.isPlainObject(attr)) {
208207
// all attrs container objects get role 'object'
209208
attr.role = 'object';
210-
211-
// add human-readable attrName for axis object
212-
if(attrName.indexOf('axis') !== -1) {
213-
attr[HR_NAME] = attrName.split('axis')[0] + '_' + 'axis'
214-
}
215209
}
216210
}
217211

shelly/plotlyjs/static/plotlyjs/tests/plotschema_test.js

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -157,42 +157,4 @@ describe('plot schema', function() {
157157
}
158158
);
159159
});
160-
161-
it('axis and bin attributes should have `human-readable name` field', function() {
162-
var HR_NAME = '_hrName';
163-
164-
assertPlotSchema(
165-
function(attr, attrName) {
166-
if(isValObject(attr) || !isPlainObject(attr)) return;
167-
168-
if(attrName === 'xbins') {
169-
expect(attr[HR_NAME]).toEqual('x_bins');
170-
}
171-
else if(attrName === 'ybins') {
172-
expect(attr[HR_NAME]).toEqual('y_bins');
173-
}
174-
else if(attrName === 'xaxis') {
175-
expect(attr[HR_NAME]).toEqual('x_axis');
176-
}
177-
else if(attrName === 'yaxis') {
178-
expect(attr[HR_NAME]).toEqual('y_axis');
179-
}
180-
else if(attrName === 'zaxis') {
181-
expect(attr[HR_NAME]).toEqual('z_axis');
182-
}
183-
else if(attrName === 'lonaxis') {
184-
expect(attr[HR_NAME]).toEqual('lon_axis');
185-
}
186-
else if(attrName === 'lataxis') {
187-
expect(attr[HR_NAME]).toEqual('lat_axis');
188-
}
189-
else if(attrName === 'radialaxis') {
190-
expect(attr[HR_NAME]).toEqual('radial_axis');
191-
}
192-
else if(attrName === 'angularaxis') {
193-
expect(attr[HR_NAME]).toEqual('angular_axis');
194-
}
195-
}
196-
)
197-
});
198160
});

0 commit comments

Comments
 (0)