Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning adding a line into a scroll view #17

Open
melix99 opened this issue Aug 10, 2018 · 1 comment
Open

Warning adding a line into a scroll view #17

melix99 opened this issue Aug 10, 2018 · 1 comment

Comments

@melix99
Copy link

melix99 commented Aug 10, 2018

When I add a display.newLine in a widget.scrollView I get a warning that says: "line.width is deprecated. Use line.strokeWidth".

@Benzeliden
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants