Skip to content

Commit

Permalink
update layout with annotation control panel
Browse files Browse the repository at this point in the history
  • Loading branch information
JayWebz committed Oct 20, 2021
1 parent 7427232 commit 60f5cfd
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 140 deletions.
17 changes: 13 additions & 4 deletions assets/css/ioda/sass/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

&__row {
@include panel;

&--annotation {
padding: 0 0 2rem;
}
}

&__content {
Expand Down Expand Up @@ -181,7 +185,7 @@

&__control-panel-row {
display: flex;
justify-content: flex-start;
justify-content: center;
margin-bottom: 1rem;
}

Expand Down Expand Up @@ -236,10 +240,15 @@
}

& .annotation {
position: relative;
padding: 2rem;

&__canvas {
position: absolute;

&__drawingLocked {
pointer-events: none;
&--drawingLocked {
pointer-events: none;
}
}
}

Expand Down Expand Up @@ -377,7 +386,7 @@
min-width: 26rem;
max-width:52rem;
height: 5rem;
margin: 3rem auto;
margin: 3rem auto 0;
border-radius: 0.5rem;
background: linear-gradient(2deg, #1A5DAE, #598DCC, #1A5DAE, #598DCC);
color: $color-white;
Expand Down
15 changes: 10 additions & 5 deletions assets/css/style.comp.css
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,8 @@ body {
box-shadow: 0 1px 2px #9F9D9D;
padding: 2rem;
margin-bottom: 2rem; }
.modal__row--annotation {
padding: 0 0 2rem; }

.modal__content .col-2-of-3 {
background-color: #fff;
Expand Down Expand Up @@ -2297,7 +2299,7 @@ body {

.chartShare__modal__control-panel-row {
display: flex;
justify-content: flex-start;
justify-content: center;
margin-bottom: 1rem; }

.chartShare__modal__control-panel-col {
Expand Down Expand Up @@ -2333,9 +2335,12 @@ body {
z-index: 15; }

.chartShare__modal .annotation {
position: absolute; }
.chartShare__modal .annotation__drawingLocked {
pointer-events: none; }
position: relative;
padding: 2rem; }
.chartShare__modal .annotation__canvas {
position: absolute; }
.chartShare__modal .annotation__canvas--drawingLocked {
pointer-events: none; }

.chartShare__modal .related__modal-button-img {
height: 2.4rem;
Expand Down Expand Up @@ -2487,7 +2492,7 @@ body {
min-width: 26rem;
max-width: 52rem;
height: 5rem;
margin: 3rem auto;
margin: 3rem auto 0;
border-radius: 0.5rem;
background: linear-gradient(2deg, #1A5DAE, #598DCC, #1A5DAE, #598DCC);
color: #fff;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/style.css

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions assets/css/style.prefix.css

Large diffs are not rendered by default.

230 changes: 113 additions & 117 deletions assets/js/Ioda/components/modal/XyChartModal.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/js/Ioda/data/DataReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import {
GET_ADDITIONAL_RAW_SIGNAL
} from './ActionCommons';

// TODO: make sure the state won't overwrite each other when multiple calls are executed
const initialState = {
entities: null,
relatedToMapSummary: null,
Expand Down
6 changes: 3 additions & 3 deletions assets/js/Ioda/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- `datasources`: available data sources used in IODA
- `signals`: for timeseries graphs
- `alerts`: for building alerts tables
- `events`: not sure where it fits
- `summary`: for building events tables on the right of the map
- `events`: for building events tables
- `summary`: for building event scores on the right of the map

### Actions

Expand Down Expand Up @@ -62,7 +62,7 @@ const mapDispatchToProps = (dispatch) => {

Then in the rest of the PHP code, you can use the defined field
`suggestedSearchResults` and `searchEntitiesActions` in props to access the data
and function calls according.
and function calls accordingly.

Accessing data:
``` javascript
Expand Down
2 changes: 1 addition & 1 deletion assets/js/Ioda/pages/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class Dashboard extends Component {
this.setState({
searchTerm: query
});
}
};
// Function that returns search bar passed into control panel
populateSearchBar() {
return <Searchbar placeholder={T.translate("controlPanel.searchBarPlaceholder")}
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
"react-twitter-embed": "^3.0.3",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"topojson": "1.6.18"
"topojson": "1.6.18",
"watermarkjs": "^2.1.1"
},
"browserslist": {
"production": [
Expand Down

0 comments on commit 60f5cfd

Please sign in to comment.