2016-02-04 13:11:14 +01:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
2016-02-05 16:16:41 +01:00
|
|
|
// Constructor
|
2016-02-05 15:53:59 +01:00
|
|
|
var MapController = function(target) {
|
|
|
|
this._target = target;
|
2016-02-05 16:16:41 +01:00
|
|
|
|
2016-02-08 13:47:46 +01:00
|
|
|
this._id = $(target).data('id');
|
2016-02-04 13:11:14 +01:00
|
|
|
}
|
2016-02-05 15:53:59 +01:00
|
|
|
|
2016-02-05 16:16:41 +01:00
|
|
|
// Atributes
|
2016-02-08 13:47:46 +01:00
|
|
|
MapController.prototype._id = null;
|
2016-02-05 16:16:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
// Methods
|
2016-02-05 15:53:59 +01:00
|
|
|
MapController.prototype.init_map = function() {
|
2016-02-05 16:16:41 +01:00
|
|
|
$(this._target + " svg").append(
|
2016-02-05 15:53:59 +01:00
|
|
|
$("<g>").append(
|
|
|
|
$("<circle>")
|
|
|
|
.attr("id", "node_10")
|
|
|
|
.attr("class", "node")
|
|
|
|
.attr("cx", "100")
|
|
|
|
.attr("cy", "100")
|
|
|
|
.attr("style", "fill: rgb(128, 186, 39);")
|
|
|
|
.attr("r", "5")
|
|
|
|
)
|
|
|
|
);
|
2016-02-05 16:16:41 +01:00
|
|
|
|
|
|
|
};
|