Skip to content

Commit d35e3aa

Browse files
author
MFC Action
committed
Docs @ 85c41b7
1 parent 26b8604 commit d35e3aa

File tree

5 files changed

+112
-108
lines changed

5 files changed

+112
-108
lines changed

documentation/navtree.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,19 @@ function initNavTree(toroot,relpath) {
136136
docContent.animate({
137137
scrollTop: pos + dcScrTop - dcOffset
138138
},Math.max(50,Math.min(500,dist)),function() {
139-
window.location.href=aname;
140139
animationInProgress=false;
140+
if (anchor.parent().attr('class')=='memItemLeft') {
141+
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
142+
glowEffect(rows.children(),300); // member without details
143+
} else if (anchor.parent().attr('class')=='fieldname') {
144+
glowEffect(anchor.parent().parent(),1000); // enum value
145+
} else if (anchor.parent().attr('class')=='fieldtype') {
146+
glowEffect(anchor.parent().parent(),1000); // struct field
147+
} else if (anchor.parent().is(":header")) {
148+
glowEffect(anchor.parent(),1000); // section header
149+
} else {
150+
glowEffect(anchor.next(),1000); // normal member
151+
}
141152
});
142153
}
143154
}
@@ -260,18 +271,6 @@ function initNavTree(toroot,relpath) {
260271
const highlightAnchor = function() {
261272
const aname = hashUrl();
262273
const anchor = $(aname);
263-
if (anchor.parent().attr('class')=='memItemLeft') {
264-
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
265-
glowEffect(rows.children(),300); // member without details
266-
} else if (anchor.parent().attr('class')=='fieldname') {
267-
glowEffect(anchor.parent().parent(),1000); // enum value
268-
} else if (anchor.parent().attr('class')=='fieldtype') {
269-
glowEffect(anchor.parent().parent(),1000); // struct field
270-
} else if (anchor.parent().is(":header")) {
271-
glowEffect(anchor.parent(),1000); // section header
272-
} else {
273-
glowEffect(anchor.next(),1000); // normal member
274-
}
275274
gotoAnchor(anchor,aname);
276275
}
277276

@@ -453,23 +452,25 @@ function initNavTree(toroot,relpath) {
453452
showRoot();
454453

455454
$(window).bind('hashchange', () => {
456-
if (window.location.hash && window.location.hash.length>1) {
457-
let a;
458-
if ($(location).attr('hash')) {
459-
const clslink=stripPath(pathName())+':'+hashValue();
460-
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461-
}
462-
if (a==null || !$(a).parent().parent().hasClass('selected')) {
455+
if (!animationInProgress) {
456+
if (window.location.hash && window.location.hash.length>1) {
457+
let a;
458+
if ($(location).attr('hash')) {
459+
const clslink=stripPath(pathName())+':'+hashValue();
460+
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461+
}
462+
if (a==null || !$(a).parent().parent().hasClass('selected')) {
463+
$('.item').removeClass('selected');
464+
$('.item').removeAttr('id');
465+
}
466+
const link=stripPath2(pathName());
467+
navTo(o,link,hashUrl(),relpath);
468+
} else {
469+
$('#doc-content').scrollTop(0);
463470
$('.item').removeClass('selected');
464471
$('.item').removeAttr('id');
472+
navTo(o,toroot,hashUrl(),relpath);
465473
}
466-
const link=stripPath2(pathName());
467-
navTo(o,link,hashUrl(),relpath);
468-
} else if (!animationInProgress) {
469-
$('#doc-content').scrollTop(0);
470-
$('.item').removeClass('selected');
471-
$('.item').removeAttr('id');
472-
navTo(o,toroot,hashUrl(),relpath);
473474
}
474475
});
475476

post_process/navtree.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,19 @@ function initNavTree(toroot,relpath) {
136136
docContent.animate({
137137
scrollTop: pos + dcScrTop - dcOffset
138138
},Math.max(50,Math.min(500,dist)),function() {
139-
window.location.href=aname;
140139
animationInProgress=false;
140+
if (anchor.parent().attr('class')=='memItemLeft') {
141+
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
142+
glowEffect(rows.children(),300); // member without details
143+
} else if (anchor.parent().attr('class')=='fieldname') {
144+
glowEffect(anchor.parent().parent(),1000); // enum value
145+
} else if (anchor.parent().attr('class')=='fieldtype') {
146+
glowEffect(anchor.parent().parent(),1000); // struct field
147+
} else if (anchor.parent().is(":header")) {
148+
glowEffect(anchor.parent(),1000); // section header
149+
} else {
150+
glowEffect(anchor.next(),1000); // normal member
151+
}
141152
});
142153
}
143154
}
@@ -260,18 +271,6 @@ function initNavTree(toroot,relpath) {
260271
const highlightAnchor = function() {
261272
const aname = hashUrl();
262273
const anchor = $(aname);
263-
if (anchor.parent().attr('class')=='memItemLeft') {
264-
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
265-
glowEffect(rows.children(),300); // member without details
266-
} else if (anchor.parent().attr('class')=='fieldname') {
267-
glowEffect(anchor.parent().parent(),1000); // enum value
268-
} else if (anchor.parent().attr('class')=='fieldtype') {
269-
glowEffect(anchor.parent().parent(),1000); // struct field
270-
} else if (anchor.parent().is(":header")) {
271-
glowEffect(anchor.parent(),1000); // section header
272-
} else {
273-
glowEffect(anchor.next(),1000); // normal member
274-
}
275274
gotoAnchor(anchor,aname);
276275
}
277276

@@ -453,23 +452,25 @@ function initNavTree(toroot,relpath) {
453452
showRoot();
454453

455454
$(window).bind('hashchange', () => {
456-
if (window.location.hash && window.location.hash.length>1) {
457-
let a;
458-
if ($(location).attr('hash')) {
459-
const clslink=stripPath(pathName())+':'+hashValue();
460-
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461-
}
462-
if (a==null || !$(a).parent().parent().hasClass('selected')) {
455+
if (!animationInProgress) {
456+
if (window.location.hash && window.location.hash.length>1) {
457+
let a;
458+
if ($(location).attr('hash')) {
459+
const clslink=stripPath(pathName())+':'+hashValue();
460+
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461+
}
462+
if (a==null || !$(a).parent().parent().hasClass('selected')) {
463+
$('.item').removeClass('selected');
464+
$('.item').removeAttr('id');
465+
}
466+
const link=stripPath2(pathName());
467+
navTo(o,link,hashUrl(),relpath);
468+
} else {
469+
$('#doc-content').scrollTop(0);
463470
$('.item').removeClass('selected');
464471
$('.item').removeAttr('id');
472+
navTo(o,toroot,hashUrl(),relpath);
465473
}
466-
const link=stripPath2(pathName());
467-
navTo(o,link,hashUrl(),relpath);
468-
} else if (!animationInProgress) {
469-
$('#doc-content').scrollTop(0);
470-
$('.item').removeClass('selected');
471-
$('.item').removeAttr('id');
472-
navTo(o,toroot,hashUrl(),relpath);
473474
}
474475
});
475476

pre_process/navtree.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,19 @@ function initNavTree(toroot,relpath) {
136136
docContent.animate({
137137
scrollTop: pos + dcScrTop - dcOffset
138138
},Math.max(50,Math.min(500,dist)),function() {
139-
window.location.href=aname;
140139
animationInProgress=false;
140+
if (anchor.parent().attr('class')=='memItemLeft') {
141+
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
142+
glowEffect(rows.children(),300); // member without details
143+
} else if (anchor.parent().attr('class')=='fieldname') {
144+
glowEffect(anchor.parent().parent(),1000); // enum value
145+
} else if (anchor.parent().attr('class')=='fieldtype') {
146+
glowEffect(anchor.parent().parent(),1000); // struct field
147+
} else if (anchor.parent().is(":header")) {
148+
glowEffect(anchor.parent(),1000); // section header
149+
} else {
150+
glowEffect(anchor.next(),1000); // normal member
151+
}
141152
});
142153
}
143154
}
@@ -260,18 +271,6 @@ function initNavTree(toroot,relpath) {
260271
const highlightAnchor = function() {
261272
const aname = hashUrl();
262273
const anchor = $(aname);
263-
if (anchor.parent().attr('class')=='memItemLeft') {
264-
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
265-
glowEffect(rows.children(),300); // member without details
266-
} else if (anchor.parent().attr('class')=='fieldname') {
267-
glowEffect(anchor.parent().parent(),1000); // enum value
268-
} else if (anchor.parent().attr('class')=='fieldtype') {
269-
glowEffect(anchor.parent().parent(),1000); // struct field
270-
} else if (anchor.parent().is(":header")) {
271-
glowEffect(anchor.parent(),1000); // section header
272-
} else {
273-
glowEffect(anchor.next(),1000); // normal member
274-
}
275274
gotoAnchor(anchor,aname);
276275
}
277276

@@ -453,23 +452,25 @@ function initNavTree(toroot,relpath) {
453452
showRoot();
454453

455454
$(window).bind('hashchange', () => {
456-
if (window.location.hash && window.location.hash.length>1) {
457-
let a;
458-
if ($(location).attr('hash')) {
459-
const clslink=stripPath(pathName())+':'+hashValue();
460-
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461-
}
462-
if (a==null || !$(a).parent().parent().hasClass('selected')) {
455+
if (!animationInProgress) {
456+
if (window.location.hash && window.location.hash.length>1) {
457+
let a;
458+
if ($(location).attr('hash')) {
459+
const clslink=stripPath(pathName())+':'+hashValue();
460+
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461+
}
462+
if (a==null || !$(a).parent().parent().hasClass('selected')) {
463+
$('.item').removeClass('selected');
464+
$('.item').removeAttr('id');
465+
}
466+
const link=stripPath2(pathName());
467+
navTo(o,link,hashUrl(),relpath);
468+
} else {
469+
$('#doc-content').scrollTop(0);
463470
$('.item').removeClass('selected');
464471
$('.item').removeAttr('id');
472+
navTo(o,toroot,hashUrl(),relpath);
465473
}
466-
const link=stripPath2(pathName());
467-
navTo(o,link,hashUrl(),relpath);
468-
} else if (!animationInProgress) {
469-
$('#doc-content').scrollTop(0);
470-
$('.item').removeClass('selected');
471-
$('.item').removeAttr('id');
472-
navTo(o,toroot,hashUrl(),relpath);
473474
}
474475
});
475476

res/scaling.png

63.6 KB
Loading

simulation/navtree.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,19 @@ function initNavTree(toroot,relpath) {
136136
docContent.animate({
137137
scrollTop: pos + dcScrTop - dcOffset
138138
},Math.max(50,Math.min(500,dist)),function() {
139-
window.location.href=aname;
140139
animationInProgress=false;
140+
if (anchor.parent().attr('class')=='memItemLeft') {
141+
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
142+
glowEffect(rows.children(),300); // member without details
143+
} else if (anchor.parent().attr('class')=='fieldname') {
144+
glowEffect(anchor.parent().parent(),1000); // enum value
145+
} else if (anchor.parent().attr('class')=='fieldtype') {
146+
glowEffect(anchor.parent().parent(),1000); // struct field
147+
} else if (anchor.parent().is(":header")) {
148+
glowEffect(anchor.parent(),1000); // section header
149+
} else {
150+
glowEffect(anchor.next(),1000); // normal member
151+
}
141152
});
142153
}
143154
}
@@ -260,18 +271,6 @@ function initNavTree(toroot,relpath) {
260271
const highlightAnchor = function() {
261272
const aname = hashUrl();
262273
const anchor = $(aname);
263-
if (anchor.parent().attr('class')=='memItemLeft') {
264-
let rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
265-
glowEffect(rows.children(),300); // member without details
266-
} else if (anchor.parent().attr('class')=='fieldname') {
267-
glowEffect(anchor.parent().parent(),1000); // enum value
268-
} else if (anchor.parent().attr('class')=='fieldtype') {
269-
glowEffect(anchor.parent().parent(),1000); // struct field
270-
} else if (anchor.parent().is(":header")) {
271-
glowEffect(anchor.parent(),1000); // section header
272-
} else {
273-
glowEffect(anchor.next(),1000); // normal member
274-
}
275274
gotoAnchor(anchor,aname);
276275
}
277276

@@ -453,23 +452,25 @@ function initNavTree(toroot,relpath) {
453452
showRoot();
454453

455454
$(window).bind('hashchange', () => {
456-
if (window.location.hash && window.location.hash.length>1) {
457-
let a;
458-
if ($(location).attr('hash')) {
459-
const clslink=stripPath(pathName())+':'+hashValue();
460-
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461-
}
462-
if (a==null || !$(a).parent().parent().hasClass('selected')) {
455+
if (!animationInProgress) {
456+
if (window.location.hash && window.location.hash.length>1) {
457+
let a;
458+
if ($(location).attr('hash')) {
459+
const clslink=stripPath(pathName())+':'+hashValue();
460+
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
461+
}
462+
if (a==null || !$(a).parent().parent().hasClass('selected')) {
463+
$('.item').removeClass('selected');
464+
$('.item').removeAttr('id');
465+
}
466+
const link=stripPath2(pathName());
467+
navTo(o,link,hashUrl(),relpath);
468+
} else {
469+
$('#doc-content').scrollTop(0);
463470
$('.item').removeClass('selected');
464471
$('.item').removeAttr('id');
472+
navTo(o,toroot,hashUrl(),relpath);
465473
}
466-
const link=stripPath2(pathName());
467-
navTo(o,link,hashUrl(),relpath);
468-
} else if (!animationInProgress) {
469-
$('#doc-content').scrollTop(0);
470-
$('.item').removeClass('selected');
471-
$('.item').removeAttr('id');
472-
navTo(o,toroot,hashUrl(),relpath);
473474
}
474475
});
475476

0 commit comments

Comments
 (0)