File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,22 @@ export class FormatterDocPage {
34
34
<link
35
35
rel="stylesheet"
36
36
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
37
- >
37
+ / >
38
38
</head>
39
39
<body>
40
- <header>
40
+ <header class="container">
41
+ <hgroup>
41
42
<h1>${ title } </h1>
43
+ </hgroup>
42
44
</header>
43
- <main>
45
+ <main class="container">
46
+ <section id="preview">
44
47
<${ tagName } ></${ tagName } >
48
+ </section>
45
49
</main>
50
+ <footer class="container">
51
+ <small>Built with banira</small>
52
+ </footer>
46
53
</body>
47
54
</html>`
48
55
}
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ class WAKnob extends HTMLElement {
14
14
15
15
constructor ( ) {
16
16
super ( ) ;
17
- this . attachShadow ( { mode : 'open' } ) ;
18
- this . render ( ) ;
19
17
}
20
18
21
19
get value ( ) {
@@ -105,6 +103,8 @@ class WAKnob extends HTMLElement {
105
103
}
106
104
107
105
connectedCallback ( ) {
106
+ this . attachShadow ( { mode : 'open' } ) ;
107
+
108
108
// Initialize from attributes if present
109
109
if ( this . hasAttribute ( 'min' ) ) {
110
110
this . min = parseFloat ( this . getAttribute ( 'min' ) || '0' ) ;
@@ -130,6 +130,7 @@ class WAKnob extends HTMLElement {
130
130
this . setAttribute ( 'min' , this . _min . toString ( ) ) ;
131
131
this . setAttribute ( 'max' , this . _max . toString ( ) ) ;
132
132
this . setAttribute ( 'default' , this . _default . toString ( ) ) ;
133
+ this . render ( ) ;
133
134
}
134
135
135
136
private render ( ) {
@@ -168,7 +169,7 @@ class WAKnob extends HTMLElement {
168
169
text-align: center;
169
170
}
170
171
</style>
171
- <div class=' knob-body' >
172
+ <div class=" knob-body" >
172
173
<svg class="knob-svg" viewBox="0 0 60 60">
173
174
<circle class="knob-base" cx="30" cy="30" r="25"/>
174
175
<line class="knob-indicator"
You can’t perform that action at this time.
0 commit comments