Skip to content

Commit

Permalink
Fix blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Aug 3, 2023
1 parent 7a0677e commit e7dd787
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion askomics/libaskomics/SparqlQuery.py
Expand Up @@ -1221,7 +1221,7 @@ def build_query_from_json(self, preview=False, for_editor=False):
block_id = link["source"]["specialNodeId"]
sblock_id = link["source"]["specialNodeGroupId"] if link["source"]["specialNodeGroupId"] else link["target"]["specialNodeGroupId"]
pblock_ids = link["source"]["specialPreviousIds"]
depth = link["source"].get("depth")
depth = link["target"].get("depth")

# Position
if link["uri"] in ('included_in', 'overlap_with', 'distance_from'):
Expand Down
11 changes: 1 addition & 10 deletions askomics/react/src/routes/query/query.jsx
Expand Up @@ -132,19 +132,10 @@ export default class Query extends Component {
})
listIds.add(remote.specialNodeGroupId)
}
if (link.target == node.id) {
remote = this.state.nodes.some(rem => {
return (link.target == rem.id )
})
listIds.add(remote.specialNodeGroupId)
}
} else {
if (link.source.id == node.id) {
listIds.add(link.target.specialNodeGroupId)
}
if (link.target.id == node.id) {
listIds.add(link.source.specialNodeGroupId)
}
}
})
return Math.max(...listIds)
Expand Down Expand Up @@ -555,7 +546,7 @@ export default class Query extends Component {
let depth = [...node.depth]

if(incrementSpecialNodeGroupId){
depth = [...node.depth, node.specialNodeGroupId, node.specialNodeGroupId + "_" + incrementSpecialNodeGroupId]
depth = [...node.depth, node.specialNodeId, node.specialNodeId + "_" + incrementSpecialNodeGroupId]
}

if (this.isOntoEndNode(node.id)){
Expand Down

0 comments on commit e7dd787

Please sign in to comment.