Sha256: cc43eef3caab7fe7635ebbee4533aa092c091902661285db335525a3a6943eed

Contents?: true

Size: 1.84 KB

Versions: 80

Compression:

Stored size: 1.84 KB

Contents

{#atomClass]SpaceCraft[#extends]ScrollView
[#view]
@div tabindex: -1, style: "background-color: blue;color: white;overflow: scroll", =>
  @button(go) class: 'btn btn-primary inline-block-tight', "go"
  @button(go2)  "go2"
  @button(go3)  "go3"
  @select(sel) =>
    @option value: "10", "n=10"
    @option value: "20", "n=20"
    @option value: "100", "n=100"
  @miniEditor(edi) "rnorm(10)"
  @h1 "Spacecraft"
  @ol(list) =>
    @li "Apollo"
    @li "Soyuz"
    @li "Space Shuttle"
  @div class: "panel bordered",=>
    @div class: "panel-heading",  "dyndoc1"
    @div class: "panel-body padded", =>
      @dyndoc(dyn)
  @div =>
    @raw "<button outlet='go4'>go</button>"
    @input outlet: 'ex1', id: 'ex1', class: 'span2','data-slider-id': 'ex1Slider',  type: 'text', 'data-slider-min': '0',  'data-slider-max': '20', 'data-slider-step': '1', 'data-slider-value': '14'
    @h1 "dyndoc2"
    @dyndoc(dyn2)



[#init]

@list.append('<li>Star Destroyer</li>')

@edi.getEditor().setGrammar(atom.syntax.grammarForScopeName("source.r"))
@edi.setFontSize(22)

@edi.on 'core:confirm', =>
  alert @edi.getText().trim()

@go.click =>
  @dyn.render {#dyn>]
    |[#txtl>]h2. toto
    |[#R>>]rnorm(#{@sel.val()})
    |log(-1)
    |a<-c(1,3,2)
  [#dyn>}

@go4.click =>
  @dyn.render {#dyn>]
    |[#txtl>]h2. toto
    |[#R>>]rnorm(#{@sel.val()})
    |log(-1)
    |a<-c(1,3,2)
  [#dyn>}

@go2.click =>
  @dyn2.render {#dyn>]
    |[#md>] toto2
    |[#R>>](y<-rnorm(#{@sel.val()}))
    |log(-1)
    |a<-c(1,3,2)
    |[#>]{#img64]plot(y)[#}
  [#dyn>}

@go3.click =>
  #alert "go button pushed"
  @dyn.eval {#dyn>]
    |[#r>]rnorm(1)
  [#dyn>}, (content) =>
    console.log "tmp="+content
    @list.append('<li>content='+content+'</li>')

@sel.change =>
  #alert "#{@sel.val()} changed"

@on 'click', 'li', ->
  alert "They clicked on #{$(this).text()}"
[#atomClass}

{#atomNew]craft[#of]SpaceCraft[#}

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
dyndoc-ruby-1.5.0 share/demo/test_atom.dyn
dyndoc-ruby-1.4.7 share/demo/test_atom.dyn
dyndoc-ruby-1.4.6 share/demo/test_atom.dyn
dyndoc-ruby-1.4.5 share/demo/test_atom.dyn
dyndoc-ruby-1.4.2 share/demo/test_atom.dyn
dyndoc-ruby-1.4.1 share/demo/test_atom.dyn
dyndoc-ruby-1.4.0 share/demo/test_atom.dyn
dyndoc-ruby-1.3.9 share/demo/test_atom.dyn
dyndoc-ruby-1.3.6 share/demo/test_atom.dyn
dyndoc-ruby-1.3.4 share/demo/test_atom.dyn
dyndoc-ruby-1.3.2 share/demo/test_atom.dyn
dyndoc-ruby-1.3.0 share/demo/test_atom.dyn
dyndoc-ruby-1.2.2 share/demo/test_atom.dyn
dyndoc-ruby-1.2.1 share/demo/test_atom.dyn
dyndoc-ruby-1.2.0 share/demo/test_atom.dyn
dyndoc-ruby-1.0.25 share/demo/test_atom.dyn
dyndoc-ruby-1.0.24 share/demo/test_atom.dyn
dyndoc-ruby-1.0.23 share/demo/test_atom.dyn
dyndoc-ruby-1.0.22 share/demo/test_atom.dyn
dyndoc-ruby-1.0.21 share/demo/test_atom.dyn