@@ -21,7 +21,16 @@ function startTour(force_start){
2121 return ;
2222 }
2323 // var element_offset = $(element).offset().top;
24- $ ( "#sidebar-container" ) . scrollTo ( element , 200 , { offset :- 50 } ) ;
24+ var panel = $ ( element ) . closest ( '.panel' ) ;
25+ $ ( "#sidebar-container" ) . scrollTo ( panel , 200 , { offset :- 50 } ) ;
26+ var panel_body = $ ( element ) . closest ( '.panel-body' ) ;
27+ if ( panel_body ) {
28+ panel_body . scrollTo ( element , 200 , { offset : - 100 } ) ;
29+ var tr = $ ( element ) . closest ( 'tr' ) ;
30+ if ( tr ) {
31+ panel_body . scrollTo ( tr , 200 , { offset : - 50 } ) ;
32+ }
33+ }
2534 }
2635
2736 function fixupSVGHighlighting ( t ) {
@@ -96,6 +105,7 @@ function startTour(force_start){
96105 } ,
97106 {
98107 element : '#sidebar-pairs-panel .pair-link:first' ,
108+ onShow : autoScrollSideBar ,
99109 placement : 'left' ,
100110 content : "You can also execute the SPARQL query for the current pattern pre-filled with the individual source node."
101111 } ,
@@ -147,28 +157,28 @@ function startTour(force_start){
147157 {
148158 element : '#matrix-container .matrix-div[data-original-title*="Precision: 1"]:first' ,
149159 // onShow: autoScrollSideBar,
150- placement : 'bottom' ,
160+ placement : 'auto bottom' ,
151161 backdrop : false ,
152162 content : "For example, this is a high precision match of the current pattern selected on the right for the input ground truth pair (see the URIs on top). We also list how many patterns in total (including the current one) match it."
153163 } ,
154164 {
155165 element : '#matrix-container .matrix-div[data-original-title*="Precision: 0<"]:first' ,
156166 // onShow: autoScrollSideBar,
157- placement : 'bottom' ,
167+ placement : 'auto bottom' ,
158168 backdrop : false ,
159169 content : "This is a low precision example. The currently selected pattern on the right does not match this ground truth pair (but other patterns hopefully do)."
160170 } ,
161171 {
162172 element : '#graph-radios input:not(:checked):first' ,
163- // onShow: autoScrollSideBar,
173+ onShow : autoScrollSideBar ,
164174 placement : 'left' ,
165175 backdrop : false ,
166176 reflex : true ,
167177 content : "Selecting other patterns on the right will automatically update the matrix view."
168178 } ,
169179 {
170180 element : '#no-graph-radio-container' ,
171- // onShow: autoScrollSideBar,
181+ onShow : autoScrollSideBar ,
172182 placement : 'left' ,
173183 backdrop : false ,
174184 reflex : true ,
@@ -177,7 +187,7 @@ function startTour(force_start){
177187 } ,
178188 {
179189 element : '#fingerprint-nav' ,
180- onShow : autoScrollSideBar ,
190+ // onShow: autoScrollSideBar,
181191 placement : 'bottom' ,
182192 backdrop : false ,
183193 reflex : true ,
@@ -193,7 +203,7 @@ function startTour(force_start){
193203 } ,
194204 {
195205 element : '#graph-fingerprint0' ,
196- // onShow: autoScrollSideBar,
206+ onShow : autoScrollSideBar ,
197207 placement : 'bottom' ,
198208 backdrop : false ,
199209 reflex : true ,
0 commit comments