-
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.
Two working tests, one almost working
- Loading branch information
Showing
8 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
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
4 changes: 4 additions & 0 deletions
4
...s/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/endMargin.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 @@ | ||
accessing | ||
endMargin | ||
|
||
^25. |
12 changes: 12 additions & 0 deletions
12
...ationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/moveMovingLine..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,12 @@ | ||
calculation | ||
moveMovingLine: aLine | ||
|duration offset endPositionX| | ||
endPositionX := self timeline width - 25. | ||
"duration := (self timeline endTime - self timeline startTime)/100. --> richtige Zeit" | ||
(aLine x >= endPositionX) ifTrue: [aLine position: endPositionX @ (aLine position y)"self abandon"] | ||
ifFalse: | ||
[ | ||
|
||
duration := (self timeline endTime - self timeline startTime)/100. | ||
offset := (self timeline width - 105- 25) / duration. | ||
aLine position: aLine position + (offset@0).] |
4 changes: 4 additions & 0 deletions
4
...AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/startMargin.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 @@ | ||
accessing | ||
startMargin | ||
|
||
^105. |
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
12 changes: 12 additions & 0 deletions
12
...e/AnimationsEditorTimelineTest.class/instance/testMovingLineInitializedInRightPosition.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,12 @@ | ||
testing | ||
testMovingLineInitializedInRightPosition | ||
|
||
self timeline createMovingLine. | ||
self movingLine: self timeline movingLine. | ||
self assert: (self movingLine position ) = (self movingLine startMargin @ self timeline trackHeight). | ||
|
||
|
||
|
||
|
||
|
||
|
14 changes: 14 additions & 0 deletions
14
...s.package/AnimationsEditorTimelineTest.class/instance/testMovingLineStoppedAtEndMargin.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 @@ | ||
testing | ||
testMovingLineStoppedAtEndMargin | ||
|movingLine| | ||
movingLine:= Morph new extent: 3@100; | ||
color: Color black; | ||
position: self startMargin @self timeline trackHeight. | ||
1000 timesRepeat: [self moveMovingLine: movingLine]. | ||
self assert: (movingLine position) = ((self timeline width - self endMargin)@ self timeline trackHeight). | ||
|
||
|
||
|
||
|
||
|
||
|
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