6 /cview/map/overview.mas - a mason component that draws a map overview, including resize and highlight functionality
16 a CXGN::Cview::Map object (or subclass thereof)
20 a list of marker names, which will be highlighted on the map.
24 a scalar with a list of chromosomes, positions (numeric), and names, separated by newline. These will be mapped and shown highlighted on the map. Good for drawing positions of gene families etc.
28 the size of the chromosomes, as a value of 1..10. defaults to 1.
32 if set to 1, always regenerate the image and map cache. Defaults to 0.
36 the width of the image in pixels, default is 820.
42 Lukas Mueller <lam87@cornell.edu>
63 use CXGN::Page::FormattingHelpers qw | tooltipped_text |;
65 # add the input box and form for the hilite marker feature
67 my $hilite_tooltip = tooltipped_text("Highlight marker(s)", "You can highlight markers on the overview graphic by entering them here, separated by spaces");
68 my $size_tooltip = tooltipped_text("Image size", "You can increase the size of the overview graph by clicking on the (+) button and decrease it by clicking on (-).");
70 my $hilite = join " ", @hilite_markers;
72 my $message_html = "";
74 if ($message) { $message_html = qq | <div class="boxbgcolor2">$message<br /></div> |; }
77 my $shrink_button_disabled = '';
78 my $enlarge_button_disabled = '';
84 $shrink_button_disabled = qq { disabled="1" };
85 $smaller_size = $size;
88 $smaller_size = $size - 1;
93 $enlarge_button_disabled = qq { disabled="1" };
97 $larger_size = $size+ 1;
100 $larger_size = 10 if $larger_size > 10;
106 <div class="well" style="overflow:scroll">
109 <% $overview_image %>
115 <div class="col-sm-1 col-md-1 col-lg-2">
117 <div class="col-sm-10 col-md-10 col-lg-8">
119 <div class="col-sm-7 col-md-8 col-lg-8">
121 <form action="<% $map_url %>" class="form-horizontal" role="form">
122 <div class="form-group">
123 <label class="col-sm-3 control-label"><% $hilite_tooltip %>: </label>
124 <div class="col-sm-9">
125 <input type="hidden" name="map_items" value="<% $map_items %>" />
126 <input type="hidden" name="map_version_id" value="<% $map_version_id %>" />
127 <input type="hidden" name="size" value="<% $size %>" />
128 <div class="input-group">
129 <input class="form-control" type="text" name="hilite" value="<% $hilite %>" aria-describedby="basic-addon1"/>
130 <span class="input-group-btn" id="basic-addon1"><button class="btn btn-info" type="submit" value="Highlight">Highlight</button></span>
137 <div class="col-sm-5 col-md-4 col-lg-4">
139 <label style="float:left" ><% $size_tooltip %>: </label>
141 <form style="float:left" action="<% $map_url %>"
142 <input type="hidden" name="map_items" value="<% $map_items %>" />
143 <input type="hidden" name="map_version_id" value="<% $map_version_id %>" />
144 <input type="hidden" name="size" value="<% $smaller_size %>" />
145 <input type="hidden" name="hilite" value="<% $hilite %>" />
146 <button class="btn btn-default" type="submit" value="-" <% $shrink_button_disabled %> > - </button>
148 <form style="float:left" action="<% $map_url %>" >
149 <input type="hidden" name="map_items" value="<% $map_items %>" />
150 <input type="hidden" name="map_version_id" value="<% $map_version_id %>" />
151 <input type="hidden" name="hilite" value="<% $hilite %>" />
152 <input type="hidden" name="size" value="<% $larger_size %>" />
153 <button class="btn btn-default" type="submit" value="+" <% $enlarge_button_disabled %> > + </button>
159 <div class="col-sm-1 col-md-1 col-lg-2">