Skip to content

Commit

Permalink
Specify repo, and include images, see phetsims/binder#1
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 12, 2018
1 parent 08c62a6 commit 407f749
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
14 changes: 3 additions & 11 deletions js/Checkbox.md → docs/Checkbox.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# [Checkbox](Checkbox.js)

Used in the following simulations:

Images from usage (linked to sims)

[Options in Checkbox.js](Checkbox.js#L39-L69)

* A11y role: checkbox
* Design Pattern: Spacebar

Expand All @@ -14,7 +6,7 @@ Images from usage (linked to sims)
<input id=”energy-symbols” type=”checkbox” notchecked>
<label for=”energy-symbols”>Energy Symbols</label>
```
![alt text](../docs/images/checkbox-energy-symbols.png "Energy Symbols Checkbox")
![alt text](images/checkbox-energy-symbols.png "Energy Symbols Checkbox")

| Primary Element | Label | Help Text/Content |
| ------------- |:-------------:| -----:|
Expand All @@ -23,10 +15,10 @@ Images from usage (linked to sims)
## Checkbox without visual label/string (option with aria-label)

```html
<input id=counting-numbers type=checkbox aria-label=Counting numbers notchecked>
<input id="counting-numbers" type="checkbox" aria-label="Counting numbers" notchecked>
```

![alt text](../docs/images/checkbox-123.png "Numeric Checkbox")
![alt text](images/checkbox-123.png "Numeric Checkbox")

| Primary Element | Label | Help Text |
| ------------- |:-------------:| -----:|
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion js/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ define( function( require ) {
this.mutate( options );

// support for binder documentation, stripped out in builds and only runs when ?binder is specified
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'Checkbox', this );
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'sun', 'Checkbox', this );
}

sun.register( 'Checkbox', Checkbox );
Expand Down
2 changes: 1 addition & 1 deletion js/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ define( function( require ) {
};

// support for binder documentation, stripped out in builds and only runs when ?binder is specified
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'ComboBox', this );
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'sun', 'ComboBox', this );
}

sun.register( 'ComboBox', ComboBox );
Expand Down
4 changes: 2 additions & 2 deletions js/HSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ define( function( require ) {
startDrag: function() {}, // called when a drag sequence starts
endDrag: function() {}, // called when a drag sequence ends
constrainValue: function( value ) { return value; }, // called before valueProperty is set

enabledProperty: null, // see below
enabledRangeProperty: null, // see below

Expand Down Expand Up @@ -283,7 +283,7 @@ define( function( require ) {
this.initializeAccessibleSlider( valueProperty, this.enabledRangeProperty, this.enabledProperty, options );

// support for binder documentation, stripped out in builds and only runs when ?binder is specified
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'HSlider', this );
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'sun', 'HSlider', this );
}

sun.register( 'HSlider', HSlider );
Expand Down

0 comments on commit 407f749

Please sign in to comment.