Skip to content

Commit

Permalink
wrote tests for clickable frames and refactored partially feature cli…
Browse files Browse the repository at this point in the history
…ckable frames
  • Loading branch information
saragrau committed Jul 31, 2022
1 parent 75c7280 commit 8ca512c
Show file tree
Hide file tree
Showing 33 changed files with 125 additions and 75 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
events
handlesMouseDown: anEvent
^ true
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
as yet unclassified
events
mouseDown: anEvent
anEvent redButtonPressed
ifTrue: [
self setValueAndFrame.
self animationsEditor selectedTreeNode: self selectProperty.
self animationsEditor selectedTreeNode: self property.
].
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
property

^self track property.


This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
as yet unclassified
events
setValueAndFrame
|property selectedFrame selectedValue|
property := self selectProperty.
|selectedFrame selectedValue|

selectedValue := self property targetValues at: self frame.
selectedFrame:= self frame.
selectedValue := property targetValues at: self frame.
self track property currentValue: selectedValue.
self track property targetFrame: selectedFrame.
self property currentValue: selectedValue.
self property targetFrame: selectedFrame.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"class" : {
"on:withPosition:withFrame:withValue:" : "FH 8/1/2021 19:05",
"on:withPosition:withFrame:withValue:withAnimationsEditor:" : "SG 6/17/2022 15:45" },
"instance" : {
"animationsEditor" : "SG 6/17/2022 15:43",
Expand All @@ -12,11 +11,11 @@
"handleMouseLeave:" : "NR 7/18/2022 10:51",
"handlesMouseDown:" : "SG 6/17/2022 14:57",
"initialize" : "NR 7/18/2022 10:50",
"mouseDown:" : "SG 6/25/2022 16:11",
"mouseDown:" : "SG 7/31/2022 18:41",
"mouseOverColor" : "NR 7/18/2022 10:49",
"selectProperty" : "SG 6/27/2022 19:17",
"property" : "SG 7/31/2022 18:41",
"setCenteredPosition:" : "FH 8/1/2021 19:04",
"setValueAndFrame" : "SG 6/25/2022 16:10",
"setValueAndFrame" : "SG 7/31/2022 18:44",
"track" : "mjs 7/31/2021 15:46",
"track:" : "mjs 7/31/2021 15:46",
"value:" : "mjs 7/31/2021 15:46" } }
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
constants
animationDuration
^ self timeline endTime - self timeline startTime.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
stepping and presenter
playMovingAnimation
| animation |

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"class" : {
"on:withProperty:withPosition:withExtent:" : "NR 6/13/2022 12:28",
"on:withProperty:withPosition:withExtent:withAnimationsEditor:" : "SG 6/17/2022 15:45" },
"instance" : {
"addKeyframes" : "SG 6/17/2022 15:46",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
animationRotation100

^100.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
animationRotation200

^200.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
creation
createKeyframeWith: aValue on: aFrame

self propertyRotation
currentValue: aValue;
frame: aFrame;
addKeyframe.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
frameNumber100

^ 100.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
frameNumber200

^200.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
keyframe100: anObject
keyframe100 := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
keyframe100
^ keyframe100
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
keyframe200: anObject
keyframe200 := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
keyframe200
^ keyframe200

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
rotationTrack: anObject
rotationTrack := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
rotationTrack
^ rotationTrack
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
accessing
testing
setUp

super setUp.
self animationsEditorInstance: AnimationsEditor open.
self morph: Morph new openInWorld.
self animationsEditorInstance addTargetMorph: self morph.
self property: self animationsEditor propertyList first.
self propertyPosition isActivated: true.
self propertyRotation isActivated: true.
self timeline: self animationsEditorInstance timeline.
"self property: self animationsEditor propertyList first. "
self propertyRotation isActivated: true.
self animationsEditorInstance selectedTreeNode: self propertyRotation.
self rotationTrack: (self timeline submorphs at: 2).
self propertyRotation addDependent: self rotationTrack.
self createKeyframeWith: self animationRotation100 on: self frameNumber100.
self createKeyframeWith: self animationRotation200 on: self frameNumber200.
self keyframe100: self rotationTrack submorphs second.
self keyframe200: self rotationTrack submorphs first.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
testing
tearDown
super tearDown.
self propertyRotation targetMorph isFlexed
ifTrue: [self propertyRotation targetMorph owner abandon].
self propertyRotation targetMorph abandon.
self animationsEditorInstance windowReference abandon.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
testing
testLeftClickShowsSelectedProperty

self keyframe100 setValueAndFrame.
self animationsEditorInstance selectedTreeNode: self keyframe100 property.

self assert: self propertyRotation currentValue = self animationRotation100.
self assert: self propertyRotation targetFrame = self frameNumber100.




Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
timeline: anObject
timeline := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
timeline
^ timeline
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@
"class" : {
},
"instance" : {
"animationRotation100" : "SG 7/31/2022 23:16",
"animationRotation200" : "SG 7/31/2022 23:16",
"animationsEditorInstance" : "lka 7/1/2022 15:28",
"animationsEditorInstance:" : "lka 7/1/2022 15:28",
"createKeyframeWith:on:" : "SG 7/31/2022 23:06",
"frameNumber100" : "SG 7/31/2022 21:58",
"frameNumber200" : "SG 7/31/2022 23:17",
"keyframe100" : "SG 7/31/2022 23:19",
"keyframe100:" : "SG 7/31/2022 23:19",
"keyframe200" : "SG 7/31/2022 23:20",
"keyframe200:" : "SG 7/31/2022 23:20",
"morph" : "lka 7/1/2022 15:29",
"morph:" : "lka 7/1/2022 15:29",
"property" : "lka 7/1/2022 15:29",
"property:" : "lka 7/1/2022 15:29",
"propertyPosition" : "lka 7/1/2022 15:33",
"propertyRotation" : "lka 7/1/2022 15:34",
"setUp" : "lka 7/1/2022 15:35" } }
"rotationTrack" : "SG 7/31/2022 23:14",
"rotationTrack:" : "SG 7/31/2022 23:14",
"setUp" : "SG 7/31/2022 23:21",
"tearDown" : "SG 7/31/2022 23:22",
"testLeftClickShowsSelectedProperty" : "SG 7/31/2022 23:18",
"timeline" : "SG 7/31/2022 22:46",
"timeline:" : "SG 7/31/2022 22:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"instvars" : [
"animationsEditorInstance",
"morph",
"property" ],
"timeline",
"rotationTrack",
"keyframe100",
"keyframe200" ],
"name" : "AnimationsEditorRightclickSelection",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
},
"instance" : {
"animationPosition" : "NB 8/1/2021 14:29",
"animationPosition" : "SG 7/31/2022 23:12",
"animationsEditorInstance" : "MH 8/1/2021 18:42",
"animationsEditorInstance:" : "MH 8/1/2021 18:42",
"calculateKeyframeCenterOn:" : "NB 8/1/2021 14:07",
Expand All @@ -18,26 +18,26 @@
"movingLine" : "ob 5/27/2022 16:57",
"movingLine:" : "ob 5/27/2022 16:57",
"paddingDistance" : "NB 8/1/2021 16:04",
"positionTrack" : "MH 8/1/2021 18:42",
"positionTrack:" : "MH 8/1/2021 18:42",
"positionTrack" : "SG 7/31/2022 23:13",
"positionTrack:" : "SG 7/31/2022 23:13",
"propertyPosition" : "SG 6/22/2022 14:15",
"referenceTime" : "NR 7/18/2022 11:36",
"referenceTime:" : "NR 7/18/2022 11:36",
"runCase" : "NR 7/18/2022 11:36",
"secondLastOn:" : "NB 8/1/2021 12:16",
"setUp" : "ob 7/30/2022 17:38",
"setUp" : "SG 7/31/2022 23:13",
"startFrame" : "MH 8/1/2021 18:42",
"startMargin" : "ob 5/29/2022 17:46",
"tearDown" : "SG 6/22/2022 14:15",
"testAddKeyframeToRightPosition" : "Noel Bastubbe 6/13/2022 19:27",
"testDistanceBetweenKeyframes" : "NR 7/18/2022 11:14",
"testAddKeyframeToRightPosition" : "SG 7/31/2022 23:13",
"testDistanceBetweenKeyframes" : "SG 7/31/2022 23:13",
"testDurationDisplay" : "7/1/2022 15:59:00",
"testHeightOfTimeline" : "NR 7/18/2022 18:29",
"testMinWidthOfTimeline" : "NR 7/18/2022 11:12",
"testMinWidthOfTimeline" : "SG 7/31/2022 23:12",
"testMovingLineInRightPosition" : "NR 7/18/2022 11:50",
"testMovingLineInitializedInRightPosition" : "NR 7/18/2022 11:40",
"testMovingLineStoppedAtEndMargin" : "NR 7/18/2022 11:51",
"testWidthOfTimeline" : "NR 7/18/2022 11:11",
"testWidthOfTimeline" : "SG 7/31/2022 23:12",
"testZeroDurationAtStart" : "ob 7/30/2022 17:38",
"timebar" : "ob 7/30/2022 17:35",
"timebar:" : "ob 7/30/2022 17:35",
Expand Down

0 comments on commit 8ca512c

Please sign in to comment.