1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-23 00:00:02 +01:00
VILLASweb/app/components/plot-value.js
2016-10-12 11:29:09 +02:00

30 lines
1 KiB
JavaScript

/**
* File: plot-value.js
* Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de>
* Date: 04.07.2016
* Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
import PlotAbstract from './plot-abstract';
export default PlotAbstract.extend({
classNames: [ 'plotValue' ],
minWidth_resize: 50,
minHeight_resize: 20,
value: function() {
// get all values for the choosen simulator
let values = this.get('data.' + this.get('plot.simulator') + '.values');
if (values) {
return values[this.get('plot.signal')];
}
// values is null, try to reload later
Ember.run.later(this, function() {
this.notifyPropertyChange('data.' + this.get('plot.simulator') + '.values');
}, 1000);
}.property('data.2.values', 'plot.simulator', 'plot.signal')
});