Skip to content

Commit

Permalink
Merge pull request #4006 from NCI-Agency/fix-map-initialization-error
Browse files Browse the repository at this point in the history
Fix some UI bugs
  • Loading branch information
midmarch authored Apr 1, 2022
2 parents a75ba41 + 1b4cc28 commit 4ebecb6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions client/src/components/Leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ const Leaflet = ({
setMarkerLayer(newMarkerLayer)

setDoInitializeMarkerLayer(true)

// Destroy map when done
return () => newMap.remove()
}, [mapId])

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/dashboards/BoardDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const BoardDashboard = ({ pageDispatchers }) => {
{edit && (
<>
<Card variant="primary">
<Card.Heading>Node palette</Card.Heading>
<Card.Header>Node palette</Card.Header>
<Card.Body style={{ display: "flex", flexDirection: "column" }}>
{Object.values(Models).map(Model => {
const instance = new Model()
Expand All @@ -296,7 +296,7 @@ const BoardDashboard = ({ pageDispatchers }) => {
</Card.Body>
</Card>
<Card variant="primary">
<Card.Heading>Node editor</Card.Heading>
<Card.Header>Node editor</Card.Header>
<Card.Body>
{editedNode ? (
<>
Expand Down
4 changes: 3 additions & 1 deletion client/src/pages/dashboards/DiagramNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { SPECIAL_WIDGET_TYPES } from "components/CustomFields"
import LinkTo from "components/LinkTo"
import { CUSTOM_FIELD_TYPE, GRAPHQL_ENTITY_FIELDS } from "components/Model"
import { GRAPHQL_NOTES_FIELDS } from "components/RelatedObjectNotes"
import _isEmpty from "lodash/isEmpty"
import * as Models from "models"
import moment from "moment"
import { PERIOD_FACTORIES, RECURRENCE_TYPE } from "periodUtils"
Expand Down Expand Up @@ -125,7 +126,8 @@ export const DiagramNodeWidget = ({ size, node, engine }) => {
const instantAssessmentConfig =
anetObject && anetObject.getInstantAssessmentConfig()
const instantAssessmentResults =
instantAssessmentConfig && anetObject.getInstantAssessmentResults(period)
!_isEmpty(instantAssessmentConfig) &&
anetObject.getInstantAssessmentResults(period)
return (
<div
className="diagram-node"
Expand Down

0 comments on commit 4ebecb6

Please sign in to comment.