Changeset - 7e66643b3f54
[Not reviewed]
default
0 2 0
Drew Perttula - 7 years ago 2018-05-18 07:54:06
drewp@bigasterisk.com
quieter graph logs
Ignore-this: f24071530e1ecc5c2b7a7de184f438ac
2 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
light9/web/graph.coffee
Show inline comments
 
@@ -221,15 +221,15 @@ class window.SyncedGraph
 
  _applyPatch: (patch) ->
 
    # In most cases you want applyAndSendPatch.
 
    # 
 
    # This is the only method that writes to @graph!
 
    @cachedFloatValues.clear()
 
    for quad in patch.delQuads
 
      log("remove #{JSON.stringify(quad)}")      
 
      #log("remove #{JSON.stringify(quad)}")      
 
      did = @graph.removeQuad(quad)
 
      log("removed: #{did}")
 
      #log("removed: #{did}")
 
    for quad in patch.addQuads
 
      @graph.addQuad(quad)
 
    #log('applied patch locally', patchSizeSummary(patch))
 
    @_autoDeps.graphChanged(patch)
 

	
 
  getObjectPatch: (s, p, newObject, g) ->
 
@@ -258,13 +258,12 @@ class window.SyncedGraph
 
    
 
    @_autoDeps.runHandler(func, label)
 

	
 
  _singleValue: (s, p) ->
 
    @_autoDeps.askedFor(s, p, null, null)
 
    quads = @graph.getQuads(s, p)
 
    console.log('got',quads)
 
    objs = new Set(q.object for q in quads)
 
    
 
    switch objs.size
 
      when 0
 
        throw new Error("no value for "+s.value+" "+p.value)
 
      when 1
light9/web/rdfdb-synced-graph.html
Show inline comments
 
@@ -6,13 +6,13 @@
 
<dom-module id="rdfdb-synced-graph">
 
  <template>
 
    <style>
 
     :host {
 
         display: inline-block;
 
         border: 1px solid gray;
 
         width: 18em;
 
         width: 20em;
 
         background: #05335a;
 
         color: #4fc1d4;
 
     }
 
    </style>
 
    graph: [[status]]
 
  </template>
0 comments (0 inline, 0 general)