diff options
Diffstat (limited to 'behaviors/VerticalBar.py')
-rw-r--r-- | behaviors/VerticalBar.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/behaviors/VerticalBar.py b/behaviors/VerticalBar.py new file mode 100644 index 0000000..85960cb --- /dev/null +++ b/behaviors/VerticalBar.py @@ -0,0 +1,22 @@ +from operationscore.Behavior import * +class VerticalBar(Behavior): + + def processResponse(self, inputs, recurs): + ret = [] + inputs = list(inputs) + for inputset in inputs: + inputset = dict(inputset) + if 'xLoc' not in inputset: + inputset['xLoc'] = inputset['Location'][0] + xLoc = inputset['xLoc'] + + condition = '{x} == ' + str(xLoc) + + if self['Combine']: + inputset['Location'] += ',' + condition + else: + inputset['Location'] = condition + + ret.append(inputset) + return (ret, []) + |