How to use the pane-registry.byName function in pane-registry

To help you get started, we’ve selected a few pane-registry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github solid / solid-panes / src / outline / userInput.js View on Github external
} catch (e) {
                    console.log(
                      'Error occurs while editing ' + s1 + ':\n\t' + e
                    )
                    return
                  }
                  kb.remove(s)
                  kb.add(s.subject, selectedPredicate, textTerm, s.why) // was: newStat =
                  // a subtle bug occurs here, if foaf:nick hasn't been dereferneced,
                  // this add will cause a repainting
                }
                var enclosingTd = UI.utils.ancestor(
                  this.lastModified.parentNode.parentNode,
                  'TD'
                )
                const defaultPane = panes.byName('default') // @@ check
                outline.outlineExpand(enclosingTd, s.subject, {
                  pane: defaultPane,
                  already: true
                })
                outline.walk('right', outline.focusTd)
                // 
              } else {
                this.fillInRequest(
                  'object',
                  this.lastModified.parentNode,
                  kb.literal(this.lastModified.value)
                )
                return // The new Td is already generated by fillInRequest, so it's done.
              }
              break
          }
github solid / solid-panes / src / outline / manager.js View on Github external
*/
      for (var i = 0; i < obj.elements.length; i++) {
        var elt = obj.elements[i]
        var row = rep.appendChild(dom.createElement('tr'))
        var numcell = row.appendChild(dom.createElement('td'))
        numcell.setAttribute(
          'style',
          'margin: 0.2em; border: none; padding: 0; vertical-align: top;'
        )
        numcell.setAttribute('notSelectable', 'false')
        numcell.setAttribute('about', obj.toNT())
        numcell.innerHTML = i + 1 + ')'
        row.appendChild(thisOutline.outlineObjectTD(elt))
      }
    } else if (obj.termType === 'Graph') {
      rep = panes
        .byName('dataContentPane')
        .statementsAsTables(obj.statements, context)
      rep.setAttribute('class', 'nestedFormula')
    } else {
      UI.log.error('Object ' + obj + ' has unknown term type: ' + obj.termType)
      rep = dom.createTextNode('[unknownTermType:' + obj.termType + ']')
    } // boring defaults.
    UI.log.debug('contents: ' + rep.innerHTML)
    return rep
  } // boring_default
github solid / solid-panes / src / outline / manager.js View on Github external
function renderMain (containerDiv, item) {
      // Items are pane names
      const pane = panes.byName(item.paneName) // 20190701
      containerDiv.innerHTML = ''
      const table = containerDiv.appendChild(dom.createElement('table'))
      const me = UI.authn.currentUser()
      thisOutline.GotoSubject(
        item.subject || me,
        true,
        pane,
        false,
        undefined,
        table
      )
    }
github solid / solid-panes / src / outline / manager.js View on Github external
function expandMouseDownListener (e) {
    // For icon (UI.icons.originalIconBase + 'tbl-expand-trans.png')
    var target = thisOutline.targetOf(e)
    var p = target.parentNode
    var subject = UI.utils.getAbout(kb, target)
    var pane = e.altKey ? panes.byName('internal') : undefined // set later: was panes.defaultPane

    if (e.shiftKey) {
      // Shift forces a refocus - bring this to the top
      outlineRefocus(p, subject, pane)
    } else {
      if (e.altKey) {
        // To investigate screw ups, dont wait show internals
        outlineExpand(p, subject, {
          pane: panes.byName('internal'),
          immediate: true
        })
      } else {
        outlineExpand(p, subject)
      }
    }
  }
github solid / solid-panes / src / outline / manager.js View on Github external
function expandMouseDownListener (e) {
    // For icon (UI.icons.originalIconBase + 'tbl-expand-trans.png')
    var target = thisOutline.targetOf(e)
    var p = target.parentNode
    var subject = UI.utils.getAbout(kb, target)
    var pane = e.altKey ? panes.byName('internal') : undefined // set later: was panes.defaultPane

    if (e.shiftKey) {
      // Shift forces a refocus - bring this to the top
      outlineRefocus(p, subject, pane)
    } else {
      if (e.altKey) {
        // To investigate screw ups, dont wait show internals
        outlineExpand(p, subject, {
          pane: panes.byName('internal'),
          immediate: true
        })
      } else {
        outlineExpand(p, subject)
      }
    }
  }
github solid / solid-panes / src / outline / manager.js View on Github external
// eslint-disable-next-line no-case-declarations
        const obj = UI.utils.getAbout(kb, selectedTd)
        if (obj) {
          var walk = this.walk

          if (selectedTd.nextSibling) {
            // when selectedTd is a predicate
            this.walk('right')
            return
          }
          if (selectedTd.firstChild.tagName !== 'TABLE') {
            // not expanded
            sf.addCallback('done', setSelectedAfterward)
            sf.addCallback('fail', setSelectedAfterward)
            outlineExpand(selectedTd, obj, {
              pane: panes.byName('defaultPane')
            })
          }
          setSelectedAfterward()
        }
        break
      case 38: // up
      case 40: // down
        break
      default:
        switch (e.charCode) {
          case 99: // c for Copy
            if (e.ctrlKey) {
              thisOutline.UserInput.copyToClipboard(
                thisOutline.clipboardAddress,
                selectedTd
              )

pane-registry

Solid-compatible Panes: Pane Registry

MIT
Latest version published 1 month ago

Package Health Score

57 / 100
Full package analysis