Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jul 2010
    Location
    Calgary, Alberta
    Posts
    186
    Vote Rating
    1
    nosarious is on a distinguished road

      0  

    Default [FIXED-190] Controlling background image as text scrolls

    [FIXED-190] Controlling background image as text scrolls


    This may not be a Sencha question, but I'm open to suggestions from anyone.

    I have a scrolling field of text and a background image. I would like to have the background image change as a point in the text enters the viewport.

    This is similar to the Popular Science magazine sample on the ipad, where some articles change the background image to coincide with the images or text as you scroll through the article.

    Anyone know of a trigger that can be accessed to achieve this?

    Right now I am using onclick for thumbnails inside the text, but that's so '90's... Much nicer to have it change as a person scrolls.
    Last edited by nosarious; 23 Jul 2010 at 10:19 AM. Reason: I am not a leet speelchucker.

  2. #2
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    0
    meyerovb is on a distinguished road

      0  

    Default


    Scroll isn't a documented event, but it's there nonetheless... and the scroller has no public property to get the dom element it represents, so you'll have to keep your own reference as in the code below, or else use scroller.parent.dom, but that points to the x-panel-body, not the x-panel

    Code:
    Ext.setup({ onReady: function () {
    var panel= new Ext.Panel({
        fullscreen: true,
        html: '<div style="height: 1000px;">Scroll down</div>',
        scroll: {
            direction: 'vertical',
            listeners: {
                scroll: function (scroller, offset) {
                    panel.getEl().dom.style.backgroundColor =
                        offset.y < -200 ? 'red' : 'blue';
                }
            }
        }
    });
    }});

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    We'll be updating the documentation so we have a public property here.

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,120
    Vote Rating
    508
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I've updated the docs to reflect the scroller property on Component. Also updated some docs on the scroller as well.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Similar Threads

  1. Replies: 2
    Last Post: 22 Jul 2010, 5:15 AM
  2. [FIXED-952] background:transparent instead of background-color:trans
    By grzegorz.borkowski in forum Ext 3.x: Bugs
    Replies: 7
    Last Post: 1 Jun 2010, 7:46 PM
  3. controlling panel class (font, background-color)
    By andynuss in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 8 Jul 2009, 9:54 PM
  4. Replies: 2
    Last Post: 12 Apr 2009, 5:52 PM
  5. [FIXED] BUG in GroupingView.doRender() at about line 190
    By zhou in forum Ext GWT: Bugs (1.x)
    Replies: 3
    Last Post: 26 Jan 2009, 4:13 AM

Thread Participants: 3

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar