Skip to content

Commit

Permalink
Fix AxesLayer for the plot example (visgl#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaojing Li authored Jul 19, 2017
1 parent e12f025 commit 16ac706
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/plot/plot-layer/axes-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default class AxesLayer extends Layer {
models.labels.setAttributes(changedAttributes);
}

draw({uniforms}) {
draw({uniforms, moduleParameters}) {
const {gridDims, gridCenter, models, labelTexture} = this.state;
const {fontSize, color, padding} = this.props;

Expand All @@ -182,8 +182,12 @@ export default class AxesLayer extends Layer {
strokeColor: color
};

models.grids.render(Object.assign({}, uniforms, baseUniforms));
if (moduleParameters) {
models.grids.updateModuleSettings(moduleParameters);
models.labels.updateModuleSettings(moduleParameters);
}

models.grids.render(Object.assign({}, uniforms, baseUniforms));
models.labels.render(Object.assign({}, uniforms, baseUniforms, labelTexture));
}
}
Expand Down

0 comments on commit 16ac706

Please sign in to comment.