More highlighting options for the network view.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-06-03 13:36:53 -05:00
parent 4881b12e16
commit 6430d33fd7
2 changed files with 26 additions and 2 deletions

View File

@ -153,6 +153,11 @@ Tiddler >> createdReversableEncoded [
^ output contents ^ output contents
] ]
{ #category : #accessing }
Tiddler >> creationTime [
^ ZTimestamp fromString: self created
]
{ #category : #accessing } { #category : #accessing }
Tiddler >> creator [ Tiddler >> creator [

View File

@ -626,7 +626,7 @@ TiddlyWiki >> networkView [
{ #category : #accessing } { #category : #accessing }
TiddlyWiki >> networkViewBackground [ TiddlyWiki >> networkViewBackground [
^ self config at: 'networkView' at: 'background' ifAbsentPut: [Color lightGray] ^ self config at: 'networkView' at: 'background' ifAbsentPut: [Color lightOrange]
] ]
{ #category : #accessing } { #category : #accessing }
@ -644,6 +644,25 @@ TiddlyWiki >> networkViewForeground: aColor [
self config at: 'networkView' at: 'foreground' put: aColor. self config at: 'networkView' at: 'foreground' put: aColor.
] ]
{ #category : #accessing }
TiddlyWiki >> networkViewHighlightingCreatedAfter: aDate [
| view |
view := GtMondrian new.
view nodes
stencil: [ :each |
| color size |
color := (each creationTime > (ZTimestamp fromString: aDate) )
ifTrue: [ self networkViewForeground ]
ifFalse: [ self networkViewBackground ].
size := 5 @ 5.
BlElement new background: color; size: size ];
with: self tiddlers.
view edges
connectToAll: #linkedTiddlers.
view layout force.
^ view
]
{ #category : #accessing } { #category : #accessing }
TiddlyWiki >> networkViewHighlightingCreator: creatorName [ TiddlyWiki >> networkViewHighlightingCreator: creatorName [
| view | | view |
@ -651,7 +670,7 @@ TiddlyWiki >> networkViewHighlightingCreator: creatorName [
view nodes view nodes
stencil: [ :each | stencil: [ :each |
| color size | | color size |
color := (each creator = creatorName) color := (each creator isNotNil and: [each creator trimBoth = creatorName])
ifTrue: [ self networkViewForeground ] ifTrue: [ self networkViewForeground ]
ifFalse: [ self networkViewBackground ]. ifFalse: [ self networkViewBackground ].
size := 5 @ 5. size := 5 @ 5.