Skip to content

Commit

Permalink
BigButton: added (commented-out) concept for BigButton with no blink(…
Browse files Browse the repository at this point in the history
…1) device defined
  • Loading branch information
todbot committed Nov 23, 2018
1 parent a72c635 commit 99faf22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/components/gui/bigButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var log = require('../../logger');

var currentWindow = remote.getCurrentWindow();


var BigButton = React.createClass({
propTypes: {
idx: React.PropTypes.number,
Expand All @@ -38,8 +39,9 @@ var BigButton = React.createClass({
// log.msg("BigButton.componentDidMount type:",this.props.type);
// if( this.props.type !== 'sys' ) { this.menu = this.makeMenu(); }
},
// Make serials menu
makeSerialsMenu: function() {
// Make serials menu
var self = this;
var serialsmenu = null;
if( this.props.serials && this.props.serials.length > 0 ) {
serialsmenu = new Menu();
Expand Down
8 changes: 7 additions & 1 deletion app/components/gui/bigButtonSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ var BigButtonSet = React.createClass({
// internal function used by differnt kinds of buttons
setBlink1Color: function(color, ledn, blink1id) {
ledn = ledn || 0; // 0 means all
// if( blink1id === undefined ) {
// Blink1Service.getAllSerials().map( function(serial,idx) {
// Blink1Service.fadeToColor( 100, color, ledn, serial ); // FIXME: millis
// });
// } else {
Blink1Service.fadeToColor( 100, color, ledn, blink1id ); // FIXME: millis
// }
},
// playPattern: function(patternid) {
// PatternsService.playPatternFrom( patternid );
Expand Down Expand Up @@ -204,7 +210,7 @@ var BigButtonSet = React.createClass({
var self = this;
var patterns = PatternsService.getAllPatterns();
var serials = Blink1Service.getAllSerials();

var createBigButtonSys = function(button, index) { // FIXME: understand bind()
return (
<BigButton key={index} name={button.name} type='sys' iconClass={button.iconClass}
Expand Down

0 comments on commit 99faf22

Please sign in to comment.