8000 Issue 0179 by archmoj · Pull Request #3299 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Issue 0179 #3299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
world > object
  • Loading branch information
archmoj committed Nov 28, 2018
commit 7da5c089597297e8c0a2029895d93901e51e71d5
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"gl-select-box": "^1.0.2",
"gl-spikes2d": "^1.0.1",
"gl-streamtube3d": "^1.1.1",
"gl-surface3d": "git://github.com/gl-vis/gl-surface3d.git#7fd01b7ba97bb6b09023bf9f97430081ac72eccc",
"gl-surface3d": "git://github.com/gl-vis/gl-surface3d.git#e67d13b4491a2f18eeb284afc9172f8eee21f62e",
"gl-text": "^1.1.6",
"glslify": "^6.3.1",
"has-hover": "^1.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/plots/gl3d/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ function computeTraceBounds(scene, trace, bounds) {
}

if(trace.type === 'surface') {
bounds[0][d] += trace._worldOffset[d];
bounds[1][d] += trace._worldOffset[d];
bounds[0][d] += trace._objectOffset[d];
bounds[1][d] += trace._objectOffset[d];
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/traces/surface/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ proto.update = function(data) {
}

for(i = 0; i < 3; i++) {
data._worldOffset[i] = this.midValues[i] = 0.5 * (this.minValues[i] + this.maxValues[i]);
data._objectOffset[i] = this.midValues[i] = 0.5 * (this.minValues[i] + this.maxValues[i]);
}

for(i = 0; i < 3; i++) {
Expand Down Expand Up @@ -534,13 +534,13 @@ proto.update = function(data) {
params.vertexColor = true;
}

params.worldOffset = [
data._worldOffset[0],
data._worldOffset[1],
data._worldOffset[2]
params.objectOffset = [
data._objectOffset[0],
data._objectOffset[1],
data._objectOffset[2]
];

params.worldScale = [
params.objectScale = [
scaleFactor[0],
scaleFactor[1],
scaleFactor[2]
Expand Down
2 changes: 1 addition & 1 deletion src/traces/surface/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
traceOut._xlength = (Array.isArray(x) && Lib.isArrayOrTypedArray(x[0])) ? z.length : z[0].length;
traceOut._ylength = z.length;

traceOut._worldOffset = [0, 0, 0];
traceOut._objectOffset = [0, 0, 0];

var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
Expand Down
0