Skip to content

Commit df7ad45

Browse files
committed
rename option to raw
1 parent 5808be2 commit df7ad45

13 files changed

+28
-26
lines changed

draftlogs/6938_add.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Add "raw" sizemode to cone trace [[#6938](https://github.com/plotly/plotly.js/pull/6938)]
2+

src/traces/cone/attributes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ var attrs = {
9696

9797
sizemode: {
9898
valType: 'enumerated',
99-
values: ['scaled', 'absolute', 'vector'],
99+
values: ['scaled', 'absolute', 'raw'],
100100
editType: 'calc',
101101
dflt: 'scaled',
102102
description: [
103103
'Determines whether `sizeref` is set as a *scaled* (i.e unitless) scalar',
104104
'(normalized by the max u/v/w norm in the vector field) or as',
105105
'*absolute* value (in the same units as the vector field).',
106-
'To display sizes in actual vector scale use *vector*.'
106+
'To display sizes in actual vector length use *raw*.'
107107
].join(' ')
108108
},
109109
sizeref: {
@@ -116,8 +116,8 @@ var attrs = {
116116
'This factor (computed internally) corresponds to the minimum "time" to travel across',
117117
'two successive x/y/z positions at the average velocity of those two successive positions.',
118118
'All cones in a given trace use the same factor.',
119-
'With `sizemode` set to *vector*, its default value is *1*',
120-
'With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5*',
119+
'With `sizemode` set to *raw*, its default value is *1*.',
120+
'With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5*.',
121121
'With `sizemode` set to *absolute*, `sizeref` has the same units as the u/v/w vector field,',
122122
'its the default value is half the sample\'s maximum vector norm.'
123123
].join(' ')

src/traces/cone/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function convert(scene, trace) {
8989
coneOpts.coneSize = trace.sizeref && trace._normMax ?
9090
trace.sizeref / trace._normMax :
9191
0.5;
92-
} else if(sizemode === 'vector') {
92+
} else if(sizemode === 'raw') {
9393
coneOpts.coneSize = trace.sizeref;
9494
}
9595
coneOpts.coneSizemode = sizemode;

src/traces/cone/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
2727
}
2828

2929
var sizemode = coerce('sizemode');
30-
coerce('sizeref', sizemode === 'vector' ? 1 : 0.5);
30+
coerce('sizeref', sizemode === 'raw' ? 1 : 0.5);
3131

3232
coerce('anchor');
3333

stackgl_modules/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13782,7 +13782,7 @@ module.exports = function(vectorfield, bounds) {
1378213782
var positionVectors = [];
1378313783
var vectorScale = Infinity;
1378413784
var skipIt = false;
13785-
var vectorSizemode = vectorfield.coneSizemode === 'vector';
13785+
var vectorSizemode = vectorfield.coneSizemode === 'raw';
1378613786
for (var i = 0; i < positions.length; i++) {
1378713787
var p = positions[i];
1378813788
minX = Math.min(p[0], minX);

stackgl_modules/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stackgl_modules/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"box-intersect": "plotly/box-intersect#v1.1.0",
1414
"convex-hull": "^1.0.3",
1515
"delaunay-triangulate": "^1.1.6",
16-
"gl-cone3d": "github:gl-vis/gl-cone3d#9cf07db8d3526dbe85e9fa671857416cc3ed63e2",
16+
"gl-cone3d": "github:gl-vis/gl-cone3d#846764e2c95157fcfcf1ef264401c3cf665faaaa",
1717
"gl-error3d": "^1.0.16",
1818
"gl-heatmap2d": "^1.1.1",
1919
"gl-line3d": "1.2.1",
Loading
Loading

test/image/mocks/zz-gl3d_cone-sizemode_vector.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"u": [1, 0, 0],
99
"v": [0, 3, 0],
1010
"w": [0, 0, 2],
11-
"sizemode": "vector",
11+
"sizemode": "raw",
1212
"anchor": "tip",
1313
"colorbar": {
14-
"title": { "text": "vector<br>sizeref: 1" },
14+
"title": { "text": "raw<br>sizeref: 1" },
1515
"x": 0,
1616
"xanchor": "right"
1717
}
@@ -24,10 +24,10 @@
2424
"u": [0.5, 0, 0],
2525
"v": [0, 1.5, 0],
2626
"w": [0, 0, 1],
27-
"sizemode": "vector",
27+
"sizemode": "raw",
2828
"anchor": "tip",
2929
"colorbar": {
30-
"title": { "text": "vector<br>sizeref: 1" }
30+
"title": { "text": "rawr<br>sizeref: 1" }
3131
},
3232
"scene": "scene2"
3333
}

test/image/mocks/zz-gl3d_cone-sizemode_vector2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"u": [1, 0, 0],
99
"v": [0, 3, 0],
1010
"w": [0, 0, 2],
11-
"sizemode": "vector",
11+
"sizemode": "raw",
1212
"anchor": "tip",
1313
"sizeref": 0.5,
1414
"colorbar": {
15-
"title": { "text": "vector<br>sizeref: 2" },
15+
"title": { "text": "raw<br>sizeref: 2" },
1616
"x": 0,
1717
"xanchor": "right"
1818
}
@@ -25,11 +25,11 @@
2525
"u": [0.5, 0, 0],
2626
"v": [0, 1.5, 0],
2727
"w": [0, 0, 1],
28-
"sizemode": "vector",
28+
"sizemode": "raw",
2929
"anchor": "tip",
3030
"sizeref": 2,
3131
"colorbar": {
32-
"title": { "text": "vector<br>sizeref: 2" }
32+
"title": { "text": "raw<br>sizeref: 2" }
3333
},
3434
"scene": "scene2"
3535
}

test/image/mocks/zz-gl3d_cone-sizemode_vector3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"data": [
33
{
44
"type": "cone",
5-
"sizemode": "vector",
5+
"sizemode": "raw",
66
"anchor": "tip",
77
"u": [
88
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

test/plot-schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22456,18 +22456,18 @@
2245622456
"valType": "boolean"
2245722457
},
2245822458
"sizemode": {
22459-
"description": "Determines whether `sizeref` is set as a *scaled* (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as *absolute* value (in the same units as the vector field). To display sizes in actual vector scale use *vector*.",
22459+
"description": "Determines whether `sizeref` is set as a *scaled* (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as *absolute* value (in the same units as the vector field). To display sizes in actual vector length use *raw*.",
2246022460
"dflt": "scaled",
2246122461
"editType": "calc",
2246222462
"valType": "enumerated",
2246322463
"values": [
2246422464
"scaled",
2246522465
"absolute",
22466-
"vector"
22466+
"raw"
2246722467
]
2246822468
},
2246922469
"sizeref": {
22470-
"description": "Adjusts the cone size scaling. The size of the cones is determined by their u/v/w norm multiplied a factor and `sizeref`. This factor (computed internally) corresponds to the minimum \"time\" to travel across two successive x/y/z positions at the average velocity of those two successive positions. All cones in a given trace use the same factor. With `sizemode` set to *vector*, its default value is *1* With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5* With `sizemode` set to *absolute*, `sizeref` has the same units as the u/v/w vector field, its the default value is half the sample's maximum vector norm.",
22470+
"description": "Adjusts the cone size scaling. The size of the cones is determined by their u/v/w norm multiplied a factor and `sizeref`. This factor (computed internally) corresponds to the minimum \"time\" to travel across two successive x/y/z positions at the average velocity of those two successive positions. All cones in a given trace use the same factor. With `sizemode` set to *raw*, its default value is *1*. With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5*. With `sizemode` set to *absolute*, `sizeref` has the same units as the u/v/w vector field, its the default value is half the sample's maximum vector norm.",
2247122471
"editType": "calc",
2247222472
"min": 0,
2247322473
"valType": "number"

0 commit comments

Comments
 (0)