Commit 7dae19765df04af44edc72f981f3300834e2e880
1 parent
22e3e278
Exists in
master
and in
7 other branches
A ferramenta buffer agora aceita distâncias negativas
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
classesphp/classe_analise.php
... | ... | @@ -1180,7 +1180,7 @@ nome do layer criado com o buffer. |
1180 | 1180 | $dd2->setXY(($poPoint->x + $distancia), $poPoint->y); |
1181 | 1181 | $dd2->project($projOutObj,$projInObj); |
1182 | 1182 | $d = $dd1->distanceToPoint($dd2); |
1183 | - if ($d < 0){$d = $d * -1;} | |
1183 | + if ($distancia < 0){$d = $d * -1;} | |
1184 | 1184 | //calcula a distancia 29100 |
1185 | 1185 | //gera o buffer |
1186 | 1186 | $buffers[] = $shape->buffer($d); | ... | ... |
ferramentas/buffer/index.js
... | ... | @@ -64,7 +64,7 @@ function criarbuffer() |
64 | 64 | $i("fim").innerHTML =""; |
65 | 65 | var distancia = $i("d").value |
66 | 66 | tema = $i("temasComSel").value |
67 | - if (distancia*1 > 0) | |
67 | + if (distancia*1 != 0) | |
68 | 68 | { |
69 | 69 | aguarde("block") |
70 | 70 | var fim = function(retorno) |
... | ... | @@ -82,4 +82,6 @@ function criarbuffer() |
82 | 82 | //cp.set_persistent_connection(true); |
83 | 83 | cp.call(p,"criaBuffer",fim); |
84 | 84 | } |
85 | + else | |
86 | + {alert("Distancia invalida")} | |
85 | 87 | } | ... | ... |