changeset 2090:cb7556869244

ResourceDisplay ignore more patches
author drewp@bigasterisk.com
date Mon, 30 May 2022 23:18:58 -0700
parents bbd6816d9e9e
children 9324fc8285ad
files light9/web/ResourceDisplay.ts
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/ResourceDisplay.ts	Sun May 29 02:54:57 2022 -0700
+++ b/light9/web/ResourceDisplay.ts	Mon May 30 23:18:58 2022 -0700
@@ -115,10 +115,15 @@
   }
 
   runUriHandler() {
+
     this.graph.runHandler(this.onUri.bind(this), `rdisplay ${this.href()}` /*needs uniqueness?*/);
   }
 
   onUri(patch?: Patch) {
+    if (patch && !patchContainsPreds(patch, [this.graph.Uri("rdfs:label")])) {
+      return;
+    }
+
     if (!this.uri) {
       this.label = "<no uri>";
       return;