File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1717
1818 pre {
1919 border : 2px dashed crimson;
20- height : 100 px ;
20+ height : 150 px ;
2121 width : 20em ;
2222 margin-bottom : 3em ;
2323 overflow-clip-margin : 1em ;
159159 pre . className = `${ val . value } ` ;
160160 }
161161 scrollExample ( ) ;
162+ clipMargin ( ) ;
162163 } ) ;
163164
164165 wide . addEventListener ( "change" , ( ) => {
167168 } ) ;
168169
169170 ocm . addEventListener ( "change" , ( ) => {
170- pre . style . overflowClipMargin = ` ${ ocm . value } em` ;
171+ clipMargin ( ) ;
171172 } ) ;
172173
173174 scrollL . addEventListener ( "change" , ( ) => {
179180
180181 function scrollExample ( ) {
181182 pre . scrollTo ( {
182- top : scrollT . value * 26 ,
183+ top : scrollT . value ,
183184 left : scrollL . value * 2 ,
184185 behavior : "smooth" ,
185186 } ) ;
186187 }
188+
189+ function clipMargin ( ) {
190+ pre . style . overflowClipMargin = `${ ocm . value } em` ;
191+ }
187192 </ script >
188193 </ body >
189194</ html >
You can’t perform that action at this time.
0 commit comments