Skip to content

Commit

Permalink
fix graphic bug (resultlist overlaying input field)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaschn committed Jun 23, 2016
1 parent 0a27ed3 commit e63569b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"maxNumTopResults" : "J.J. 7/28/2015 19:37" },
"instance" : {
"categorize:" : "J.J. 7/28/2015 19:36",
"extractFrom:" : "LK 6/14/2016 09:54" } }
"extractFrom:" : "JS 6/23/2016 11:27" } }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ constants
maxNumItems

| offset availableSpace |
offset := (World height / 3) asInteger.
offset := (World height / 4) asInteger.
availableSpace := World bottom - ALGCore defaultPosition y - offset.
^ (availableSpace / ALGResultItemMorph titleHeight) asInteger
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ categorize: anItemCollection

| categories typeDictionary |
categories := OrderedCollection new.
(anItemCollection isEmpty) ifTrue: [ ^ categories ].
typeDictionary := Dictionary new.
typeDictionary := self typesFrom: anItemCollection into: typeDictionary.
anItemCollection ifEmpty: [ ^ categories ].
typeDictionary := self typesFrom: anItemCollection.
self extractFrom: typeDictionary to: categories.
^ self sorter sort: categories inOrder: #desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
categorizing
countCategoriesFrom: anItemCollection

| maxIndex aDictionary |
maxIndex := self class maxNumItems.
(anItemCollection size < maxIndex) ifTrue: [ maxIndex := anItemCollection size ].
aDictionary := self typesFrom: anItemCollection withMaximum: maxIndex.
^ aDictionary keys size
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
categorizing
typesFrom: anItemCollection

| maxIndex aDictionary |
aDictionary := Dictionary new.
maxIndex := self class maxNumItems - (self countCategoriesFrom: anItemCollection).
(anItemCollection size < maxIndex) ifTrue: [ maxIndex := anItemCollection size ].
^ self typesFrom: anItemCollection withMaximum: maxIndex
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
categorizing
typesFrom: anItemCollection into: aDictionary
typesFrom: anItemCollection withMaximum: maxNumItems

| maxIndex |
maxIndex := self class maxNumItems.
(anItemCollection size < maxIndex) ifTrue: [ maxIndex := anItemCollection size ].
(1 to: maxIndex) do: [ :i | | item key categories |
| aDictionary |
aDictionary := Dictionary new.
1 to: maxNumItems do: [ :i | | item key categories |
item := anItemCollection at: i.
key := item algerType typeName.
aDictionary at: key ifAbsentPut: [ OrderedCollection new ].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"class" : {
"maxItemsPerCategory" : "J.J. 7/28/2015 19:44",
"maxNumItems" : "J.J. 7/30/2015 19:38" },
"maxNumItems" : "JS 6/23/2016 11:48" },
"instance" : {
"categorize:" : "J.J. 7/30/2015 19:38",
"categorize:" : "JS 6/23/2016 11:33",
"countCategoriesFrom:" : "JS 6/23/2016 11:43",
"extractFrom:to:" : "J.J. 7/28/2015 19:43",
"typesFrom:into:" : "td 6/8/2016 21:04" } }
"typesFrom:" : "JS 6/23/2016 11:46",
"typesFrom:withMaximum:" : "JS 6/23/2016 11:40" } }
2 changes: 1 addition & 1 deletion packages/Algernon.package/monticello.meta/version

Large diffs are not rendered by default.

0 comments on commit e63569b

Please sign in to comment.