mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
New maps in progress... (js)
This commit is contained in:
parent
255f67c545
commit
372dd1db1f
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user