aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2018-12-09 11:03:54 +1200
committerDevine Lu Linvega <[email protected]>2018-12-09 11:03:54 +1200
commit5c31ece4a376df80d92eb36cc5ff05efaa16d796 (patch)
tree9da8c106d9df782157db912502968998c15f834e
parent677eac43915eef8300b9695c06bf9fdaffa21b94 (diff)
downloadOrca-5c31ece4a376df80d92eb36cc5ff05efaa16d796.tar.gz
Orca-5c31ece4a376df80d92eb36cc5ff05efaa16d796.zip
Improved he behaviour of P/X
-rw-r--r--desktop/core/library/p.js3
-rw-r--r--desktop/core/library/x.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/desktop/core/library/p.js b/desktop/core/library/p.js
index f490303..c7760a2 100644
--- a/desktop/core/library/p.js
+++ b/desktop/core/library/p.js
@@ -3,7 +3,7 @@
const Operator = require('../operator')
function OperatorP (orca, x, y, passive) {
- Operator.call(this, orca, x, y, 'p', passive)
+ Operator.call(this, orca, x, y, 'p', true)
this.name = 'push'
this.info = 'Writes an eastward operator with offset.'
@@ -23,6 +23,7 @@ function OperatorP (orca, x, y, passive) {
}
this.run = function () {
+ if (!this.bang() && !passive) { return }
const res = this.listen(this.ports.input.val)
this.output(`${res}`)
}
diff --git a/desktop/core/library/x.js b/desktop/core/library/x.js
index 9449461..f2ffcd9 100644
--- a/desktop/core/library/x.js
+++ b/desktop/core/library/x.js
@@ -3,7 +3,7 @@
const Operator = require('../operator')
function OperatorX (orca, x, y, passive) {
- Operator.call(this, orca, x, y, 'x', passive)
+ Operator.call(this, orca, x, y, 'x', true)
this.name = 'teleport'
this.info = 'Writes a distant operator with offset.'
@@ -20,6 +20,7 @@ function OperatorX (orca, x, y, passive) {
}
this.run = function () {
+ if (!this.bang() && !passive) { return }
const res = this.listen(this.ports.input.val)
this.output(`${res}`)
}