Starting with the javascript objects for the new maps.
This commit is contained in:
parent
35159cf1ac
commit
9307a6e77e
|
@ -36,7 +36,7 @@ abstract class Map {
|
|||
|
||||
$this->requires_js = array();
|
||||
$this->requires_js[] = "include/javascript/d3.3.5.14.js";
|
||||
//~ $this->requires_js[] = "include/javascript/map/MapController.js";
|
||||
$this->requires_js[] = "include/javascript/map/MapController.js";
|
||||
}
|
||||
|
||||
private function loadDB() {
|
||||
|
|
|
@ -25,7 +25,7 @@ class Networkmap extends Map {
|
|||
public function __construct($id) {
|
||||
parent::__construct($id);
|
||||
|
||||
//~ $this->requires_js[] = "include/javascript/map/NetworkMapController.js";
|
||||
$this->requires_js[] = "include/javascript/map/NetworkmapController.js";
|
||||
}
|
||||
|
||||
public function show() {
|
||||
|
|
|
@ -12,6 +12,24 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
var MapController = function() {
|
||||
|
||||
var MapController = function(target) {
|
||||
this._target = target;
|
||||
}
|
||||
|
||||
MapController.prototype.init_map = function() {
|
||||
$("#" + this._target + " svg").append(
|
||||
$("<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")
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
MapController.prototype.test333 = function(aaa) {
|
||||
console.log(aaa);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// 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.
|
||||
|
||||
var NetworkmapController = function(target) {
|
||||
MapController.call(this, target);
|
||||
}
|
||||
|
||||
NetworkmapController.prototype = new MapController();
|
||||
NetworkmapController.prototype.constructor = NetworkmapController;
|
Loading…
Reference in New Issue