Skip to content

Commit

Permalink
core: respect borderVertices when showing selection markers
Browse files Browse the repository at this point in the history
  • Loading branch information
tom95 committed Oct 14, 2023
1 parent 4d43505 commit 667ffcc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
7 changes: 7 additions & 0 deletions packages/Sandblocks-Core/SBBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ SBBlock >> blockFor: anObject withInterfaces: aCollection ifOpen: aBlock ifClose
ifNone: anotherBlock
]

{ #category : #'as yet unclassified' }
SBBlock >> borderVertices [
" return a collection of points to render these in place of the default rectangle "

^ nil
]

{ #category : #layout }
SBBlock >> boundsInEditor [

Expand Down
6 changes: 6 additions & 0 deletions packages/Sandblocks-Core/SBBrowserEditor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ SBBrowserEditor >> modelSelection: anObject [
changed: #messageList]
]

{ #category : #'as yet unclassified' }
SBBrowserEditor >> newEmptyChildNear: aBlock before: aBoolean [

^ nil
]

{ #category : #'as yet unclassified' }
SBBrowserEditor >> openOnlyMorph: aBlock [

Expand Down
18 changes: 13 additions & 5 deletions packages/Sandblocks-Core/SBCursorSelect.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ SBCursorSelect >> color [
{ #category : #'as yet unclassified' }
SBCursorSelect >> drawOn: aCanvas in: aRectangle color: aColor [

aCanvas
frameRoundRect: (aRectangle insetBy: 2)
radius: self block colorPolicy cornerRadius
width: self block frameSize
color: aColor
self block borderVertices
ifNotNil: [:v |
aCanvas
drawPolygon: v
color: nil
borderWidth: self block frameSize
borderColor: aColor]
ifNil: [
aCanvas
frameRoundRect: (aRectangle insetBy: 2)
radius: self block colorPolicy cornerRadius
width: self block frameSize
color: aColor]
]

{ #category : #'as yet unclassified' }
Expand Down

0 comments on commit 667ffcc

Please sign in to comment.