|
From: <ma...@us...> - 2011-10-31 17:07:12
|
Revision: 487
http://openautomation.svn.sourceforge.net/openautomation/?rev=487&view=rev
Author: mayerch
Date: 2011-10-31 17:07:05 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
Useability fix: add a button movement "animation" to the triggers so that a user has immediate feedback
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-10-31 13:33:40 UTC (rev 486)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-10-31 17:07:05 UTC (rev 487)
@@ -591,7 +591,11 @@
'type' : 'trigger',
'align' : $p.attr('align'),
'sendValue': value
- } ).bind( 'click', this.action );
+ } ).bind( 'click', this.action ).bind( 'mousedown', function(){
+ $(this).removeClass('switchUnpressed').addClass('switchPressed');
+ } ).bind( 'mouseup mouseout', function(){ // not perfect but simple
+ $(this).removeClass('switchPressed').addClass('switchUnpressed');
+ } );
ret_val.append( label ).append( $actor );
return ret_val;
},
@@ -746,7 +750,11 @@
'min' : parseFloat($p.attr('min')) || 0,
'max' : parseFloat($p.attr('max')) || 255,
'type' : 'switch'
- } ).bind( 'click', this.action );
+ } ).bind( 'click', this.action ).bind( 'mousedown', function(){
+ $(this).removeClass('switchUnpressed').addClass('switchPressed');
+ } ).bind( 'mouseup mouseout', function(){ // not perfect but simple
+ $(this).removeClass('switchPressed').addClass('switchUnpressed');
+ } );
var actorup = '<div class="actor switchUnpressed '
if ( $p.attr( 'align' ) )
@@ -764,7 +772,11 @@
'min' : parseFloat($p.attr('min')) || 0,
'max' : parseFloat($p.attr('max')) || 255,
'type' : 'switch'
- } ).bind( 'click', this.action );
+ } ).bind( 'click', this.action ).bind( 'mousedown', function(){
+ $(this).removeClass('switchUnpressed').addClass('switchPressed');
+ } ).bind( 'mouseup mouseout', function(){ // not perfect but simple
+ $(this).removeClass('switchPressed').addClass('switchUnpressed');
+ } );
var actorinfo = '<div class="actor switchInvisible" ';
if ( $p.attr( 'align' ) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|