Skip to content

Commit

Permalink
variable font size
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.thoughtbot.com/plugins/mile_marker/trunk@157 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information
cpytel committed Aug 2, 2007
1 parent 4b2d23e commit a5b8506
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mile_marker.rb
Expand Up @@ -45,9 +45,10 @@ def self.initialize_mile_marker()
}
function init_miles() {
$$('*[mile]').each(function(block, index) {
html = '<div id="mile_'+index+'" style="display: none; z-index: 1000; position: absolute; background-color: #000; opacity: 0.4; filter: alpha(opacity=40); color: #eee; font-family: Lucida Sans, Helvetica; font-size: 10px; font-weight: bold; white-space: nowrap; overflow: hidden;"><p style="padding: 3px 5px; background-color: #000; opacity: 1.0; filter: alpha(opacity=100); display: inline; color: #f3f3f3;">'+block.getAttribute('mile')+'</p></div>'
html = '<div id="mile_'+index+'" style="display: none; z-index: 1000; position: absolute; background-color: #000; opacity: 0.4; filter: alpha(opacity=40); color: #eee; font-family: Lucida Sans, Helvetica; font-size: 16px; font-weight: bold; white-space: nowrap; overflow: hidden;"><p style="padding: 3px 5px; background-color: #000; opacity: 1.0; filter: alpha(opacity=100); display: inline; color: #f3f3f3;">'+block.getAttribute('mile')+'</p></div>'
new Insertion.Before($(block), html);
Position.clone($(block), $('mile_'+index));
if($('mile_'+index).getHeight() <= 25) { $('mile_'+index).setStyle({fontSize: '10px'}); }
$('mile_'+index).observe("mouseover", function(event) {
element = Event.element(event);
if(element.immediateDescendants()[0])
Expand Down

0 comments on commit a5b8506

Please sign in to comment.