New maps in progress... (first version of nodes tooltip)

This commit is contained in:
Arturo Gonzalez 2016-02-19 13:43:23 +01:00
parent 3e8cb70d0b
commit 0afd6e3eb6
3 changed files with 9 additions and 24 deletions

View File

@ -156,25 +156,9 @@ Return void
This function manages nodes tooltips
*/
MapController.prototype.tooltip_map = function(self, event) {
/*------------------- PRUEBA CON TOOLTIPSTER ----------------------*/
//~ $(this._target + " svg circle").after($("<div>").attr("id", "tooltipster_node"));
//~ console.log($(event.currentTarget));
//~ console.log($(event.currentTarget).position());
//~ console.log($(event.currentTarget).position()['top']);
//~ console.log("-------------");
//~ console.log($(this._target + " svg tooltipster_node"));
//~ // Node position and radius
//~ nodeX = parseInt($(event.currentTarget).position()['top']);
//~ nodeY = parseInt($(event.currentTarget).position()['left']);
//~ nodeR = parseInt($(event.currentTarget).attr("r"));
//~
//~ var tooltipOffsetX = nodeX + nodeR;
//~ var tooltipOffsetY = nodeY + nodeR;
//~
//~ console.log($(event.currentTarget).attr("cx"));
//~ console.log($(event.currentTarget).attr("cy"));
//~
nodeR = parseInt($(event.currentTarget).attr("r"));
$(event.currentTarget).tooltipster({
arrow: true,
trigger: 'click',
@ -184,5 +168,6 @@ MapController.prototype.tooltip_map = function(self, event) {
});
$(event.currentTarget).tooltipster("show");
/*-----------------------------------------------------------------*/
}

View File

@ -1,6 +1,6 @@
.tooltipster-noir {
border-radius: 0px;
border: 3px solid #2c2c2c;
border-radius: 0px;
border: 3px solid #82E92B;
background: #fff;
color: #2c2c2c;
}

View File

@ -1,7 +1,7 @@
.tooltipster-punk {
border-radius: 5px;
border-bottom: 3px solid #f71169;
background: #2a2a2a;
border-radius: 5px;
border-bottom: 3px solid #82B92E;
background: #ccc;
color: #fff;
}
.tooltipster-punk .tooltipster-content {