Results 1 to 4 of 4

Thread: [FIXED-190] Controlling background image as text scrolls

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jul 2010
    Calgary, Alberta
    Vote Rating

    Default [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 User
    Join Date
    Jun 2010
    Vote Rating


    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

    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() =
                        offset.y < -200 ? 'red' : 'blue';

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Redwood City, California
    Vote Rating


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

  4. #4
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia
    Vote Rating


    I've updated the docs to reflect the scroller property on Component. Also updated some docs on the scroller as well.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts