New maps in progress... (js)

This commit is contained in:
Arturo Gonzalez 2016-02-08 17:03:43 +01:00
parent 255f67c545
commit 372dd1db1f

View File

@ -36,5 +36,32 @@ MapController.prototype.init_map = function() {
.attr("r", "5")
)
);
this.init_events();
};
MapController.prototype.init_events = function(principalObject) {
$(this._target + " svg *, " + this._target + " svg").on("mousedown", {map: this}, this.click_event);
}
MapController.prototype.click_event = function(event) {
var self = event.data.map;
event.preventDefault();
event.stopPropagation();
switch (event.which) {
case 1:
if ($(event.currentTarget).attr("class") == "node") {
self.popup_map();
}
break;
case 2:
break;
case 3:
break;
default:
break;
}
}
MapController.prototype.popup_map = function() {
//POP-UP
}