From 62101b4eba8a799720adea75f31b41da28889596 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Thu, 4 Aug 2011 04:16:21 +0000 Subject: [PATCH] --- classesphp/classe_alteraclasse.php | 41 +++++++++++++++++++++++++++++++++++++++-- classesphp/mapa_controle.php | 6 +++++- ferramentas/legenda/index.js.php | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- 3 files changed, 110 insertions(+), 26 deletions(-) diff --git a/classesphp/classe_alteraclasse.php b/classesphp/classe_alteraclasse.php index 3ad1c50..5bf27ab 100644 --- a/classesphp/classe_alteraclasse.php +++ b/classesphp/classe_alteraclasse.php @@ -452,12 +452,40 @@ A nova classe será uma cópia da classe 0. if(!$this->layer){return "erro";} $classe = $this->layer->getclass(0); $c = ms_newClassObj($this->layer, $classe); - //$classe = $this->layer->getclass(0); - //$nova = $classe->clone; $this->layer->setMetaData("cache",""); return("ok"); } /* +function: sobeclasse + +Sobe uma classe na ordem de desenho + +Parametro: + +$idclasse {numerico} - id da classe (índice) +*/ + function sobeclasse($idclasse) + { + if(!$this->layer){return "erro";} + $this->layer->moveclassup($idclasse); + return("ok"); + } +/* +function: desceclasse + +Desce uma classe na ordem de desenho + +Parametro: + +$idclasse {numerico} - id da classe (índice) +*/ + function desceclasse($idclasse) + { + if(!$this->layer){return "erro";} + $this->layer->moveclassdown($idclasse); + return("ok"); + } +/* function: adicionaopacidade Adiciona opacidade variável de 0 a 100 conforme o número de classes @@ -488,6 +516,11 @@ function: alteracor Aplica uma nova cor aos estilos de uma classe +Parametros: + +$idclasse {numerico} - id da classe (índice) + +$cor {string} - cor rgb */ function alteracor($idclasse,$cor) { @@ -512,6 +545,9 @@ function: alterageometria Altera a geometria de representação de todos os estilos de todas as classes de um layer +Parametro: + +$tipo {string} - tipo de representação */ function alterageometria($tipo) { @@ -538,6 +574,7 @@ function: alteraCoresClasses Altera as cores das classes existentes em um objeto layer gerando uma paleta de cores de acordo com um valor inicial e final. Parametros: + $cori - cor inicial. $corf - cor final. diff --git a/classesphp/mapa_controle.php b/classesphp/mapa_controle.php index c8bcc6d..f8ec787 100644 --- a/classesphp/mapa_controle.php +++ b/classesphp/mapa_controle.php @@ -1468,7 +1468,11 @@ Altera uma classe de um tema, aplicando uma nova classificação ou modificando pa $cores = str_replace(")","",$cores); $cores = str_replace("(","",$cores); $retorno = $m->aplicacoresrgb(explode(";",$cores)); - } + } + if ($opcao == "sobeclasse") + {$retorno = $m->sobeclasse($idclasse);} + if ($opcao == "desceclasse") + {$retorno = $m->desceclasse($idclasse);} if ($opcao == "alteracor") {$retorno = $m->alteracor($idclasse,$cor);} if ($opcao == "adicionaopacidade") diff --git a/ferramentas/legenda/index.js.php b/ferramentas/legenda/index.js.php index 2904c39..beb3249 100644 --- a/ferramentas/legenda/index.js.php +++ b/ferramentas/legenda/index.js.php @@ -142,18 +142,17 @@ i3GEOF.legenda = { ); if(navm) {$i("i3GEOlegendabotao2-button").style.width = "0px";} + new YAHOO.widget.Button( "i3GEOlegendabotao3", {onclick:{fn: i3GEOF.legenda.adicionaConta}} ); - if(navm) - {$i("i3GEOlegendabotao3-button").style.width = "0px";} + new YAHOO.widget.Button( "i3GEOlegendabotao15", {onclick:{fn: i3GEOF.legenda.adicionaOpacidade}} ); - if(navm) - {$i("i3GEOlegendabotao15-button").style.width = "0px";} + new YAHOO.widget.Button( "i3GEOlegendabotao4", {onclick:{fn: i3GEOF.legenda.paleta}} @@ -246,33 +245,34 @@ i3GEOF.legenda = { ' '+ '
'+ '
'+ - '

Mostra as classes desse tema na legenda do mapa' + - ' ' + - ' ' + - ' ' + - '
' + + '

  Mostra as classes desse tema na legenda do mapa

' + + '

' + + '

' + + '

' + + ' ' + ' ' + - ' ' + - ' ' + + ' ' + ' ' + - ' ' + + ' ' + + ' ' + - ' ' + + ' ' + + ' ' + + ' ' + ' ' + '
de:Gerar cores de:' + $inputText("","","i3GEOlegendaacori","",12,"0,0,0") + - ' aquarela.gif ' + ' até:'+ + ' aquarela.gif ' + + ' até:'+ $inputText("","","i3GEOlegendaacorf","",12,"255,255,255") + - ' aquarela.gif ' + - ' ouaquarela.gif ' + + '
' + '
' + '
'+ ' ' + ' '+ - ' ' + - '
' + - + ' ' + + '
' + '
' + '
'+ '
'+ @@ -424,10 +424,12 @@ i3GEOF.legenda = { ajuda, id, re, - exp; + exp, + n; if (retorno.data[0].proc === ""){ ins.push(""); - for (i=0;i"); + ins.push(""); + if(n>1){ + ins.push(""); + ins.push(""); + } + ins.push(""); } ins.push("
nomeexpressão
"); ins.push($inputText("","","i3GEOlegendaid_"+id,"digite a nova expressão",30,exp,"expressao","javascript:i3GEOF.legenda.aviso()")); - ins.push("

"); $i("i3GEOlegendaresultado").innerHTML = ins.join(""); @@ -810,9 +817,45 @@ i3GEOF.legenda = { p.removeChild(p.childNodes[0]); } while (p.childNodes.length > 0); p.parentNode.removeChild(p); - //i3GEOF.legenda.mudaLegenda(); + i3GEOF.legenda.mudaLegenda(); }, /* + Function: sobelinhaf + + Sobe uma linha na tabela de edição de classes da legendda + */ + sobelinhaf: function(idclasse){ + if(i3GEOF.legenda.aguarde.visibility === "visible") + {return;} + i3GEOF.legenda.aguarde.visibility = "visible"; + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=ALTERACLASSE&opcao=sobeclasse&tema="+i3GEOF.legenda.tema+"&idclasse="+idclasse, + cp = new cpaint(), + temp = function(){ + i3GEOF.legenda.aguarde.visibility = "hidden"; + i3GEOF.legenda.mudaLegenda(); + }; + cp.set_response_type("JSON"); + cp.call(p,"foo",temp); + }, + /* + Function: descelinhaf + + Desce uma linha na tabela de edição de classes da legendda + */ + descelinhaf: function(idclasse){ + if(i3GEOF.legenda.aguarde.visibility === "visible") + {return;} + i3GEOF.legenda.aguarde.visibility = "visible"; + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=ALTERACLASSE&opcao=desceclasse&tema="+i3GEOF.legenda.tema+"&idclasse="+idclasse, + cp = new cpaint(), + temp = function(){ + i3GEOF.legenda.aguarde.visibility = "hidden"; + i3GEOF.legenda.mudaLegenda(); + };; + cp.set_response_type("JSON"); + cp.call(p,"foo",temp); + }, + /* Function: editaSimbolo Abre o editor de símbolos -- libgit2 0.21.2