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 This function manages nodes tooltips
*/ */
MapController.prototype.tooltip_map = function(self, event) { MapController.prototype.tooltip_map = function(self, event) {
/*------------------- PRUEBA CON TOOLTIPSTER ----------------------*/
//~ $(this._target + " svg circle").after($("<div>").attr("id", "tooltipster_node"));
//~ console.log($(event.currentTarget)); nodeR = parseInt($(event.currentTarget).attr("r"));
//~ 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"));
//~
$(event.currentTarget).tooltipster({ $(event.currentTarget).tooltipster({
arrow: true, arrow: true,
trigger: 'click', trigger: 'click',
@ -184,5 +168,6 @@ MapController.prototype.tooltip_map = function(self, event) {
}); });
$(event.currentTarget).tooltipster("show"); $(event.currentTarget).tooltipster("show");
/*-----------------------------------------------------------------*/
} }

View File

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

View File

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