diff --git a/src/dashboard/dashboard.js b/src/dashboard/dashboard.js index b5f1aba..19bfd36 100644 --- a/src/dashboard/dashboard.js +++ b/src/dashboard/dashboard.js @@ -249,12 +249,6 @@ class Dashboard extends Component { }; - - widgetStatusChange(updated_widget, key) { - // Widget changed internally, make changes effective then save them - this.widgetChange(updated_widget, key, this.saveChanges); - } - widgetChange(widget, index, callback = null) { let temp = this.state.widgetChangeData; temp.push(widget); @@ -383,19 +377,6 @@ class Dashboard extends Component { this.setState({ editing: false, widgetChangeData: [] }); }; - saveChanges() { - // Transform to a list - const dashboard = Object.assign({}, this.state.dashboard.toJS(), { - widgets: this.transformToWidgetsList(this.state.widgets) - }); - - AppDispatcher.dispatch({ - type: 'dashboards/start-edit', - data: dashboard, - token: this.state.sessionToken - }); - } - cancelEditing() { //raw widget has no id -> cannot be deleted in its original form this.state.widgets.forEach(widget => { @@ -534,7 +515,6 @@ class Dashboard extends Component { onChange={this.widgetChange.bind(this)} onWidgetChange={this.widgetChange.bind(this)} - onWidgetStatusChange={this.widgetStatusChange.bind(this)} editing={this.state.editing} grid={grid} paused={this.state.paused} @@ -561,7 +541,6 @@ class Dashboard extends Component { onChange={this.widgetChange.bind(this)} onWidgetChange={this.widgetChange.bind(this)} - onWidgetStatusChange={this.widgetStatusChange.bind(this)} editing={this.state.editing} paused={this.state.paused} /> diff --git a/src/widget/widget-context-menu.js b/src/widget/widget-context-menu.js index fd8f5c5..b869966 100644 --- a/src/widget/widget-context-menu.js +++ b/src/widget/widget-context-menu.js @@ -125,7 +125,6 @@ class WidgetContextMenu extends React.Component { this.props.onWidgetStatusChange(w, this.props.index) } onInputChanged={(value, controlID, controlValue) => this.inputDataChanged(widget, value, controlID, controlValue)} signals={this.state.signals} /> diff --git a/src/widget/widgets/slider.js b/src/widget/widgets/slider.js index 36d1fe9..23360d4 100644 --- a/src/widget/widgets/slider.js +++ b/src/widget/widgets/slider.js @@ -76,27 +76,6 @@ class WidgetSlider extends Component { } } - componentDidUpdate(prevProps: Readonly

, prevState: Readonly, snapshot: SS): void { - // Check if the orientation changed, update the size if it did - // this part didn't work -> dimensions and constraints are now handled by the edit orientation component - if (this.props.widget.customProperties.orientation !== prevProps.widget.customProperties.orientation) { - let baseWidget = this.props.widget; - - // Exchange dimensions and constraints - let newWidget = Object.assign({}, baseWidget, { - width: baseWidget.height, - height: baseWidget.width, - minWidth: baseWidget.minHeight, - minHeight: baseWidget.minWidth, - maxWidth: baseWidget.customProperties.maxHeight, - maxHeight: baseWidget.customProperties.maxWidth - }); - - this.props.onWidgetChange(newWidget); - } - - } - valueIsChanging(newValue) { this.props.widget.customProperties.value = newValue; if (this.props.widget.customProperties.continous_update)