e70152e44cc66cc599ff6b699eb8adc07f3e656a
kent
  Sat May 24 21:09:34 2014 -0700
Adding Copyright NNNN Regents of the University of California to all files I believe with reasonable certainty were developed under UCSC employ or as part of Genome Browser copyright assignment.
diff --git src/hg/hgGenome/clickOnImage.c src/hg/hgGenome/clickOnImage.c
index 2ebbf4e..23f1516 100644
--- src/hg/hgGenome/clickOnImage.c
+++ src/hg/hgGenome/clickOnImage.c
@@ -1,47 +1,50 @@
 /* clickOnImage - handle click on image. Calculate position in genome
  * and forward to genome browser. */
 
+/* Copyright (C) 2011 The Regents of the University of California 
+ * See README in this or parent directory for licensing information. */
+
 #include "common.h"
 #include "hash.h"
 #include "jksql.h"
 #include "cheapcgi.h"
 #include "chromGraph.h"
 #include "genoLay.h"
 #include "binRange.h"
 #include "hdb.h"
 #include "hgGenome.h"
 
 
 struct genoLayChrom *genoLayChromAt(struct genoLay *gl, int x, int y)
 /* Return chromosome if any at x,y */
 {
 struct genoLayChrom *chrom;
 for (chrom = gl->chromList; chrom != NULL; chrom = chrom->next)
     {
     if (chrom->x <= x && x < chrom->x + chrom->width
        && chrom->y <= y && y < chrom->y + chrom->height)
        break;
     }
 return chrom;
 }
 
 void clickOnImage(struct sqlConnection *conn)
 /* Handle click on image - calculate position in forward to genome browser. */
 {
 int x = cartInt(cart, hggClickX);
 int y = cartInt(cart, hggClickY);
 struct genoLay *gl = ggLayout(conn, linesOfGraphs(), graphsPerLine());
 struct genoLayChrom *chrom = genoLayChromAt(gl, x, y);
 if (chrom != NULL)
     {
     int base = gl->basesPerPixel*(x - chrom->x);
     int start = base-500000, end=base+500000;
     if (start<0) start=0;
     printf("Location: ../cgi-bin/hgTracks?db=%s&%s&position=%s:%d-%d&hgGenomeClick=image\r\n\r\n",
     	database, cartSidUrlString(cart), chrom->fullName, start+1, end);
     }
 else
     {
     hggDoUsualHttp();
     }
 }