Skip to content
Snippets Groups Projects
Commit 144e9ec6 authored by tuhe's avatar tuhe
Browse files

Last changes before changing to github

parent ba37e822
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ cy.nodes().forEach(function (node) {
node.style({
'width': 'label', //(node:any) => { return node.data('name').length * 7 }, // node.data('bbox').w, // can be 'label' or
'height': node.data('bbox').h,
"border-width": node.data('border-width'),
// "border-width": node.data('border-width'),
// "border-color": node.data('border-color'),
});
......@@ -173,8 +173,8 @@ cy.nodes().forEach(function (node) {
node.style({
'label': node.data('label'),
'text-wrap': 'wrap',
'font-size': node.data('font-size'),
'color': node.data('color')
// 'font-size': node.data('font-size'),
// 'color': node.data('color')
});
}
});
......@@ -232,6 +232,37 @@ cy.on('tap', 'node', function(){
window.location.href = this.data('href');
}
});
cy.layout(options).run();
// END TUE HERE
document.addEventListener("DOMContentLoaded", function() {
function makePopper(ele) {
let ref = ele.popperRef(); // used only for positioning
ele.tippy = tippy(ref, { // tippy options:
content: () => {
let content = document.createElement('div');
content.innerHTML = ele.data('mouseover');
return content;
},
trigger: 'manual' // probably want manual mode
});
}
cy.ready(function() {
cy.elements().forEach(function(ele) {
if( ele.data('mouseover') != ''){
makePopper(ele);
}
});
});
cy.elements().unbind('mouseover');
cy.elements().bind('mouseover', (event) => event.target.tippy.show());
cy.elements().unbind('mouseout');
cy.elements().bind('mouseout', (event) => event.target.tippy.hide());
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment