Author Topic: BUG REPORT: UIScrollView line 830 Recenter call twice  (Read 2840 times)

daifan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
BUG REPORT: UIScrollView line 830 Recenter call twice
« on: June 27, 2017, 04:20:56 PM »
UIScrollView line 830:

    if (mDragStarted && onDragFinished != null) onDragFinished();
    centerOnChild.Recenter();

Recenter() is already called when onDragFinished();

Twice call result in weird behaviour if set threshold.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: BUG REPORT: UIScrollView line 830 Recenter call twice
« Reply #1 on: July 06, 2017, 05:34:13 AM »
Our line numbers don't match, so you don't seem to be on the latest version. What's the "weird behaviour"?

daifan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: BUG REPORT: UIScrollView line 830 Recenter call twice
« Reply #2 on: July 09, 2017, 12:18:10 AM »
Hi, it should be line 782... for some reason I typed the wrong number...
The weird thing is that it will sometimes skip item (especially when threshold is set).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: BUG REPORT: UIScrollView line 830 Recenter call twice
« Reply #3 on: July 15, 2017, 06:07:32 AM »
I see. So does this get resolved by commenting out line 85 of UICenterOnChild?
  1. //mScrollView.onDragFinished += OnDragFinished;

daifan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: BUG REPORT: UIScrollView line 830 Recenter call twice
« Reply #4 on: July 16, 2017, 01:49:05 PM »
Yep, that solves the problem.