File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ By default it uses the URL fragment for routing (e.g.
7575static file hosts.
7676
7777To use the real URL path for routing, set the ` base-href ` property to the
78- server mount point (e.g. ` / ` or ` /docs/ ` ). Note that this requires a host that
79- serves the application from all paths that should be handled by the doc viewer.
78+ server mount point (e.g. ` /api/docs ` or * empty string* for the root path). Note
79+ that this requires a host that serves the application from all paths that
80+ should be handled by the doc viewer.
8081
8182### Previous versions
8283
Original file line number Diff line number Diff line change 3636 background-color : # 5a5a5a ;
3737 }
3838
39+ [drawer-toggle ] {
40+ flex-shrink : 0 ;
41+ }
42+
3943 [condensed-title ] {
4044 white-space : nowrap;
4145 }
99103 < app-drawer id ="drawer " slot ="drawer " swipe-open >
100104 < iron-doc-nav
101105 descriptor ="[[_descriptor]] "
106+ base-href ="[[baseHref]] "
102107 path ="[[_path]] "
103108 on-select ="_onNavSelect ">
104109 </ iron-doc-nav >
119124
120125 < div id ="scroller ">
121126 < iron-doc-viewer
127+ id ="viewer "
122128 descriptor ="[[_descriptor]] "
123129 base-href ="[[baseHref]] "
124130 demo-src-prefix ="[[demoSrcPrefix]] "
148154
149155 /**
150156 * By default all routing is performed using the URL fragment
151- * (e.g. `docs.html#/elements/my-element`). If your server supports
152- * it and you would like to use the real URL path instead (e.g.
153- * `/docs/elements/my-element`), set this to the base path where the
154- * page is mounted (e.g. `/` or `/docs/`).
157+ * (e.g. `docs.html#/elements/my-element`).
158+ *
159+ * If your server supports it and you would like to use the real URL
160+ * path instead (e.g. `/api/docs/elements/my-element`), set this to
161+ * the base path where the page is mounted, omitting the trailing
162+ * slash (e.g. `/api/docs` or *empty string* for the root path).
155163 */
156164 baseHref : String ,
157165
183191 // Note we need to listen for this event, and can't rely just on the
184192 // path changing, because the user might click on the nav item they
185193 // are already viewing.
186- window . document . body . scrollTop = 0 ;
194+ this . $ . viewer . scrollIntoView ( ) ;
187195 if ( this . _narrow ) {
188196 this . $ . drawer . close ( ) ;
189197 }
You can’t perform that action at this time.
0 commit comments