Skip to content

Commit bedd10e

Browse files
committed
doc(ssd1306): update docstring for imageData
having <canvas> in the string caused an actual Canvas element to be created in the docs :-P also change the exported class name Ssd1306Element → SSD1306Element
1 parent 8ffb5a9 commit bedd10e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export { ResistorElement } from './resistor-element';
1010
export { MembraneKeypadElement } from './membrane-keypad-element';
1111
export { PotentiometerElement } from './potentiometer-element';
1212
export { NeopixelMatrixElement } from './neopixel-matrix-element';
13-
export { Ssd1306Element } from './ssd1306-element';
13+
export { SSD1306Element } from './ssd1306-element';

src/ssd1306-element.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import { customElement, html, LitElement, property, SVGTemplateResult } from 'li
33

44
type CanvasContext = CanvasRenderingContext2D | null | undefined;
55
@customElement('wokwi-ssd1306-element')
6-
export class Ssd1306Element extends LitElement {
7-
/** ImageData is the underlying pixel data of an area of a <canvas> element.
8-
imageData can also be used to set a part of the canvas by using putImageData().
9-
You may use the the redraw() method for initiating an update of the imageData data
10-
which its reference wasn't changed.
6+
export class SSD1306Element extends LitElement {
7+
/**
8+
* The pixel data to draw on the element's internal &lt;canvas&gt;.
9+
* If you change the underlaying pixel data without updating the
10+
* `imageData` reference, call the `redraw()` method to update the
11+
* screen with your changes.
1112
*/
1213
@property() imageData: ImageData;
1314

@@ -96,7 +97,7 @@ export class Ssd1306Element extends LitElement {
9697
<text x="39" y="6">3v3</text>
9798
<text x="58" y="6">Gnd</text>
9899
</g>
99-
<!--Star -->
100+
<!-- Star -->
100101
<path
101102
d="M115.5 10.06l-1.59 2.974-3.453.464 2.495 2.245-.6 3.229 3.148-1.528 3.148 1.528-.6-3.23 2.495-2.244-3.453-.464-1.59-2.974z"
102103
stroke="#FFF"

0 commit comments

Comments
 (0)