Skip to content

Commit

Permalink
Fix #2709 minor fixes to annotations and measure tool (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 authored Mar 7, 2018
1 parent 45cad05 commit 82e6ec2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ class AnnotationsEditor extends React.Component {
visible: true,
onClick: () => {
if (this.props.unsavedChanges) {
this.props.onToggleUnsavedChangesModal();
const errors = this.validate();
if (Object.keys(errors).length === 0) {
this.props.onToggleUnsavedChangesModal();
} else {
this.props.onError(errors);
}
} else {
this.cancelEdit();
}}
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/style/TextStyler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TextStyler extends React.Component {
uomValues: [{value: "px"}, {value: "em"}],
fontWeightValues: [{value: "normal"}, {value: "bold"}],
alignValues: [{value: "start"}, {value: "center"}, {value: "end"}],
fontStyleValues: [{value: "start"}, {value: "center"}, {value: "end"}],
fontStyleValues: [{value: "normal"}, {value: "italic"}],
fontFamilyValues: [{value: "Arial"}, {value: "FontAwesome"}, {value: "Courier"}],
shapeStyle: {},
setStyleParameter: () => {}
Expand Down
6 changes: 4 additions & 2 deletions web/client/reducers/measurement.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ function measurement(state = defaultState, action) {
lineMeasureEnabled: false,
areaMeasureEnabled: false,
bearingMeasureEnabled: false,
feature: {}
feature: {},
geomType: ""
};
}
}
Expand All @@ -99,7 +100,8 @@ function measurement(state = defaultState, action) {
lineMeasureEnabled: false,
areaMeasureEnabled: false,
bearingMeasureEnabled: false,
feature: {}
feature: {},
geomType: ""
};
}
default:
Expand Down

0 comments on commit 82e6ec2

Please sign in to comment.