Skip to content

Commit

Permalink
fix to opacity in 3d mode (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 authored and mbarto committed Mar 16, 2017
1 parent 139ca28 commit b3793fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/client/components/map/cesium/Layer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const CesiumLayer = React.createClass({
},
setLayerOpacity(opacity) {
var oldOpacity = (this.props.options && this.props.options.opacity !== undefined) ? this.props.options.opacity : 1.0;
if (opacity !== oldOpacity && this.layer) {
if (opacity !== oldOpacity && this.layer && this.provider) {
this.provider.alpha = opacity;
}
},
Expand Down
6 changes: 3 additions & 3 deletions web/client/reducers/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ function layers(state = [], action) {
const selector = action.nodeType === 'groups' ? 'group' : 'id';

// const newGroups = action.options && action.options.group && action.options.group !== layer;
let sameGroup = false;
let sameGroup = action.options.hasOwnProperty("group") ? false : true;

const newLayers = flatLayers.map((layer) => {
if (layer[selector] === action.node || layer[selector].indexOf(`{action.node}.`) === 0) {
if (!action.options.hasOwnProperty("group") || layer.group === (action.options.group || 'Default')) {
if (layer[selector] === action.node || layer[selector].indexOf(action.node + '.') === 0) {
if (layer.group === (action.options.group || 'Default')) {
// If the layer didn't change group, raise a flag to prevent groups update
sameGroup = true;
}
Expand Down

0 comments on commit b3793fe

Please sign in to comment.