PolymerElements / iron-doc-viewer

Polymer documentation viewer elements
17 stars 16 forks source link

Top-level exports don't have anchors #183

Closed arthurevans closed 6 years ago

arthurevans commented 6 years ago

I think this is just an issue that anchor-id is set as a property instead of an attribute on the sub-elements.

arthurevans commented 6 years ago

OK, I tried fixing this by just making sure that the iron-doc-* elements had anchor-id attributes.

<iron-doc-mixin
  descriptor="[[item]]"
  anchor-id$="[[fragmentPrefix]][[item.name]]"
  fragment-prefix="[[fragmentPrefix]][[item.name]]-">
</iron-doc-mixin>

This works, sort of. The scroll position is a little off, with the title being scrolled offscreen. But I suppose it's better than nothing. I'll put in a PR for that.