|
From: <ma...@us...> - 2011-05-21 12:34:45
|
Revision: 340
http://openautomation.svn.sourceforge.net/openautomation/?rev=340&view=rev
Author: mayerch
Date: 2011-05-21 12:34:39 +0000 (Sat, 21 May 2011)
Log Message:
-----------
Fix switch pressed / unpressed optics when using maps
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-05-20 21:56:05 UTC (rev 339)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-05-21 12:34:39 UTC (rev 340)
@@ -288,7 +288,7 @@
'styling' : $p.attr('styling'),
'on_value' : $p.attr('on_value' ) || 1,
'off_value' : $p.attr('off_value') || 0,
- 'align' : $p.attr('align'),
+ 'align' : $p.attr('align'),
'type' : 'switch'
} ).bind( 'click', this.action );
for( var addr in address ) $actor.bind( addr, this.update );
@@ -298,7 +298,7 @@
update: function(e,d) {
var element = $(this);
var value = defaultUpdate( e, d, element );
- var off = element.data( 'off_value' );
+ var off = map( element.data( 'off_value' ), element );
element.removeClass( value == off ? 'switchPressed' : 'switchUnpressed' );
element.addClass( value == off ? 'switchUnpressed' : 'switchPressed' );
},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|