Skip to content

Commit

Permalink
Fix PlantUML style
Browse files Browse the repository at this point in the history
  • Loading branch information
idonuntius committed Oct 10, 2023
1 parent 7fc8b9e commit 82edb11
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 28 deletions.
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ The output style is org-mode mindmap.

```uml
@startmindmap
* Root
** LoggedOut<<noView>>
*** TermsOfUse
**** FailedLoading
*** Welcome
**** SignInFailedDialog
**** ForgotPassword
***** SMSAuthentication
****** ResetPassword
** LoggedIn<<noView>>
* Root<<hasView>>
** LoggedOut
*** TermsOfUse<<hasView>>
**** FailedLoading<<hasView>>
*** Welcome<<hasView>>
**** SignInFailedDialog<<hasView>>
**** ForgotPassword<<hasView>>
***** SMSAuthentication<<hasView>>
****** ResetPassword<<hasView>>
** LoggedIn@endmindmap
@endmindmap
```

Expand All @@ -44,16 +44,23 @@ Additionally, the mindmap style is set to detect easily the RIB has own view or
```
<style>
mindmapDiagram {
. * {
BackGroundColor #FFF
LineColor #192f60
Shadowing 0.0
RoundCorner 20
BackgroundColor translate
node {
BackgroundColor #fff
LineColor #d20b52
FontColor #d20b52
RoundCorner 30
LineThickness 2.0
}
.noView * {
BackGroundColor #FFF
LineColor #d20b52
arrow {
LineColor #192f60
}
.hasView {
LineColor #192f60
FontColor #192f60
}
}
</style>
Expand Down
26 changes: 16 additions & 10 deletions Sources/RIBsTreeMaker/TreeMaker/PlantUMLFormatTreeMaker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private extension PlantUMLFormatTreeMaker {

let viewControllablers = extractViewController(from: edges)
let hasViewController = viewControllablers.contains(targetName)
let suffix = hasViewController ? "" : "<<noView>>"
let suffix = hasViewController ? "<<hasView>>" : ""
if shouldShowSummary, let retrievedSummaryComment = try retrieveSummaryComment(targetName: targetName) {
summary = " / \(retrievedSummaryComment)"
}
Expand All @@ -59,17 +59,23 @@ private extension PlantUMLFormatTreeMaker {
let style = """
<style>
mindmapDiagram {
. * {
BackGroundColor #FFF
LineColor #192f60
Shadowing 0.0
RoundCorner 20
BackgroundColor translate
node {
BackgroundColor #fff
LineColor #d20b52
FontColor #d20b52
RoundCorner 30
LineThickness 2.0
}
.noView * {
BackGroundColor #FFF
LineColor #d20b52
TextColor #d20b52
arrow {
LineColor #192f60
}
.hasView {
LineColor #192f60
FontColor #192f60
}
}
</style>
Expand Down

0 comments on commit 82edb11

Please sign in to comment.