-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'deleteMorphButton' into feature/ps/timeline-improvements
- Loading branch information
Showing
53 changed files
with
300 additions
and
54 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
...ges/AnimationsEditor-Core.package/AnimationsEditor.class/instance/addSelectedMorphFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
buildComponents | ||
addSelectedMorphFor: anEvent | ||
self addTargetMorph: (self getDeepestMorph: self currentHand selectedObject at: anEvent position). | ||
self selectedTreeNode: (self addTargetMorph: (self getDeepestMorph: self currentHand selectedObject at: anEvent position)). | ||
self currentHand removeMouseListener: self. | ||
|
||
self updateInformationText: 'Added new Morph'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...mationsEditor-Core.package/AnimationsEditor.class/instance/buildDeleteMorphButtonWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
buildComponents | ||
buildDeleteMorphButtonWith: aBuilder | ||
| rightFraction leftFraction | | ||
|
||
rightFraction := 7 * (1 / self numberButtons). | ||
leftFraction := 6 * (1 / self numberButtons). | ||
^ aBuilder pluggableButtonSpec new model: self; | ||
label: 'Delete Morph'; | ||
action: #deleteMorph; | ||
frame: (LayoutFrame new topFraction: 0; | ||
bottomFraction: 1; | ||
rightFraction: rightFraction; | ||
leftFraction: leftFraction; | ||
yourself); | ||
yourself. |
4 changes: 4 additions & 0 deletions
4
...AnimationsEditor-Core.package/AnimationsEditor.class/instance/clearPropertyEditorPanel.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
clearComponents | ||
clearPropertyEditorPanel | ||
|
||
self propertyEditorPanel submorphs do: [:each| each abandon]. |
24 changes: 24 additions & 0 deletions
24
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
eventHandling | ||
deleteMorph: aProcess | ||
" | ||
self selectedTreeNode ifNil: [^ 'break']. | ||
self propertyList copy do: [:each | | ||
Transcript show: self propertyList first ; cr. | ||
(self selectedTreeNode targetMorph = each targetMorph or: (self selectedTreeNode targetMorph hasSubmorphs ifTrue: [self selectedTreeNode targetMorph submorphs first = each targetMorph] ifFalse: [false])) | ||
ifTrue: [self selectedTreeNode targetMorph removeFlexShell. self propertyList remove: each. each targetMorph abandon. ].]. | ||
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector. | ||
self propertyEditorPanel submorphs do: [:each| each abandon]. | ||
self timeline submorphs do: [:each| each abandon]. | ||
Transcript show: 'process'; cr. | ||
Transcript show: aProcess isBlocked; cr. | ||
aProcess terminate. | ||
Transcript show: 'process2'; cr. | ||
" | ||
|
||
|
21 changes: 21 additions & 0 deletions
21
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
eventHandling | ||
deleteMorph | ||
"NEEDS REFACTORING" | ||
"selected tree node needs to be set to some property when the morph is added" | ||
"not tested on other morphs apart from normal morph" | ||
self selectedTreeNode ifNil: [^ 'break']. | ||
self removeMorphProperties. | ||
|
||
"to do: delete the JSON! for that look in animations editor property animated >> deleteAllKeyframes" | ||
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector. | ||
|
||
"need to terminate process for each property" | ||
|
||
"self selectedTreeNode process terminate." "doesnot work" | ||
|
||
self clearPropertyEditorPanel. | ||
self timeline clearTimeline. | ||
|
||
|
||
|
||
|
9 changes: 9 additions & 0 deletions
9
...ages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/isPropertyToDelete..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
notclassified | ||
isPropertyToDelete: aProperty | ||
|
||
^ self selectedTreeNode targetMorph = aProperty targetMorph or: | ||
(self selectedTreeNode targetMorph hasSubmorphs | ||
ifTrue: | ||
[self selectedTreeNode targetMorph submorphs first = aProperty targetMorph] | ||
ifFalse: | ||
[false]). |
2 changes: 1 addition & 1 deletion
2
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/numberButtons.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
buildComponents | ||
numberButtons | ||
^ 6. | ||
^ 7. |
6 changes: 6 additions & 0 deletions
6
...es/AnimationsEditor-Core.package/AnimationsEditor.class/instance/removeMorphProperties.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
clearComponents | ||
removeMorphProperties | ||
|
||
self propertyList copy do: [:each | | ||
(self isPropertyToDelete: each) | ||
ifTrue: [self propertyList remove: each.].]. |
1 change: 1 addition & 0 deletions
1
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/selectedTreeNode..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/treeSpec..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/treeSpec.st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...nsEditorKeyframe.class/class/on.withPosition.withFrame.withValue.withAnimationsEditor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
initialization | ||
on: anAnimationsEditorTrack withPosition: aPoint withFrame: aFrame withValue: aValue withAnimationsEditor: anAnimationsEditor | ||
^ self basicNew track: anAnimationsEditorTrack; | ||
frame: aFrame; | ||
value: aValue; | ||
initialize; | ||
setCenteredPosition: aPoint; | ||
animationsEditor: anAnimationsEditor; | ||
yourself. |
3 changes: 3 additions & 0 deletions
3
...nimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/animationsEditor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
animationsEditor: anObject | ||
animationsEditor := anObject |
3 changes: 3 additions & 0 deletions
3
...AnimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/animationsEditor.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
animationsEditor | ||
^ animationsEditor |
3 changes: 3 additions & 0 deletions
3
...nimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/handlesMouseDown..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
as yet unclassified | ||
handlesMouseDown: anEvent | ||
^ true |
7 changes: 7 additions & 0 deletions
7
packages/AnimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/mouseDown..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
as yet unclassified | ||
mouseDown: anEvent | ||
anEvent redButtonPressed | ||
ifTrue: [ | ||
self setValueAndFrame. | ||
self animationsEditor selectedTreeNode: self selectProperty. | ||
]. |
14 changes: 14 additions & 0 deletions
14
...s/AnimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/selectProperty.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
as yet unclassified | ||
selectProperty | ||
|targetMorph property parentProperty propertyList| | ||
"targetMorph := self animationsEditor propertyList second." | ||
parentProperty := self track property parentProperty title. | ||
propertyList := self animationsEditor propertyList. | ||
targetMorph := propertyList detect: [:each | parentProperty match: each title]. | ||
|
||
|
||
targetMorph hasSubproperties | ||
ifTrue: [property := targetMorph subproperties detect: [:each| self track property asString match: each asString]]. | ||
^property | ||
|
||
|
8 changes: 8 additions & 0 deletions
8
...AnimationsEditor-Core.package/AnimationsEditorKeyframe.class/instance/setValueAndFrame.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
as yet unclassified | ||
setValueAndFrame | ||
|property selectedFrame selectedValue| | ||
property := self selectProperty. | ||
selectedFrame:= self frame. | ||
selectedValue := property targetValues at: self frame. | ||
self track property currentValue: selectedValue. | ||
self track property targetFrame: selectedFrame. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
...imationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
initialization | ||
initialize | ||
|
||
|
||
super initialize. | ||
self addStartFrame. | ||
self isActivated: false. | ||
self addStartFrame. | ||
"self process: [ | ||
[ 1 seconds asDelay wait. | ||
self targetMorph isInWorld ifFalse: [self animationsEditor deleteMorph: self process.]. | ||
] repeat. | ||
] fork." |
3 changes: 3 additions & 0 deletions
3
...AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
process: anObject | ||
process := anObject |
3 changes: 3 additions & 0 deletions
3
.../AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
process | ||
^ process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.