From 7a4f06d15b0fe9bd22996af6a1ca2c3ca5ca3e3f Mon Sep 17 00:00:00 2001 From: dxiao Date: Sun, 13 Feb 2011 19:00:44 -0500 Subject: Added a vertical bars animation to C5Sign-dxiao --- behaviors/VerticalBar.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 behaviors/VerticalBar.py (limited to 'behaviors') diff --git a/behaviors/VerticalBar.py b/behaviors/VerticalBar.py new file mode 100644 index 0000000..e1a67fe --- /dev/null +++ b/behaviors/VerticalBar.py @@ -0,0 +1,30 @@ +from operationscore.Behavior import * +class VerticalBar(Behavior): + + def processResponse(self, inputs, recurs): + + ret = [] + for inputset in inputs: + #import pdb; pdb.set_trace() + + 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, []) + + def setLastOutput(self, output): + + coutput = Behavior.deepCopyPacket(output) + for data in coutput: + data['Location'] = data['xLoc'] + return coutput -- cgit v1.2.3