curationexperts/riiif — pull request #16 by bmaddy (2014-01-17 18:39:49+00:00)
Title: made it so you can put raw javascript variables in the options

Turbolinks and seadragon don't play nicely together. When going to new pages, the seadragon view will be duplicated on the same node and two of them will appear (and more as you go to subsequent pages). I thought maybe creating a dom-node and then passing it into the seadragon 'element' option would fix this but it didn't.

It does seem useful to be able to pass raw javascript into the options though (say, if you want to use an existing js variable or something). I see two ways of doing this:

Pass in every option as raw javascript (this feels cumbersome, with lots of "'...'" stuff):
```ruby
openseadragon_collection_viewer [@image.id], id: "'some_id'",
other_option: "some_js_variable"
```
Or, specify which options are raw javascript:
```ruby
openseadragon_collection_viewer [@image.id], id: "some_id",
other_option: "some_js_variable",
options_with_raw_js: [:id]
```

This PR implements the latter. If you don't really like this solution we can just let the branch die. I'm kind of split on it myself and would like to hear others' thoughts.