Skip to content

Commit 1309ea6

Browse files
committed
Update code docs
1 parent d3887ed commit 1309ea6

3 files changed

Lines changed: 9 additions & 21 deletions

File tree

docs/components_ItemGrid_GridItem.bs.html

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
sub init()
88
m.log = log.Logger("GridItem")
9-
m.posterMask = m.top.findNode("posterMask")
109
m.itemPoster = m.top.findNode("itemPoster")
1110
m.itemIcon = m.top.findNode("itemIcon")
1211
m.posterText = m.top.findNode("posterText")
@@ -18,10 +17,10 @@
1817
m.itemPoster.observeField("loadStatus", "onPosterLoadStatusChanged")
1918

2019
' Add some padding space when Item Titles are always showing
21-
if m.itemText.visible then m.itemText.maxWidth = 250
20+
if m.itemText.visible then m.itemText.maxWidth = 224
2221

2322
' grab data from ItemGrid node
24-
m.itemGrid = m.top.GetParent().GetParent() 'Parent is MarkupGrid and it's parent is the ItemGrid
23+
m.itemGrid = m.top.GetParent().GetParent() 'Parent is JRMarkupGrid and it's parent is the ItemGrid
2524

2625
if isValid(m.itemGrid)
2726
if isValid(m.itemGrid.imageDisplayMode)
@@ -32,7 +31,8 @@
3231
end if
3332
end if
3433

35-
m.itemText.translation = [0, m.itemPoster.height + 7]
34+
posterY = m.itemPoster.translation[1]
35+
m.itemText.translation = [0, posterY + m.itemPoster.height + 18]
3636
m.itemText.visible = m.gridTitles = "showalways"
3737

3838
end sub
@@ -103,7 +103,7 @@
103103
m.itemPoster.height = 290
104104
m.itemPoster.width = 290
105105

106-
m.itemText.translation = [0, m.itemPoster.height + 7]
106+
m.itemText.translation = [0, m.itemPoster.translation[1] + m.itemPoster.height + 18]
107107

108108
m.backdrop.height = 290
109109
m.backdrop.width = 290
@@ -117,7 +117,7 @@
117117
m.itemPoster.height = 290
118118
m.itemPoster.width = 290
119119

120-
m.itemText.translation = [0, m.itemPoster.height + 7]
120+
m.itemText.translation = [0, m.itemPoster.translation[1] + m.itemPoster.height + 18]
121121

122122
m.backdrop.height = 290
123123
m.backdrop.width = 290
@@ -138,24 +138,12 @@
138138

139139
end sub
140140

141-
'
142-
'Use FocusPercent to animate scaling of Poser Image
143-
sub focusChanging()
144-
scaleFactor = 0.85 + (m.top.focusPercent * 0.15)
145-
m.posterMask.scale = [scaleFactor, scaleFactor]
146-
end sub
147-
148-
'
149-
'Display or hide title Visibility on focus change
141+
' Enable title scrolling based on item focus
150142
sub focusChanged()
151143
if m.top.itemHasFocus = true
152144
m.itemText.repeatCount = -1
153-
m.posterMask.scale = [1, 1]
154145
else
155146
m.itemText.repeatCount = 0
156-
if m.itemGrid.alphaActive = true
157-
m.posterMask.scale = [0.85, 0.85]
158-
end if
159147
end if
160148
if m.gridTitles = "showonhover"
161149
m.itemText.visible = m.top.itemHasFocus

docs/data/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/module-GridItem.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)