framework-widget
framework-widget copied to clipboard
Warning adding a line into a scroll view
When I add a display.newLine in a widget.scrollView I get a warning that says: "line.width is deprecated. Use line.strokeWidth".
Example code:
local widget = require("widget")
local testScrollView =
widget.newScrollView(
{
left = 0,
top = 11,
width = 100,
height = 200
}
)
local line = display.newLine(11, 11, 111, 111)
testScrollView:insert(line)
Warning occures in widgetLibrary/widget_scrollview.lua line 371
local leftPadding = self._collectorGroup[ 1 ].x - ( self._collectorGroup[ 1 ].width * 0.5 )
I think it should use contentWidth instead, because padding is calculated wrong for scaled display objects