/**
 * Displays a text input form to add a label to the drawn object
 * @param text default text in the field
 * @param x x position of the input
 * @param y y position of the input
 */
function addLabel(text,x,y,confId) {
  outlineLabelInput = xGetElementById('outlineLabelInputDiv');
  outlineLabelText = xGetElementById('outline_label_text');
  
  outlineLabelText.value = text;
  xMoveTo(outlineLabelInput,x + 5,y + 5);
  outlineLabelInput.style.zIndex = 3;
  xShow(outlineLabelInput);
  var pointConf=xGetElementById('point_conf');
  pointConf.style.display = "none";  
  var lineConf=xGetElementById('line_conf');
  lineConf.style.display = "none";  
  
  var rect_polyConf=xGetElementById('rect_poly_conf');
  rect_polyConf.style.display = "none";  
  if (confId == 'point_conf'){
   pointConf.style.display = "block";  
  }
  if (confId == 'line_conf'){
  lineConf.style.display = "block";  
  }
  if (confId == 'rect_poly_conf'){
  rect_polyConf.style.display = "block";  
  
  }
  
}

/**
 * Hides the input form to add a label
 */
function hideLabel() {
  outlineLabelInput = xGetElementById('outlineLabelInputDiv');
  xHide(outlineLabelInput);
}
