Skip to content

Commit

Permalink
fix(ControlPointsLayer): fix toggling of control points
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Mar 7, 2017
1 parent e565c07 commit e8d3c58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/editor/components/map/ControlPointsLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class ControlPointsLayer extends Component {
stops,
activePattern,
controlPoints,
snapToStops,
editSettings,
handleControlPointDrag,
handleControlPointDragEnd,
removeControlPoint,
Expand All @@ -43,10 +43,10 @@ export default class ControlPointsLayer extends Component {
} = this.props
return (
<FeatureGroup ref='controlPoints'>
{stops && activePattern && activePattern.shape && controlPoints
{stops && activePattern && activePattern.shape && editSettings.editGeometry && controlPoints
? controlPoints.map((cp, index) => {
// don't include controlPoint on end of segment (for now) or hidden controlPoints
if (cp.stopId && snapToStops) {
if (cp.stopId && editSettings.snapToStops) {
return null
}
const position = cp.point
Expand Down
2 changes: 1 addition & 1 deletion lib/editor/components/map/EditorMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default class EditorMap extends Component {
<ControlPointsLayer
stops={stops}
activePattern={activePattern}
snapToStops={editSettings.snapToStops}
editSettings={editSettings}
handlePatternEdit={this.props.handlePatternEdit}
handleControlPointDrag={this.props.handleControlPointDrag}
handleControlPointDragEnd={this.props.handleControlPointDragEnd}
Expand Down

0 comments on commit e8d3c58

Please sign in to comment.