-
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 'dev' into testing/clickableKeyframes
- Loading branch information
Showing
13 changed files
with
30 additions
and
39 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
2 changes: 1 addition & 1 deletion
2
...mationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/animationDuration.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 @@ | ||
constants | ||
animationDuration | ||
^ self timeline endTime - self timeline startTime. | ||
^ self timeline endTime max: self timeline minimumExtent |
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
2 changes: 1 addition & 1 deletion
2
...es/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/minimumExtent.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,4 @@ | ||
constants | ||
minimumExtent | ||
|
||
^ 1000. | ||
^ self animationsEditor informationBar width - self startMargin - self endMargin - (self animationsEditor informationBar borderWidth * 2). |
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
2 changes: 1 addition & 1 deletion
2
...Editor-Tests.package/AnimationsEditorTimelineTest.class/instance/middleOfAnimationTime.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,4 @@ | ||
constants | ||
middleOfAnimationTime | ||
|
||
^ (self endFrame max: 1000) / 2. | ||
^ (self timeline minimumExtent / 2) truncated. |
11 changes: 4 additions & 7 deletions
11
...sts.package/AnimationsEditorTimelineTest.class/instance/testAddKeyframeToRightPosition.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,13 +1,10 @@ | ||
testing | ||
testAddKeyframeToRightPosition | ||
| keyframeCenter keyframeBar keyframeBarPosition addedKeyframeMorph | | ||
|
||
keyframeBar := (self positionTrack submorphs at: 2). | ||
|
||
keyframeBarPosition := keyframeBar position. | ||
| keyframeCenter middleOfKeyframeBar keyframeBarPosition addedKeyframeMorph | | ||
|
||
keyframeBarPosition := self positionTrack position. | ||
middleOfKeyframeBar := keyframeBarPosition + (self middleOfAnimationTime @ (self positionTrack height / 2)) + (self timeline startMargin @ 0). | ||
self createKeyframeWith: self animationPosition on: self middleOfAnimationTime. | ||
|
||
addedKeyframeMorph := self positionTrack submorphs first. | ||
keyframeCenter := addedKeyframeMorph center. | ||
self assert: ((keyframeBar width / 2) @ (keyframeBar height / 2) + keyframeBarPosition) truncated = keyframeCenter. | ||
self assert: middleOfKeyframeBar truncated = keyframeCenter. |
6 changes: 2 additions & 4 deletions
6
...Tests.package/AnimationsEditorTimelineTest.class/instance/testDistanceBetweenKeyframes.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,12 +1,10 @@ | ||
testing | ||
testDistanceBetweenKeyframes | ||
| frameDistance distanceBetweenKeyframes startKeyframeMorph addedKeyframeMorph keyframeBar | | ||
| frameDistance distanceBetweenKeyframes startKeyframeMorph addedKeyframeMorph | | ||
|
||
self createKeyframeWith: self animationPosition on: self frameNumber1000. | ||
keyframeBar := (self positionTrack submorphs at: (self secondLastOn: self positionTrack)). | ||
frameDistance := self frameNumber1000 - self startFrame. | ||
addedKeyframeMorph := self positionTrack submorphs first. | ||
startKeyframeMorph := self positionTrack submorphs second. | ||
distanceBetweenKeyframes := addedKeyframeMorph bounds origin - startKeyframeMorph bounds origin. | ||
|
||
self assert: (keyframeBar width - self paddingDistance) // (self endFrame / frameDistance) = distanceBetweenKeyframes x. | ||
self assert: frameDistance = distanceBetweenKeyframes x. |
8 changes: 2 additions & 6 deletions
8
...sEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/testHeightOfTimeline.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,13 +1,9 @@ | ||
testing | ||
testHeightOfTimeline | ||
"| oldHeight scrollBarThickness offScreenFrame | | ||
| oldHeight scrollBarThickness offScreenFrame | | ||
|
||
offScreenFrame := self animationsEditorInstance mainWindow width. | ||
self animationsEditorInstance propertyStartEnd endTime: 0. | ||
oldHeight := self timeline height. | ||
self createKeyframeWith: self animationPosition on: offScreenFrame. | ||
scrollBarThickness := self timeline scrollPane scrollBarThickness. | ||
self assert: oldHeight - scrollBarThickness = self timeline height." | ||
"self expected: self failure." | ||
|
||
self assert: true. | ||
self assert: oldHeight - scrollBarThickness = self timeline height. |
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
6 changes: 3 additions & 3 deletions
6
...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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
testing | ||
testMovingLineStoppedAtEndMargin | ||
"self timeline createMovingLine. | ||
|
||
self timeline createMovingLine. | ||
self movingLine: self timeline movingLine. | ||
self | ||
wait: 1500; | ||
should: self movingLine position x = (self movingLine startMargin + 1000)." | ||
self assert: true. | ||
should: self movingLine position x = (self movingLine startMargin + self timeline minimumExtent). |
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