added click on a on text fire the click on nav links
This commit is contained in:
Vendored
+12
@@ -3235,6 +3235,8 @@ var _Dot = {
|
|||||||
oninit: function(vn){
|
oninit: function(vn){
|
||||||
this.id = vn.attrs.id;
|
this.id = vn.attrs.id;
|
||||||
this.type = vn.attrs.type;
|
this.type = vn.attrs.type;
|
||||||
|
|
||||||
|
// construct text
|
||||||
this.text = markdown.render(vn.attrs.text);
|
this.text = markdown.render(vn.attrs.text);
|
||||||
|
|
||||||
// construct summary
|
// construct summary
|
||||||
@@ -3309,6 +3311,16 @@ var _Dot = {
|
|||||||
link.classList.remove('highlight');
|
link.classList.remove('highlight');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onclick:function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
if(e.target.nodeName == "A" ){
|
||||||
|
// console.log("over e.target", e.target);
|
||||||
|
// console.log('over vn', vn);
|
||||||
|
var id = e.target.getAttribute("href");
|
||||||
|
// add highlight class
|
||||||
|
vn.dom.querySelector('nav.links>div[uid="'+id+'"]>.summary').click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, m.trust(this.text)),
|
}, m.trust(this.text)),
|
||||||
// links from
|
// links from
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -28,6 +28,8 @@ var _Dot = {
|
|||||||
oninit: function(vn){
|
oninit: function(vn){
|
||||||
this.id = vn.attrs.id;
|
this.id = vn.attrs.id;
|
||||||
this.type = vn.attrs.type;
|
this.type = vn.attrs.type;
|
||||||
|
|
||||||
|
// construct text
|
||||||
this.text = markdown.render(vn.attrs.text);
|
this.text = markdown.render(vn.attrs.text);
|
||||||
|
|
||||||
// construct summary
|
// construct summary
|
||||||
@@ -102,6 +104,16 @@ var _Dot = {
|
|||||||
link.classList.remove('highlight');
|
link.classList.remove('highlight');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onclick:function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
if(e.target.nodeName == "A" ){
|
||||||
|
// console.log("over e.target", e.target);
|
||||||
|
// console.log('over vn', vn);
|
||||||
|
var id = e.target.getAttribute("href");
|
||||||
|
// add highlight class
|
||||||
|
vn.dom.querySelector('nav.links>div[uid="'+id+'"]>.summary').click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, m.trust(this.text)),
|
}, m.trust(this.text)),
|
||||||
// links from
|
// links from
|
||||||
|
|||||||
Reference in New Issue
Block a user