Changes

fix subobjects
Line 741: Line 741:  
                     })) {
 
                     })) {
 
                     params.event.preventDefault();
 
                     params.event.preventDefault();
 +
 +
const nodeID = nodes.get(network.getNodeAt({x: params.pointer.DOM.x,y: params.pointer.DOM.y})).id;
 +
const subject = nodeID.split("#")[0];
 +
var subObject = "";
 +
if (nodeID.split("#")[1]) {
 +
subObject = nodeID.split("#")[1];
 +
}
 +
//inverse properties are only available in html format
 +
const query = `/w/api.php?action=smwbrowse&browse=subject&params={"subject":"'${encodeURIComponent(subject)}'","subobject":"${subObject}",options":{"showAll":"true"}, "ns":0, "type":"html"}&format=json`;
   −
                     fetch('/w/api.php?action=smwbrowse&browse=subject&params={"subject":"' + encodeURIComponent(nodes.get(network.getNodeAt({
+
                     fetch(query)  
                            x: params.pointer.DOM.x,
  −
                            y: params.pointer.DOM.y
  −
                        })).id) + '","options":{"showAll":"true"}, "ns":0, "type":"html"}&format=json') //inverse properties are only available in html format
   
                         .then(response => response.json())
 
                         .then(response => response.json())
 
                         .then(data => {
 
                         .then(data => {
Bots, bulkpusher, Bureaucrats, checkuser, filepusher, Interface administrators, oversight, pusher, rdfioadministrator, rdfiocurator, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
5,444

edits