mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Resolve merge conflict
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<option value="scale" data-i18n="range.scale.payload"></option>
|
||||
<option value="clamp" data-i18n="range.scale.limit"></option>
|
||||
<option value="roll" data-i18n="range.scale.wrap"></option>
|
||||
<option value="drop" data-i18n="range.scale.drop"></option>
|
||||
</select>
|
||||
</div>
|
||||
<br/>
|
||||
|
@@ -32,11 +32,15 @@ module.exports = function(RED) {
|
||||
if (value !== undefined) {
|
||||
var n = Number(value);
|
||||
if (!isNaN(n)) {
|
||||
if (node.action == "clamp") {
|
||||
if (node.action === "drop") {
|
||||
if (n < node.minin) { done(); return; }
|
||||
if (n > node.maxin) { done(); return; }
|
||||
}
|
||||
if (node.action === "clamp") {
|
||||
if (n < node.minin) { n = node.minin; }
|
||||
if (n > node.maxin) { n = node.maxin; }
|
||||
}
|
||||
if (node.action == "roll") {
|
||||
if (node.action === "roll") {
|
||||
var divisor = node.maxin - node.minin;
|
||||
n = ((n - node.minin) % divisor + divisor) % divisor + node.minin;
|
||||
}
|
||||
|
@@ -19,9 +19,9 @@ module.exports = function(RED) {
|
||||
function CSVNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.template = (n.temp || "");
|
||||
this.sep = (n.sep || ',').replace("\\t","\t").replace("\\n","\n").replace("\\r","\r");
|
||||
this.sep = (n.sep || ',').replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
|
||||
this.quo = '"';
|
||||
this.ret = (n.ret || "\n").replace("\\n","\n").replace("\\r","\r");
|
||||
this.ret = (n.ret || "\n").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
|
||||
this.winflag = (this.ret === "\r\n");
|
||||
this.lineend = "\n";
|
||||
this.multi = n.multi || "one";
|
||||
|
@@ -34,11 +34,14 @@
|
||||
the range specified within the target range.</p>
|
||||
<p><i>Scale and wrap within the target range</i> means that the result will
|
||||
be wrapped within the target range.</p>
|
||||
<p><i>Scale, but drop if outside input range</i> means that the result will
|
||||
be scaled, but any inputs outside of the inout range will be dropped.</p>
|
||||
<p>For example an input 0 - 10 mapped to 0 - 100.</p>
|
||||
<table style="outline-width:#888 solid thin">
|
||||
<tr><th width="80px">mode</th><th width="80px">input</th><th width="80px">output</th></tr>
|
||||
<tr><td><center>scale</center></td><td><center>12</center></td><td><center>120</center></td></tr>
|
||||
<tr><td><center>limit</center></td><td><center>12</center></td><td><center>100</center></td></tr>
|
||||
<tr><td><center>wrap</center></td><td><center>12</center></td><td><center>20</center></td></tr>
|
||||
<tr><td><center>drop</center></td><td><center>12</center></td><td><center><i>(no output)</i></center></td></tr>
|
||||
</table>
|
||||
</script>
|
||||
|
@@ -813,7 +813,8 @@
|
||||
"scale": {
|
||||
"payload": "Scale the message property",
|
||||
"limit": "Scale and limit to the target range",
|
||||
"wrap": "Scale and wrap within the target range"
|
||||
"wrap": "Scale and wrap within the target range",
|
||||
"drop": "Scale, but drop msg if outside input range"
|
||||
},
|
||||
"tip": "Tip: This node ONLY works with numbers.",
|
||||
"errors": {
|
||||
|
@@ -47,5 +47,6 @@
|
||||
<p>If 'include null values' option is checked, null values will be returned in result, ie. middle value '"1",,3'.</p>
|
||||
<p>The node can accept a multi-part input as long as the <code>parts</code> property is set correctly, for example from a file-in node or split node.</p>
|
||||
<p>If outputting multiple messages they will have their <code>parts</code> property set and form a complete message sequence.</p>
|
||||
<p>If the node is set to only send column headers once, then setting <code>msg.reset</code> to any value will cause the node to resend the headers.</p>
|
||||
<p><b>Note:</b> the column template must be comma separated - even if a different separator is chosen for the data.</p>
|
||||
</script>
|
||||
|
@@ -777,8 +777,8 @@
|
||||
"change": "値の置換",
|
||||
"delete": "値の削除",
|
||||
"move": "値の移動",
|
||||
"toValue": "対象の値",
|
||||
"to": "対象の値",
|
||||
"toValue": "代入する値",
|
||||
"to": "移動先",
|
||||
"search": "検索する文字列",
|
||||
"replace": "置換後の文字列"
|
||||
},
|
||||
@@ -813,7 +813,8 @@
|
||||
"scale": {
|
||||
"payload": "msg.payloadの値を拡大/縮小",
|
||||
"limit": "入力値の範囲外の値を最小値/最大値とし拡大/縮小",
|
||||
"wrap": "入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小"
|
||||
"wrap": "入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小",
|
||||
"drop": "値を拡大/縮小(入力範囲外の時はメッセージを削除)"
|
||||
},
|
||||
"tip": "注釈: 本ノードは、数値のみ扱うことができます。",
|
||||
"errors": {
|
||||
|
@@ -15,22 +15,22 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn": "8.7.1",
|
||||
"acorn": "8.8.1",
|
||||
"acorn-walk": "8.2.0",
|
||||
"ajv": "8.11.0",
|
||||
"body-parser": "1.20.0",
|
||||
"ajv": "8.11.2",
|
||||
"body-parser": "1.20.1",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"content-type": "1.0.4",
|
||||
"cookie-parser": "1.4.6",
|
||||
"cookie": "0.5.0",
|
||||
"cors": "2.8.5",
|
||||
"cronosjs": "1.7.1",
|
||||
"denque": "2.0.1",
|
||||
"denque": "2.1.0",
|
||||
"form-data": "4.0.0",
|
||||
"fs-extra": "10.1.0",
|
||||
"got": "11.8.5",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "1.0.0",
|
||||
"hpagent": "1.2.0",
|
||||
"https-proxy-agent": "5.0.1",
|
||||
"is-utf8": "0.2.1",
|
||||
"js-yaml": "4.1.0",
|
||||
@@ -41,7 +41,7 @@
|
||||
"node-watch": "0.7.3",
|
||||
"on-headers": "1.0.2",
|
||||
"raw-body": "2.5.1",
|
||||
"tough-cookie": "4.0.0",
|
||||
"tough-cookie": "4.1.2",
|
||||
"uuid": "8.3.2",
|
||||
"ws": "7.5.6",
|
||||
"xml2js": "0.4.23",
|
||||
|
Reference in New Issue
Block a user