Logo Search packages:      
Sourcecode: nagvis version File versions  Download package

WuiMap::parseObjects (  ) 

Parses all objects on the map

Returns:
Array Html
Author:
Lars Michelsen <lars@vertical-visions.de>

Definition at line 221 of file WuiMap.php.

                              {
            if (DEBUG&&DEBUGLEVEL&1) debug('Start method WuiMap::parseObjects()');
            $ret = Array();
            
            foreach($this->objects AS $var => $obj) {
                  switch($obj['type']) {
                        case 'textbox':
                              $obj['class'] = "box";
                              $obj['icon'] = "20x20.gif";
                              
                              $ret = array_merge($ret,$this->textBox($obj));
                              $obj = $this->fixIcon($obj);
                              $ret = array_merge($ret,$this->parseIcon($obj));
                        break;
                        default:
                              if(isset($obj['line_type'])) {
                                    list($pointa_x,$pointb_x) = explode(",", $obj['x']);
                                    list($pointa_y,$pointb_y) = explode(",", $obj['y']);
                                    $ret[] = "<script type=\"text/javascript\">myshape_background.drawLine(".$pointa_x.",".$pointa_y.",".$pointb_x.",".$pointb_y.");</script>";
                                    $obj['x'] = $this->GRAPHIC->middle($pointa_x,$pointb_x) - 10;
                                    $obj['y'] = $this->GRAPHIC->middle($pointa_y,$pointb_y) - 10;
                                    
                                    $obj['icon'] = '20x20.gif';
                              } else {
                                    // add this object to the list of the components which will have to be movable, if it's not a line or a textbox
                                    if(!isset($obj['line_type']) && $obj['type'] != 'textbox') {
                                          $this->moveable .= "\"box_".$obj['type']."_".$obj['id']."\",";
                                    }
                              }
                              
                              $obj = $this->fixIcon($obj);
                              $ret = array_merge($ret,$this->parseIcon($obj));
                              
                              if(isset($obj['label_show']) && $obj['label_show'] == '1') {
                                    $ret[] = $this->parseLabel($obj);
                              }
                        break;      
                  }
            }
            if (DEBUG&&DEBUGLEVEL&1) debug('End method WuiMap::parseObjects(): Array(HTML)');
            return $ret;
      }


Generated by  Doxygen 1.6.0   Back to index