1. #21
    Sencha User
    Join Date
    May 2013
    Posts
    8
    Vote Rating
    0
    raztus is on a distinguished road

      0  

    Default +1 for supporting cross-device usage

    +1 for supporting cross-device usage


    We've been building a fairly complex application using Sencha Touch for the sole purpose that it works on both desktop and mobile. This was our customer's first requirement.

    We'll try one of the solutions presented in this thread, but Sencha support would be best.

  2. #22
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    5
    mgamsjager is on a distinguished road

      0  

    Default


    TBH Sencha is missing the boat here big time. For really simple apps that should work on a PC, tablet and phone (list of things, simple data entries) I really don't want to write 2 apps for that and route them accordingly to the device.

    Take a look at SAP Fiori. Screen gets filled accordingly to the size of the screen (as in responsive design). At least start with a normal scrollbar for non touch devices and give the developer the choice and don't force your ideology on us.

  3. #23
    Sencha User
    Join Date
    Nov 2013
    Posts
    3
    Vote Rating
    0
    niaaa is on a distinguished road

      0  

    Default


    +1

  4. #24
    Sencha User
    Join Date
    Oct 2013
    Posts
    22
    Vote Rating
    12
    m.dostal will become famous soon enough

      0  

    Default


    ...based on @anj code. Added support for Firefox and IE6/7/8 scrolling...

    PHP Code:
    var mouseWheelHandler = function (e) {
        var 
    window.event || e,
            
    el e.target,
            
    cmp,
            
    offset,
            
    scroller,
            
    delta,
            
    _results = [];
        
    e.preventDefault(); // prevent scrolling when in iframe
        
    while (el !== document.body) {
            if (
    el && el.className && el.className.indexOf('x-container') >= 0) {
                
    cmp Ext.getCmp(el.id);
                if (
    cmp && typeof cmp.getScrollable == 'function' && cmp.getScrollable()) {
                    
    scroller cmp.getScrollable().getScroller();
                    if (
    scroller) {
                        
    delta e.detail e.detail*(-120) : e.wheelDelta;
                        
    offset = { x:0y: -delta*0.5 };
                        
    scroller.fireEvent('scrollstart'scrollerscroller.position.xscroller.position.ye);
                        
    scroller.scrollBy(offset.xoffset.y);
                        
    scroller.snapToBoundary();
                        
    scroller.fireEvent('scrollend'scrollerscroller.position.xscroller.position.y-offset.y);
                        break;
                    }
                }
            }
        
    _results.push(el el.parentNode);
        }
        return 
    _results;
    };

    if (
    document.addEventListener) {
        
    // IE9, Chrome, Safari, Opera
        
    document.addEventListener('mousewheel'mouseWheelHandlerfalse);
        
    // Firefox
        
    document.addEventListener('DOMMouseScroll'mouseWheelHandlerfalse);
    }
    else {
        
    // IE 6/7/8
        
    document.attachEvent('onmousewheel'mouseWheelHandler);

    Not tested, but it seems to work in my ST 2.3.1 application.

Similar Threads

  1. Scrolling in a gridpanel when mouse is on bottom of the grid
    By hominis in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 13 Jul 2010, 2:00 AM
  2. Forms Development Support Framework Poll
    By dardison in forum Community Discussion
    Replies: 1
    Last Post: 8 May 2008, 1:05 PM
  3. Issue Support and Continued Development
    By j05h in forum Community Discussion
    Replies: 9
    Last Post: 7 Feb 2007, 7:41 PM

Thread Participants: 17