~ev/news

afdc199ad29a8591d5e67c1aacee92212ced30f1 — Ev Bogue 2 years ago 2e212f2 master
ok we had a missing parameter in composer
1 files changed, 17 insertions(+), 23 deletions(-)

M composer.js
M composer.js => composer.js +17 -23
@@ 32,30 32,24 @@ function composer (keys, previous, message) {
    h('canvas', {id: 'canvas', width: '0', height: '0'})
  ])

  var filter 
  var filterList = [
    {name: '#nofilter', filter: null},
    {name: 'Thoreau', filter: 'thoreau'},
    {name: 'Melville', filter: 'melville'},
    {name: 'Hoover', filter: 'hoover'}
  ]

  var filters = h('select', [
    h('option', {onclick: function () {
      var canvas = document.getElementById("canvas")
      canvas.classList = ''
      filter = null 
    }},['#nofilter']),
    h('option', {onclick: function () {
      var canvas = document.getElementById("canvas")
      canvas.classList = 'thoreau'
      filter = 'thoreau'
    }}, ['Thoreau']),
    h('option', {onclick: function () {
      var canvas = document.getElementById("canvas")
      canvas.classList = 'melville'
      filter = 'melville'
    }}, ['Melville']),
    h('option', {onclick: function () {
  var filter

  var filters = h('select')

  filterList.forEach(f => {
    filters.appendChild(h('option', {onclick: function () {
      var canvas = document.getElementById("canvas")
      canvas.classList = 'hoover'
      filter = 'hoover'
    }}, ['Hoover'])
  ])  
      canvas.classList = f.filter
      filter = f.filter
    }}, [f.name]))
  }) 

  var nick = h('input', {placeholder: 'Identify yourself, or your handle will be: ' + keys.substring(0, 10) + '...'})



@@ 124,7 118,7 @@ function composer (keys, previous, message) {
            open(msg).then(opened => {
              opened.raw = msg
              dispatch(msg)
              render(opened).then(rendered => {
              render(opened, keys).then(rendered => {
                if (message) {
                  message.removeChild(message.lastChild)
                  message.appendChild(rendered)