Commit f468b445 authored by Sonja Happ's avatar Sonja Happ
Browse files

Refactoring of js code base:

- Grouping js files based on the elements of the data model instead of parent js class
- All js files providing functionality for one element of the data model are now in one folder; this makes is easier to implement changes for one element in all affected files/ classes
- js files which are common to multiple elements are in the common folder
- The new structure is more in alignment with the new Go backend code base structure
- This commit does not contain any changes in functionality of the frontend
parent 982e5661
......@@ -22,7 +22,7 @@
import React, { Component } from 'react';
import { FormGroup, Col, Row, FormCheck, FormLabel } from 'react-bootstrap';
import WidgetSlider from '../widgets/slider';
import WidgetSlider from './widgets/slider';
class EditWidgetOrientation extends Component {
constructor(props) {
......
......@@ -21,7 +21,7 @@
import React, { Component } from 'react';
import { FormGroup, FormLabel } from 'react-bootstrap';
import ParametersEditor from '../parameters-editor';
import ParametersEditor from '../common/parameters-editor';
class EditWidgetParametersControl extends Component {
constructor(props) {
......
......@@ -22,7 +22,7 @@
import React from 'react';
//import { FormGroup, FormControl, FormLabel } from 'react-bootstrap';
import Dialog from './dialog';
import Dialog from '../common/dialogs/dialog';
import createControls from './edit-widget-control-creator';
......@@ -58,7 +58,7 @@ class EditWidgetDialog extends React.Component {
// scale width to match aspect
const aspectRatio = file.dimensions.width / file.dimensions.height;
changeObject.width = this.state.temporal.height * aspectRatio;
return changeObject;
}
......
......@@ -25,28 +25,28 @@ import { ContextMenuProvider } from 'react-contexify';
import { Rnd } from 'react-rnd';
import classNames from 'classnames';
import AppDispatcher from '../app-dispatcher';
import UserStore from '../stores/user-store';
import SimulatorDataStore from '../stores/simulator-data-store';
import SimulationModelStore from '../stores/simulation-model-store';
import FileStore from '../stores/file-store';
import WidgetCustomAction from '../components/widgets/custom-action';
import WidgetAction from '../components/widgets/action';
import WidgetLamp from '../components/widgets/lamp';
import WidgetValue from '../components/widgets/value';
import WidgetPlot from '../components/widgets/plot';
import WidgetTable from '../components/widgets/table';
import WidgetLabel from '../components/widgets/label';
import WidgetPlotTable from '../components/widgets/plot-table';
import WidgetImage from '../components/widgets/image';
import WidgetButton from '../components/widgets/button';
import WidgetInput from '../components/widgets/input';
import WidgetSlider from '../components/widgets/slider';
import WidgetGauge from '../components/widgets/gauge';
import WidgetBox from '../components/widgets/box';
import WidgetHTML from '../components/widgets/html';
import WidgetTopology from '../components/widgets/topology';
import AppDispatcher from '../common/app-dispatcher';
import UserStore from '../user/user-store';
import SimulatorDataStore from '../simulator/simulator-data-store';
import SimulationModelStore from '../simulationmodel/simulation-model-store';
import FileStore from '../file/file-store';
import WidgetCustomAction from './widgets/custom-action';
import WidgetAction from './widgets/action';
import WidgetLamp from './widgets/lamp';
import WidgetValue from './widgets/value';
import WidgetPlot from './widgets/plot';
import WidgetTable from './widgets/table';
import WidgetLabel from './widgets/label';
import WidgetPlotTable from './widgets/plot-table';
import WidgetImage from './widgets/image';
import WidgetButton from './widgets/button';
import WidgetInput from './widgets/input';
import WidgetSlider from './widgets/slider';
import WidgetGauge from './widgets/gauge';
import WidgetBox from './widgets/box';
import WidgetHTML from './widgets/html';
import WidgetTopology from './widgets/topology';
import '../styles/widgets.css';
......@@ -294,5 +294,5 @@ class Widget extends React.Component {
}
}
let fluxContainerConverter = require('./FluxContainerConverter');
let fluxContainerConverter = require('../common/FluxContainerConverter');
export default Container.create(fluxContainerConverter.convert(Widget), { withProps: true });
......@@ -22,7 +22,7 @@
import React, { Component } from 'react';
import { Button, ButtonGroup } from 'react-bootstrap';
import Icon from '../icon';
import Icon from '../../common/icon';
class WidgetAction extends Component {
constructor(props) {
......
......@@ -22,7 +22,7 @@
import React, { Component } from 'react';
import EditWidgetColorControl from '../dialogs/edit-widget-color-control';
import EditWidgetColorControl from '../edit-widget-color-control';
class WidgetBox extends Component {
render() {
......
......@@ -22,10 +22,10 @@
import React, { Component } from 'react';
import { Button } from 'react-bootstrap';
import Icon from '../icon';
import UserStore from '../../stores/user-store';
import SimulatorStore from '../../stores/simulator-store';
import AppDispatcher from '../../app-dispatcher';
import Icon from '../../common/icon';
import UserStore from '../../user/user-store';
import SimulatorStore from '../../simulator/simulator-store';
import AppDispatcher from '../../common/app-dispatcher';
class WidgetCustomAction extends Component {
constructor(props) {
......
Supports Markdown
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