Skip to content

Commit

Permalink
undo commands, categorisations, enhance to all blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Aug 3, 2023
1 parent 3e5124c commit e9a2d23
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 123 deletions.
12 changes: 6 additions & 6 deletions packages/Sandblocks-Core/SBNamedBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ Class {
#category : #'Sandblocks-Core'
}

{ #category : #'as yet unclassified' }
{ #category : #'instance creation' }
SBNamedBlock class >> block: aSBBlock named: aString [

^ self new
block: aSBBlock;
name: aString
]

{ #category : #'as yet unclassified' }
{ #category : #accessing }
SBNamedBlock >> block [

^ block
]

{ #category : #'as yet unclassified' }
{ #category : #accessing }
SBNamedBlock >> block: aSBBlock [

block := aSBBlock
]

{ #category : #'as yet unclassified' }
{ #category : #initialization }
SBNamedBlock >> initialize [

super initialize.
Expand All @@ -37,13 +37,13 @@ SBNamedBlock >> initialize [
self block: (SBLabel new contents: 'Some Content').
]

{ #category : #'as yet unclassified' }
{ #category : #accessing }
SBNamedBlock >> name [

^ name
]

{ #category : #'as yet unclassified' }
{ #category : #accessing }
SBNamedBlock >> name: aString [

name := aString
Expand Down
8 changes: 7 additions & 1 deletion packages/Sandblocks-Core/SBUnwrapConsecutiveCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {
{ #category : #'as yet unclassified' }
SBUnwrapConsecutiveCommand >> do [

unwrapped := target childSandblocks.
unwrapped ifNil: [unwrapped := target childSandblocks].
oldPositions := unwrapped collect: [:m | {m owner. m submorphIndex}].

target owner addAllMorphs: unwrapped after: target.
Expand Down Expand Up @@ -41,3 +41,9 @@ SBUnwrapConsecutiveCommand >> undo [
do: [:pos :morph | pos first addMorph: morph asElementNumber: pos second].
^ target
]

{ #category : #'as yet unclassified' }
SBUnwrapConsecutiveCommand >> unwrapped: aCollectionOfBlocks [

unwrapped := aCollectionOfBlocks
]
Loading

0 comments on commit e9a2d23

Please sign in to comment.