Ruby on Rails Wednesday, June 1, 2011

I did the following which seems to fix the problem, note the last two
set_style calls take a string rather than a hash:

page[k].set_style({:'font-size' => font_sz, :color => col,
:position => 'absolute', :left => (40
+ (horz)), :top => ((tidx * 100) + 70)
#:'z-index' => 20
})
page[k].set_style 'z-index: 20'
page[k].set_style 'font-size: ' + font_sz.to_s

================================================

I found this on the web:

http://groups.google.com/group/prototype-core/msg/48ce0bd3949ff222

where it seems to say:

> Note that for performance reasons, we've deprecated the use of *
> uncamelized* style property names when setting styles using a hash. So If
> you have code that looks like this:

> $("header").setStyle({ "font-size": "12px" });

> You need to replace it with either of the following:

> $("header").setStyle({ fontSize: "12px" });
> $("header").setStyle("font-size: 12px");

..
> Both params "background-color" and "z-index" won't be set anymore
> using 1.6.0.rc0.
> The exact same code does it well by using 1.5.1.1.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment