Changeset - 959371c3fa15
[Not reviewed]
default
0 1 0
Drew Perttula - 7 years ago 2018-06-07 17:43:19
drewp@bigasterisk.com
resource-display optimize out some redraws
Ignore-this: 1e7595ef5ebb1574f0c6b77763aa6a0c
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/web/resource-display.html
Show inline comments
 
@@ -98,25 +98,27 @@
 
         uri = this.graph.Uri(uri);
 
       }
 
       this.graph.runHandler(this.setLabel.bind(this),
 
                             `label ${uri.value}`);
 
     }
 
     
 
     setLabel(patch) {
 
       if (!this.uri) {
 
         this.label = "<no uri>";
 
         this.href = "javascript:;";
 
         return;
 
       }
 

	
 
       if (patch !== null && !SyncedGraph.patchContainsPreds(patch, this.graph.Uri('rdfs:label'))) {
 
         return;
 
       }
 
       let uri = this.uri;
 
       if (typeof uri === 'string') {
 
         uri = this.graph.Uri(uri);
 
       }
 
       this.label = this.graph.labelOrTail(uri);
 
       this.href = uri.value;
 
     }
 
     
 
     onRename() {
 
       this.renameTo = this.label;
 
       this.shadowRoot.querySelector("#renameDialog").open();
 
       this.shadowRoot.querySelector("#renameTo").setSelectionRange(0, -1);
0 comments (0 inline, 0 general)