summaryrefslogtreecommitdiff
path: root/js/Linear/GAINBLK.js
diff options
context:
space:
mode:
authorSunil Shetye2018-08-29 10:48:12 +0530
committerSunil Shetye2018-08-29 18:03:04 +0530
commit352623792d2b9400510599c487540b1e763a7d3c (patch)
tree7711522f3fcd42a9d5f22b9fa3328763452a6918 /js/Linear/GAINBLK.js
parent17a1beeeae647a6fbd0904a5d794ce7754df7eb2 (diff)
downloadsci2js-352623792d2b9400510599c487540b1e763a7d3c.tar.gz
sci2js-352623792d2b9400510599c487540b1e763a7d3c.tar.bz2
sci2js-352623792d2b9400510599c487540b1e763a7d3c.zip
add the common code to get method also
type is a function get the popup title from the value set in the get method
Diffstat (limited to 'js/Linear/GAINBLK.js')
-rw-r--r--js/Linear/GAINBLK.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js
index 89c30062..0c75a5a7 100644
--- a/js/Linear/GAINBLK.js
+++ b/js/Linear/GAINBLK.js
@@ -24,6 +24,11 @@ function GAINBLK() {
return this.x;
}
GAINBLK.prototype.get = function GAINBLK() {
+ var exprs = this.graphics.exprs;
+ if (size(exprs,"*")==1) {
+ var exprs = [[exprs],[sci2exp(0)]];
+ }
+ this.set_param_popup_title = "Set gain block parameters";
var options = {
gain:["Gain",this.gain],
over:["Do On Overflow(0=Nothing 1=Saturate 2=Error)",this.over],
@@ -167,7 +172,6 @@ function GAINBLK() {
return new BasicBlock(this.x);
}
GAINBLK.prototype.get_popup_title = function GAINBLK() {
- var set_param_popup_title = "Set gain block parameters";
- return set_param_popup_title;
+ return this.set_param_popup_title;
}
}