Skip to content

Commit

Permalink
Fixed Bugs resulting of bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonBein committed Jun 6, 2018
1 parent 33f59f3 commit 0eff6c8
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
geometry
extent: aPoint

super extent: aPoint.
self submorphsDo: [:each | each notifySlideRescale: aPoint]
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"disablePresentationMode" : "MK 5/25/2018 16:13",
"doubleClick:" : "LM 5/25/2018 17:20",
"enablePresentationMode" : "MK 5/25/2018 15:11",
"extent:" : "LB 6/6/2018 14:49",
"handleDroppedImage:event:" : "LB 5/18/2018 17:38",
"handleDroppedItem:event:" : "LB 5/18/2018 17:33",
"handlesMouseDown:" : "WoC 5/22/2018 19:23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ layout: morph in: newBounds
ifFalse: [newExtent := proposedExtent y / slide sideRatio @ proposedExtent y].
diffExtent := proposedExtent - newExtent.

slide extent: newExtent; center: morph center.
slide submorphsDo: [:each | each notifySlideRescale: newExtent]
slide extent: newExtent; center: morph center
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"layout:in:" : "WoC 6/4/2018 16:54" } }
"layout:in:" : "LB 6/6/2018 14:48" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
slide resizing
assertDeviatesLessThan: aComparable onSlideResize: aBlock

self assert: (self does: aBlock deviateLessThan: aComparable onResizeOf: self slide)
self assert: (self does: aBlock deviateLessThan: aComparable onResizeOf: self container)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
container: aPSSlideContainer

container := aPSSlideContainer
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
container

^ container
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ running
setUp

super setUp.
self slide: (PSSlide new openInWorld: self world).
self slide extent: self world extent / 2
self container: PSSlideContainer new.
self slide: PSSlide new.
self container showSlide: self slide.
self container extent: self world extent / 2.
self container openInWorld: self world
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ running
tearDown

self slide abandon.
self container abandon.
super tearDown
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"class" : {
},
"instance" : {
"assertDeviatesLessThan:onSlideResize:" : "LB 6/1/2018 17:54",
"assertDeviatesLessThan:onSlideResize:" : "LB 6/6/2018 15:03",
"collectMenuContentFrom:" : "MK 6/1/2018 19:33",
"setUp" : "LB 6/1/2018 17:50",
"container" : "LB 6/6/2018 14:50",
"container:" : "LB 6/6/2018 14:50",
"setUp" : "LB 6/6/2018 15:18",
"slide" : "LB 6/1/2018 17:49",
"slide:" : "LB 6/1/2018 17:49",
"tearDown" : "LB 6/1/2018 17:51",
"tearDown" : "LB 6/6/2018 14:50",
"testContextMenuContent:equals:" : "MK 6/1/2018 19:42",
"testTextFieldCreatedOnClick" : "MK 6/1/2018 18:21" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
],
"commentStamp" : "",
"instvars" : [
"slide" ],
"slide",
"container" ],
"name" : "PSOnSlideTest",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ testSlideResizeToFitKeepsAspectRatio
self doForDifferentSizes: [ :width :height |
| aspectRatio |
self morph extent: width @ height.
aspectRatio := self morph extent x / self morph extent y.
aspectRatio := self morph extent y / self morph extent x.
self slide resizeMorphToFit: self morph.
self assert: (self number: self morph extent x / self morph extent y isSimilarTo: aspectRatio)]
self assert: (self does: self morph answerSideRatio: aspectRatio)]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"testSlideContainerPosition" : "LB 5/23/2018 15:47",
"testSlideDropping" : "LB 5/18/2018 18:17",
"testSlideResizeToFit" : "LM 5/18/2018 19:20",
"testSlideResizeToFitKeepsAspectRatio" : "LM 5/18/2018 21:13",
"testSlideResizeToFitKeepsAspectRatio" : "LB 6/6/2018 15:16",
"testSlideResizeToFitKeepsPosition" : "LM 5/18/2018 19:25",
"testSubmorphsOnResize" : "LB 5/29/2018 17:52",
"testTriggerContextMenu" : "MK 6/1/2018 20:19" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
helper functions
does: aMorph answerSideRatio: aNumber

^ (aMorph extent y - (aMorph extent x * aMorph sideRatio)) abs < 1
^ (aMorph extent y - (aMorph extent x * aNumber)) abs < 1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"resources" : "LB 5/29/2018 17:31" },
"instance" : {
"blueMouseDownAt:" : "LB 5/23/2018 16:01",
"does:answerSideRatio:" : "LB 6/1/2018 18:49",
"does:answerSideRatio:" : "LB 6/6/2018 15:10",
"does:deviateLessThan:onResizeOf:" : "LB 5/29/2018 17:41",
"hand" : "LB 5/29/2018 17:32",
"is:constantOnResizeOf:" : "LB 5/29/2018 17:42",
Expand Down

0 comments on commit 0eff6c8

Please sign in to comment.