Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

variable font size

git-svn-id: https://svn.thoughtbot.com/plugins/mile_marker/trunk@157 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
commit a5b8506fb61a9f6c865e74a0c5bc27c36f70a14f 1 parent 4b2d23e
cpytel authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/mile_marker.rb
View
3  lib/mile_marker.rb
@@ -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])
Please sign in to comment.
Something went wrong with that request. Please try again.