overleaf/services/web/public/coffee/pdf/NativePdfView.coffee

23 lines
332 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
define [
"libs/backbone"
], () ->
NativePdfView = Backbone.View.extend
tagName: "iframe"
render: () ->
@$el.css
border: "none"
width: "100%"
height: "100%"
return @
setPdf: (url) ->
@$el.attr "src", url
unsetPdf: () ->
@$el.removeAttr "src"
hide: () -> @$el.hide()
show: () -> @$el.show()