• Jump To … +
    server.coffee src/actionknob.coffee src/autosem.coffee src/bitbucket_kba.coffee src/browserlog.coffee src/datareduction.coffee src/dci.coffee src/dciknob.coffee src/deeseeeye.coffee src/dnd.coffee src/doof.coffee src/formurla-mngr.coffee src/fractalpanel.coffee src/fractalpanel_test.coffee src/front.coffee src/ingestor.coffee src/kbabitbucket.coffee src/knobctrl.coffee src/lib_test.coffee src/nanoclock.coffee src/noodb.coffee src/noodbabstract.coffee src/noodbbrowser.coffee src/noodbbrowser_test.coffee src/noodbsec.coffee src/noorauth.coffee src/noorplugin.coffee src/noorquery.coffee src/noorvm.coffee src/noorwrite.coffee src/quadparser.coffee src/quadparsern3.coffee src/rbac.coffee src/reactor.coffee src/rebase.coffee src/rsrcidx.coffee src/sandboxactions.coffee src/screen_ctx.coffee src/spogi.coffee src/tabular_widget.coffee src/visctrl.coffee src/voicesknob.coffee src/whowhen.coffee src/xsd2native.coffee
  • screen_ctx.coffee

  • ¶

    FAILED EXPERIMENT!!!!!

    Post mortem: A simplified version of DragAndDropThing (dnd.coffee) was used instead. It turned out this DCI version was hard to make work because there was a need for methods which accepted parameters which weren’t actors eg DragAndDropThing.drag(evt, ui) and .drop(evt, ui) and eunomia (upon which dci.coffee was based) had no facility for that.

    Another problem was that the dnd use case looked like it needed to fill the roles with actors in a gradual way, first in the drag and then with the drop – and it was unclear how to do that with eunomia.

    This is how DCI is interpreted in this Interaction

    • The Data is the ontology of the situation.
    • The Context is the knowledge object which is the subject of the interaction. eg the dragged node the visualization it is dropped in the user doing the dropping
    • The Roles are things like eg Dragee (the resource or value – represented by an on-screen node – being dragged) Dropper (the User dropping something) RecievingVisualization (a visualization having a node dropped in it)
    • The Interaction
    (exports ? this).makeContext = (formurlaManager) ->
      dci = require('dci')
    
      roles =
        nodeToVisualize: dci.role
          toString: () -> this.toString()
        nodePlayedPart: dci.role # eg: s,p,o,g,i,a,w
          toString: () -> this.toString()
        startDraggingEvent: dci.role
          getNodeId: () -> this.target.innerText
        dropEvent: dci.role
          getEdgeId: () ->
            debugger
            handle_elem = $(this.toElement)
            edge_id = handle_elem.data('edge')
            if edge_id?
              frac_id = handle_elem.parent().attr('id')
            else
              console.debug "not dropped on an edge handle"
    
      useCases =
        startDragging: (evt, ui) ->
          console.log "within startDragging(evt, ui)"
          debugger
        dropNode: (evt, ui) ->
          console.log "within dropNode(evt, ui)"
          debugger
        
      return dci.context(roles, useCases, formurlaManager)