aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-01-20 17:13:28 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-01-31 15:07:06 +0100
commit71428219389d5fe429c0bad0bd31b2cda55cdfce (patch)
tree12a337a7ff55177cc2b4373b063c746310be2793 /core/src/main/kotlin/resolvers/DefaultLocationProvider.kt
parentc3b911f286186a790be607e9b803e3ed63c77289 (diff)
downloaddokka-71428219389d5fe429c0bad0bd31b2cda55cdfce.tar.gz
dokka-71428219389d5fe429c0bad0bd31b2cda55cdfce.tar.bz2
dokka-71428219389d5fe429c0bad0bd31b2cda55cdfce.zip
Adding changes to HTML UI render
Diffstat (limited to 'core/src/main/kotlin/resolvers/DefaultLocationProvider.kt')
-rw-r--r--core/src/main/kotlin/resolvers/DefaultLocationProvider.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt b/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt
index d7089f96..3412d975 100644
--- a/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt
+++ b/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt
@@ -38,6 +38,8 @@ open class DefaultLocationProvider(
else -> ancestors(node.parent()) + node
}
+ override fun top(): PageNode = pageGraphRoot
+
protected open fun findInPageGraph(dri: DRI, platforms: List<PlatformData>): PageNode? =
pageGraphRoot.dfs { it.dri == dri }
@@ -52,7 +54,7 @@ open class DefaultLocationProvider(
else -> getPath(pathNode.parent(), path + pathNode.pathName().ifEmpty { "root" })
}
- val contextNode = if (context?.children?.isEmpty() == true) context.parent() else context
+ val contextNode = if (context?.children?.isEmpty() == true && context.parent() != null) context.parent() else context
val nodePath = getPath(node).reversed()
val contextPath = getPath(contextNode).reversed()