mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
remove typos and add some TODOs
This commit is contained in:
parent
6fe522fe9a
commit
2ceb6d5b4b
2 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue