Commit 2ceb6d5b authored by Sonja Happ's avatar Sonja Happ

remove typos and add some TODOs

parent 6fe522fe
......@@ -58,7 +58,7 @@ class EditWidgetDialog extends React.Component {
assignAspectRatio(changeObject, fileId) {
// get aspect ratio of file
const file = this.props.files.find(element => element._id === fileId);
const file = this.props.files.find(element => element.id === fileId);
// scale width to match aspect
const aspectRatio = file.dimensions.width / file.dimensions.height;
......
......@@ -89,10 +89,12 @@ class Widget extends React.Component {
param: '?objectID=1&objectType=widget'
});*/
// TODO no not load simulation models here, since they are loaded via the scenario, pass them as props
AppDispatcher.dispatch({
type: 'simulationModels/start-load',
token: this.state.sessionToken,
param: '?scenarioID=1'
param: '?scenarioID=1' // TODO do not hardcode scenarioID!
});
}
......@@ -101,7 +103,7 @@ class Widget extends React.Component {
let simulationModel = null;
for (let model of this.state.simulationModels) {
if (model._id !== widget.simulationModel) {
if (model.id !== widget.simulationModel) {
continue;
}
......@@ -120,7 +122,7 @@ class Widget extends React.Component {
let simulationModel = null;
for (let model of this.state.simulationModels) {
if (model._id !== widget.simulationModel) {
if (model.id !== widget.simulationModel) {
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment