Skip to content

Commit

Permalink
deactivated synchronization Delete Morph from World. Small refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
ninaanre committed Jul 16, 2022
1 parent 6cc9ebd commit 78608e5
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
clearComponents
clearPropertyEditorPanel

self propertyEditorPanel submorphs do: [:each| each abandon].
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
messaging
eventHandling
deleteMorph: aProcess
"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 propertyList copy do: [:each |
Transcript show: self propertyList first ; cr.

"(self selectedTreeNode targetMorph = each targetMorph or: ((self selectedTreeNode isFlexed) ifTrue: [self selectedTreeNode owner = each targetMorph] ifFalse: [false])) "
(self selectedTreeNode targetMorph = each targetMorph or: (self selectedTreeNode targetMorph hasSubmorphs ifTrue: [self selectedTreeNode targetMorph submorphs first = each targetMorph] ifFalse: [false])) "checks if selected tree node or it's child (because it can be a transformation morph that has target morph a child) the same as the one of the morphs in the property list"
(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. ].].
"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 propertyTreeMorph update: self propertyTreeMorph getChildrenSelector.
"self propertyTreeMorph submorphs do: [:every | every process terminate]." "not right place to terminate"
self propertyEditorPanel submorphs do: [:each| each abandon]. "clear property editor panel"
self timeline submorphs do: [:each| each abandon]. "leaves the background and scroll panel from timeline. Fiqure out how to delete it"
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.

"


Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
messaging
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 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])) "checks if selected tree node or it's child (because it can be a transformation morph that has target morph a child) the same as the one of the morphs in the property list"
ifTrue: [self selectedTreeNode targetMorph removeFlexShell. self propertyList remove: each. each targetMorph abandon. ].].
self removeMorphProperties.

"to do: delete the JSON! for that look in animations editor property animated >> deleteAllKeyframes"
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector.
Expand All @@ -17,9 +13,8 @@ deleteMorph

"self selectedTreeNode process terminate." "doesnot work"

"self propertyTreeMorph submorphs do: [:every | every process terminate]." "not right place to terminate"
self propertyEditorPanel submorphs do: [:each| each abandon]. "clear property editor panel"
self timeline submorphs do: [:each| each abandon]. "leaves the background and scroll panel from timeline. Fiqure out how to delete it"
self clearPropertyEditorPanel.
self timeline clearTimeline.



Expand Down
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]).
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.].].
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"buildSaveButtonWith:" : "FH 8/1/2021 18:44",
"buildTimeline:" : "FH 8/1/2021 18:44",
"buildWith:" : "ob 6/20/2022 20:40",
"clearPropertyEditorPanel" : "NR 7/16/2022 17:01",
"collectAllEmptyPanels" : "FH 8/1/2021 18:44",
"collectInformationBar" : "FH 8/1/2021 18:44",
"collectPropertyTreeMorph" : "FH 8/1/2021 18:44",
Expand All @@ -36,8 +37,8 @@
"createTextPropertyOn:" : "LW 7/26/2021 16:44",
"defaultEmptyPanels" : "DM 8/7/2020 17:37",
"defaultPropertyPanelPosition" : "mjs 7/31/2021 16:18",
"deleteMorph" : "ob 7/13/2022 12:09",
"deleteMorph:" : "ob 7/13/2022 12:28",
"deleteMorph" : "NR 7/16/2022 17:09",
"deleteMorph:" : "NR 7/16/2022 16:55",
"editorTitle" : "LH 8/4/2020 10:31",
"editorTitle:" : "DM 8/3/2020 15:40",
"emptyPanels" : "DM 8/7/2020 17:37",
Expand All @@ -53,6 +54,7 @@
"initializeJsonHandler" : "FH 8/1/2021 18:49",
"initializePropertyEditorPanel" : "ob 7/12/2022 18:00",
"insertMorph:Into:" : "FH 8/1/2021 18:46",
"isPropertyToDelete:" : "NR 7/16/2022 17:17",
"jsonHandler" : "CL 7/5/2021 17:17",
"jsonHandler:" : "FH 8/1/2021 18:24",
"loadJsonWithExceptionHandling:" : "FH 8/1/2021 18:48",
Expand All @@ -71,6 +73,7 @@
"propertyStartEnd:" : "DM 8/6/2020 10:53",
"propertyTreeMorph" : "DM 6/22/2020 01:28",
"propertyTreeMorph:" : "DM 6/18/2020 08:59",
"removeMorphProperties" : "NR 7/16/2022 17:18",
"resetTargetMorph" : "FH 8/1/2021 18:48",
"saveAnimations" : "FH 8/1/2021 18:48",
"savedAnimationText" : "mjs 7/31/2021 15:08",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ initialize
super initialize.
self isActivated: false.
self addStartFrame.
self process: [
"self process: [
[ 1 seconds asDelay wait.
self targetMorph isInWorld ifFalse: [self animationsEditor deleteMorph: self process.].
] repeat.
] fork.
] fork."
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"executeCompositeAnimation:" : "FH 8/1/2021 19:11",
"frame" : "MH 7/8/2021 11:08",
"frame:" : "MH 7/8/2021 11:10",
"initialize" : "ob 7/13/2022 12:10",
"initialize" : "NR 7/16/2022 16:50",
"isActivated" : "ob 6/26/2022 18:59",
"isActivated:" : "ob 6/26/2022 18:59",
"isFirstFrame" : "MH 7/8/2021 11:31",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
updating
clearTimeline

self submorphs do: [:each | each abandon].
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"addTrackFor:withPosition:" : "SG 6/17/2022 15:42",
"animationsEditor" : "MH 8/1/2021 18:56",
"animationsEditor:" : "MH 8/1/2021 18:56",
"clearTimeline" : "NR 7/16/2022 16:58",
"createMovingLine" : "NR 6/26/2022 14:58",
"createTracks" : "NR 6/26/2022 14:55",
"deleteTracks" : "MH 8/1/2021 18:48",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ setUp
super setUp.
self morph: self morphClass new openInWorld.
self property: (self propertyClass on: self morph).
self property process terminate.
"self property process terminate."
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"property" : "MH 8/1/2021 18:28",
"property:" : "MH 8/1/2021 18:28",
"propertyClass" : "CL 7/29/2021 11:42",
"setUp" : "ob 7/13/2022 12:40",
"setUp" : "NR 7/16/2022 17:25",
"tearDown" : "LW 7/27/2021 11:53" } }

0 comments on commit 78608e5

Please sign in to comment.