mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Working in the selection.
This commit is contained in:
parent
2a833fbc73
commit
d9c813969c
36
pandora_console/images/maps/square_selection.svg
Normal file
36
pandora_console/images/maps/square_selection.svg
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
version="1.1">
|
||||||
|
<defs>
|
||||||
|
<symbol id="square_selection">
|
||||||
|
<g>
|
||||||
|
<rect
|
||||||
|
y="0"
|
||||||
|
x="0"
|
||||||
|
height="100"
|
||||||
|
width="100"
|
||||||
|
style="
|
||||||
|
fill:#000000;
|
||||||
|
fill-opacity:0;"
|
||||||
|
/>
|
||||||
|
<rect
|
||||||
|
y="2"
|
||||||
|
x="2"
|
||||||
|
height="98"
|
||||||
|
width="98"
|
||||||
|
style="opacity: 1;
|
||||||
|
fill: #000000;
|
||||||
|
fill-opacity: 0.5;
|
||||||
|
stroke: #ff7d00;
|
||||||
|
stroke-width: 4;
|
||||||
|
stroke-dasharray: 4, 4;
|
||||||
|
stroke-opacity: 1" />
|
||||||
|
</g>
|
||||||
|
</symbol>
|
||||||
|
</defs>
|
||||||
|
<g transform="translate(100,100)">
|
||||||
|
<use xlink:href="#square_selection" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 691 B |
@ -100,197 +100,197 @@ abstract class Map {
|
|||||||
|
|
||||||
public function writeJSGraph() {
|
public function writeJSGraph() {
|
||||||
|
|
||||||
$this->nodes = json_decode('[
|
//~ $this->nodes = json_decode('[
|
||||||
{
|
//~ {
|
||||||
"graph_id": "165",
|
//~ "graph_id": "165",
|
||||||
"id": "17",
|
//~ "id": "17",
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 1033.4,
|
//~ "x": 1033.4,
|
||||||
"y": 806.38
|
//~ "y": 806.38
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "166",
|
//~ "graph_id": "166",
|
||||||
"id": "198",
|
//~ "id": "198",
|
||||||
"type": 1,
|
//~ "type": 1,
|
||||||
"x": 1119.5,
|
//~ "x": 1119.5,
|
||||||
"y": 847.85
|
//~ "y": 847.85
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 208,
|
//~ "graph_id": 208,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "169",
|
//~ "graph_id": "169",
|
||||||
"id": "207",
|
//~ "id": "207",
|
||||||
"type": 1,
|
//~ "type": 1,
|
||||||
"x": 947.33,
|
//~ "x": 947.33,
|
||||||
"y": 764.91
|
//~ "y": 764.91
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 209,
|
//~ "graph_id": 209,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "179",
|
//~ "graph_id": "179",
|
||||||
"id": "27",
|
//~ "id": "27",
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 159.23,
|
//~ "x": 159.23,
|
||||||
"y": 1005.9
|
//~ "y": 1005.9
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "180",
|
//~ "graph_id": "180",
|
||||||
"id": "223",
|
//~ "id": "223",
|
||||||
"type": 1,
|
//~ "type": 1,
|
||||||
"x": 218.82,
|
//~ "x": 218.82,
|
||||||
"y": 931.19
|
//~ "y": 931.19
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "183",
|
//~ "graph_id": "183",
|
||||||
"id": "89",
|
//~ "id": "89",
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 516.77,
|
//~ "x": 516.77,
|
||||||
"y": 557.57
|
//~ "y": 557.57
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "184",
|
//~ "graph_id": "184",
|
||||||
"id": "418",
|
//~ "id": "418",
|
||||||
"type": 1,
|
//~ "type": 1,
|
||||||
"x": 430.66,
|
//~ "x": 430.66,
|
||||||
"y": 599.03
|
//~ "y": 599.03
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": "196",
|
//~ "graph_id": "196",
|
||||||
"id": "412",
|
//~ "id": "412",
|
||||||
"type": 1,
|
//~ "type": 1,
|
||||||
"x": 602.88,
|
//~ "x": 602.88,
|
||||||
"y": 516.1
|
//~ "y": 516.1
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 212,
|
//~ "graph_id": 212,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 213,
|
//~ "graph_id": 213,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
|
//~
|
||||||
|
//~
|
||||||
|
//~
|
||||||
|
//~
|
||||||
|
//~
|
||||||
|
//~
|
||||||
{
|
//~ {
|
||||||
"graph_id": 214,
|
//~ "graph_id": 214,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 300,
|
//~ "x": 300,
|
||||||
"y": 300
|
//~ "y": 300
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 215,
|
//~ "graph_id": 215,
|
||||||
"id": 999,
|
//~ "id": 999,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 300,
|
//~ "x": 300,
|
||||||
"y": 100
|
//~ "y": 100
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 216,
|
//~ "graph_id": 216,
|
||||||
"id": 999,
|
//~ "id": 999,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 300,
|
//~ "x": 300,
|
||||||
"y": 500
|
//~ "y": 500
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 217,
|
//~ "graph_id": 217,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 100,
|
//~ "x": 100,
|
||||||
"y": 300
|
//~ "y": 300
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 218,
|
//~ "graph_id": 218,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 500,
|
//~ "x": 500,
|
||||||
"y": 300
|
//~ "y": 300
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 219,
|
//~ "graph_id": 219,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 500,
|
//~ "x": 500,
|
||||||
"y": 100
|
//~ "y": 100
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 220,
|
//~ "graph_id": 220,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 500,
|
//~ "x": 500,
|
||||||
"y": 500
|
//~ "y": 500
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 221,
|
//~ "graph_id": 221,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 100,
|
//~ "x": 100,
|
||||||
"y": 100
|
//~ "y": 100
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 222,
|
//~ "graph_id": 222,
|
||||||
"id": 666,
|
//~ "id": 666,
|
||||||
"type": 0,
|
//~ "type": 0,
|
||||||
"x": 100,
|
//~ "x": 100,
|
||||||
"y": 500
|
//~ "y": 500
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 400,
|
//~ "graph_id": 400,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 401,
|
//~ "graph_id": 401,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 402,
|
//~ "graph_id": 402,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 403,
|
//~ "graph_id": 403,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 404,
|
//~ "graph_id": 404,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 405,
|
//~ "graph_id": 405,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 406,
|
//~ "graph_id": 406,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
},
|
//~ },
|
||||||
{
|
//~ {
|
||||||
"graph_id": 407,
|
//~ "graph_id": 407,
|
||||||
"type": 2
|
//~ "type": 2
|
||||||
}
|
//~ }
|
||||||
]', true);
|
//~ ]', true);
|
||||||
|
//~
|
||||||
$this->edges = json_decode(
|
//~ $this->edges = json_decode(
|
||||||
'[
|
//~ '[
|
||||||
{"to":"215","from":"214","graph_id":400},
|
//~ {"to":"215","from":"214","graph_id":400},
|
||||||
{"to":"216","from":"214","graph_id":401},
|
//~ {"to":"216","from":"214","graph_id":401},
|
||||||
{"to":"217","from":"214","graph_id":402},
|
//~ {"to":"217","from":"214","graph_id":402},
|
||||||
{"to":"218","from":"214","graph_id":403}
|
//~ {"to":"218","from":"214","graph_id":403}
|
||||||
]', true);
|
//~ ]', true);
|
||||||
|
//~
|
||||||
$this->edges = json_decode(
|
//~ $this->edges = json_decode(
|
||||||
'[
|
//~ '[
|
||||||
{"to":"219","from":"214","graph_id":404},
|
//~ {"to":"219","from":"214","graph_id":404},
|
||||||
{"to":"220","from":"214","graph_id":405},
|
//~ {"to":"220","from":"214","graph_id":405},
|
||||||
{"to":"221","from":"214","graph_id":406},
|
//~ {"to":"221","from":"214","graph_id":406},
|
||||||
{"to":"222","from":"214","graph_id":407}
|
//~ {"to":"222","from":"214","graph_id":407}
|
||||||
]', true);
|
//~ ]', true);
|
||||||
|
|
||||||
|
|
||||||
//~ $this->edges = json_decode(
|
//~ $this->edges = json_decode(
|
||||||
@ -298,17 +298,17 @@ $this->edges = json_decode(
|
|||||||
//~ {"to":"215","from":"214","graph_id":400}
|
//~ {"to":"215","from":"214","graph_id":400}
|
||||||
//~ ]', true);
|
//~ ]', true);
|
||||||
|
|
||||||
$this->edges = json_decode(
|
//~ $this->edges = json_decode(
|
||||||
'[
|
//~ '[
|
||||||
{"to":"215","from":"214","graph_id":400},
|
//~ {"to":"215","from":"214","graph_id":400},
|
||||||
{"to":"216","from":"214","graph_id":401},
|
//~ {"to":"216","from":"214","graph_id":401},
|
||||||
{"to":"217","from":"214","graph_id":402},
|
//~ {"to":"217","from":"214","graph_id":402},
|
||||||
{"to":"218","from":"214","graph_id":403},
|
//~ {"to":"218","from":"214","graph_id":403},
|
||||||
{"to":"219","from":"214","graph_id":404},
|
//~ {"to":"219","from":"214","graph_id":404},
|
||||||
{"to":"220","from":"214","graph_id":405},
|
//~ {"to":"220","from":"214","graph_id":405},
|
||||||
{"to":"221","from":"214","graph_id":406},
|
//~ {"to":"221","from":"214","graph_id":406},
|
||||||
{"to":"222","from":"214","graph_id":407}
|
//~ {"to":"222","from":"214","graph_id":407}
|
||||||
]', true);
|
//~ ]', true);
|
||||||
|
|
||||||
//~ $this->edges = json_decode('[{"to":"165","from":"166","graph_id":208}]', true);
|
//~ $this->edges = json_decode('[{"to":"165","from":"166","graph_id":208}]', true);
|
||||||
|
|
||||||
|
@ -340,6 +340,34 @@ MapController.prototype.move_arrow = function (id_from_any_point_arrow) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MapController.prototype.paint_resize_square = function(item, wait) {
|
||||||
|
if (typeof(wait) === "undefined")
|
||||||
|
wait = 1;
|
||||||
|
|
||||||
|
var count_files = 1;
|
||||||
|
function wait_load(callback) {
|
||||||
|
count_files--;
|
||||||
|
|
||||||
|
if (count_files == 0) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (wait) {
|
||||||
|
/*---------------------------------------------*/
|
||||||
|
/*-------- Preload head and body arrow --------*/
|
||||||
|
/*---------------------------------------------*/
|
||||||
|
case 1:
|
||||||
|
arrow_layout = arrow_layout.append("g")
|
||||||
|
.attr("class", "arrow_position_rotation")
|
||||||
|
.append("g")
|
||||||
|
.attr("class", "arrow_translation")
|
||||||
|
.append("g")
|
||||||
|
.attr("class", "arrow_container");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function init_events
|
* Function init_events
|
||||||
* Return boolean
|
* Return boolean
|
||||||
@ -355,6 +383,12 @@ MapController.prototype.init_events = function(principalObject) {
|
|||||||
self.openNodeDetais(self, elm);
|
self.openNodeDetais(self, elm);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Resize',
|
||||||
|
action: function(elm, d, i) {
|
||||||
|
self.paint_resize_square(d);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Edit',
|
title: 'Edit',
|
||||||
action: function(elm, d, i) {
|
action: function(elm, d, i) {
|
||||||
@ -375,6 +409,12 @@ MapController.prototype.init_events = function(principalObject) {
|
|||||||
action: function(elm, d, i) {
|
action: function(elm, d, i) {
|
||||||
console.log('Edit map!!');
|
console.log('Edit map!!');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Save map',
|
||||||
|
action: function(elm, d, i) {
|
||||||
|
console.log('Save map!!');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user