Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8930] MobileWeb: Ti.UI.View.rect not updated after animation

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T22:23:39.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sn/a
ComponentsMobileWeb
Labelsparity
ReporterArthur Evans
AssigneeChris Barber
Created2012-04-30T16:22:15.000+0000
Updated2018-04-04T23:20:33.000+0000

Description

See code sample in related bug. When a view's position is changed using an animation, the rect property is not updated. If this is unavoidable, it will need to be noted in the docs because it doesn't match the other platforms.

Comments

  1. Arthur Evans 2012-04-30

    Adding as known issue in Ti.UI.View API docs. If this gets resolved, docs should be updated.
  2. Andrew Greenstreet 2014-02-24

    Fixed in: https://github.com/appcelerator/titanium_mobile/pull/5375
  3. Ingo Muschenetz 2015-03-13

    Some concerns: * With MW we support pausing and cancelling animations which iOS and Android do not, so we don't define what should happen to the rect when the animation is paused/cancelled. It is updated when the animation completes. * We're concerned about how the code parses the CSS transform settings. This should already be known because it was calculated during the animation.
  4. Andrew Greenstreet 2015-03-13

    {quote} With MW we support pausing and cancelling animations which iOS and Android do not, so we don't define what should happen to the rect when the animation is paused/cancelled. It is updated when the animation completes. {quote} The problem is the dependency KineticScrollView has on Animate.js. If you stop a KineticScrollView (ScrollView, TableView, etc) via another touch, mid scroll, without having the rect updated, the scrollview will revert to its original position. {quote} We're concerned about how the code parses the CSS transform settings. This should already be known because it was calculated during the animation. {quote} Again, same issue. If you stop an animation mid-stream, like you can with a KineticScrollView (just touch the view while it is already scrolling), how do you know the position without parsing the CSS? I'm of the opinion that KineticScrollViews should not have a dependency on animation.js (via Ti.UI.2DMatrix). Tweening the css translation value via javascript it fine for small items, but leads to very poor performance on larger lists. KineticScrollView has quite a few issues including performance, and momentum (deceleration). I'm not sure what the policy is on using 3rd party libraries in TI, but refactoring KSV to use iScroll.js (http://iscrolljs.com/) would solve a lot of issues and simplify the codebase.
  5. Chris Barber 2015-03-13

    [~andrew@gstreetmedia.com] I looked into iScroll.js a long time ago. I would love to use it. Mobile Web should probably just have a generalized animation engine that can be extended to handle Titanium's specifics. Honestly, I'd like to re-evaluate Mobile Web's entire layout engine, event system, and animation engine. They were all designed independent of each other and glued together. There's a bunch of places where we have duplicate code and hacks to get them working. Since they're all related, there should just be one engine that handles everything. This is outside the scope of this ticket and is not a priority either. :( For the sake of this ticket, I'm not sure whether to merge the PR and resolve the ticket or to keep the ticket open until there's time to go in and properly overhaul Mobile Web.
  6. Andrew Greenstreet 2015-03-13

    I agree on all counts. Hopefully "mobile web" isn't going to die a slow death. I think its existence is the one thing that truly separates the Titanium from other methods of development. None of the newer players in this space support Web (React, NativeScript, etc.). Without that, at least for me, they are non-starters. Appcelerator, as an organization may feel differently, but I think the real value proposition in "mobile web" isn't mobile web at all. The fact that you can build a "*desktop web*" app with the same basic code base as the native mobile app, now that is a value proposition. I don't have the resources to build a separate web app for desktop users, but with Titanium (plus 100 hacks or so and some jQuery) I do. Please let me know if I can help at all.
  7. Lee Morris 2017-06-26

    Resolving as "Won't Fix" as MobileWeb has been deprecated.
  8. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source