You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't make your iron-scroll-spy to act as expected inside my my-patient element.
Questions
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?
<linkrel="import" href="../bower_components/polymer/polymer.html"><linkrel="import" href="../bower_components/optinomic-title/optinomic-title.html"><linkrel="import" href="../bower_components/iron-scroll-spy/iron-scroll-spy.html"><linkrel="import" href="../bower_components/paper-item/paper-item.html"><linkrel="import" href="../bower_components/paper-item/paper-item-body.html"><linkrel="import" href="../bower_components/paper-menu/paper-menu.html"><linkrel="import" href="../bower_components/paper-menu/paper-submenu.html"><linkrel="import" href="styles-shared.html"><dom-moduleid="my-patient"><templateid="scope"><styleinclude="shared-styles">:host {
display: block;
}
#autoScrollSpydiv {
padding:150px;
border-bottom:1px solid grey;
transition: background 0.2s;
}
</style><app-locationroute="{{route}}"></app-location><app-routeroute="{{route}}" pattern="/patient/:pid" data="{{data}}" tail="{{subroute}}"></app-route><divid="headerPanel"><paper-menuid="tree_menu" class="tree_container"><iron-selectorselected="{{scrollSelected}}" role="navigation"><paper-item>Section A</paper-item><paper-item>Section B</paper-item><paper-item>Section C</paper-item><paper-item>Section D</paper-item><paper-item>Section E</paper-item><paper-item>Section F</paper-item><paper-item>Section G</paper-item><paper-item>Section H</paper-item></iron-selector></paper-menu><iron-auto-scroll-spyselected="{{scrollSelected}}" id="autoScrollSpy"><div><h1>Section A</h1></div><div><h1>Section B</h1></div><div><h1>Section C</h1></div><div><h1>Section D</h1></div><div><h1>Section E</h1></div><div><h1>Section F</h1></div><div><h1>Section G</h1></div><div><h1>Section H</h1></div></iron-auto-scroll-spy></div><divclass="app-content-container"><divclass="app-content-container-controls"><paper-icon-buttonicon="my-icons:help-outline" on-tap="_logState"></paper-icon-button></div><divclass="app-content-container-content"><h2>ToDo: {{scrollSelected}}</h2><p>1.) Drag & Drop stuff you want to see for this page.</p><p>2.) Drag & Drop areas for all roles.</p></div></div></template><script>Polymer({is: 'my-patient',properties: {routeData: {type: Object,observer: '_pageChanged',}},_pageChanged: function(){// Save Current Route in StorevarrouteObj={"route": this.route,"data": this.routeData,"tail": this.subroute};console.log('(!!!) _routePageChanged: ',routeObj);this.pid=this.routeData.pid;},ready: function(){// this._pageChanged();},});</script><script>varscope=document.getElementById("scope");// manually attach the scroll-target because paper-header-panel doesn't notify his scroller.scope.$.autoScrollSpy.scrollTarget=scope.$.headerPanel.scroller;</script></dom-module>
Thanks
Thanks for any helpful suggestions! Because I really would like to use this!
The text was updated successfully, but these errors were encountered:
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>varscope=document.getElementById("scope");// manually attach the scroll-target because paper-header-panel doesn't notify his scroller.scope.$.autoScrollSpy.scrollTarget=scope.$.headerPanel.scroller;</script>
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
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!
The text was updated successfully, but these errors were encountered: