Skip to content

Commit

Permalink
Provide facilities when a TLStyleSheet doesn't have all properties fill
Browse files Browse the repository at this point in the history
  • Loading branch information
LesageYann committed May 16, 2022
1 parent bd4c187 commit 0a8eeb0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Telescope-Core/TLStyleSheet.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ TLStyleSheet >> connectionStyle: aConnectionStyle [
^ self at: #connectionStyle put: aConnectionStyle
]

{ #category : #copying }
TLStyleSheet >> copySafeWithout: aCollectionOfProperties [
^ self copy removeSafeAll: aCollectionOfProperties; yourself
]

{ #category : #connection }
TLStyleSheet >> curveStyle [
^ self get: #curveStyle
Expand Down Expand Up @@ -342,6 +347,20 @@ TLStyleSheet >> position: aPosition [
self at: #position put: aPosition
]

{ #category : #removing }
TLStyleSheet >> removeIfPresent: aString [
[self remove: #shape] on: KeyNotFound do: []
]

{ #category : #removing }
TLStyleSheet >> removeSafeAll: aCollectionOfAttributes [
aCollectionOfAttributes
do: [ :anAttribute |
[ self remove: anAttribute ]
on: KeyNotFound
do: [ ] ]
]

{ #category : #shape }
TLStyleSheet >> shape [
^ self get: #shape
Expand Down

0 comments on commit 0a8eeb0

Please sign in to comment.