Open ottigerb opened 7 years ago
Your import seems wrong, using <iron-auto-scroll-spy>
you should import
<link rel="import" href="../bower_components/iron-scroll-spy/iron-auto-scroll-spy.html">
insead of
<link rel="import" href="../bower_components/iron-scroll-spy/iron-scroll-spy.html">
Thank you for your answer - I looks I did a lot of try&error with iron-scroll-spy
vs. iron-auto-scroll-spy
. Anyway: Didn't solved my issue.
My current app tree looks something like:
- app
--- patients
----- patient-info
The code above is the patient-info
element. The scrolling region is coming from app
- as far I understand / looks like:
<app-header-layout id="app_header_main" fullbleed has-scrolling-region>
<app-header>
...
</app-header>
</app-header>
<div id="scrollingRegion">
--- patients
----- patient-info
</div>
Do I have to set autoScrollSpy.scrollTarget
? How to "reference" scope.$.scrollingRegion
inside app element? In short - do I need something like this & how to 'modify':
<script>
var scope = document.getElementById("scope");
// manually attach the scroll-target because paper-header-panel doesn't notify his scroller.
scope.$.autoScrollSpy.scrollTarget = scope.$.headerPanel.scroller;
</script>
Thanks! 👍
Hi, sorry for my very late answer!
To find the scroller element using <app-header-layout>
, check out this line.
You should be ok with:
scope.$.autoScrollSpy.scrollTarget = scope.$.app_header_main.header.scrollTarget;
Or, if you just set a height to the <iron-auto-scroll-spy>
you don't even need to define a scrollTarget. The element's default scroll target is itself.
Issue
I can't make your
iron-scroll-spy
to act as expected inside mymy-patient
element.Questions
[x] Is
{{scrollSelected}}
set by the paper-menu: Yes.{{scrollSelected}}
contains the id of the selected section.[ ] I guess I have trouble with the // manually attach the scroll-target because paper-header-panel doesn't notify his scroller. The scroller - as far I understand it - is done in the root of this element. No clue here.
[ ] Also no luck by experimenting with
scroll-target
.[ ] Did I missed something?
Thanks
Thanks for any helpful suggestions! Because I really would like to use this!