Git Product home page Git Product logo

swipablewebview's Introduction

swipablewebview's People

Contributors

kapeli avatar kekeblom avatar

Stargazers

Pho Hale avatar Professor Coal avatar Node avatar Alexey Korsunov avatar Yanbo Sha avatar André J avatar holybin avatar Huu Nghia NGUYEN avatar @RandyMcMillan avatar  avatar Jiyee Sheng avatar 时点软件冯成林 avatar 呆呆的黑格尔 avatar shahruz avatar Carabineiro avatar G Maldonado avatar John Joyce avatar 平江 avatar Ulaş avatar Ray avatar Yang.Y avatar  avatar Tom Schroeder avatar Matthias Seiderer avatar  avatar Gin avatar Nicola Ferruzzi avatar Michael Hood avatar sennychu avatar Rafael Augusto Souza avatar Junil Um avatar Joel Fischer avatar mayulu avatar Chris J. Davis avatar Christian Rasmussen avatar youxiachai avatar Eric Gallager avatar  avatar Bill So avatar  avatar Liu Yi avatar Dmitry Isaev avatar Fabien Franzen avatar Mike Li avatar flypigz avatar Dat Truong avatar  avatar Matthias Steffens avatar Kitsion avatar Simone Leopizzi avatar Paul Mayne avatar Ilija Tovilo avatar Vitali avatar  avatar Vladislav Alekseev avatar Ken Ishimoto avatar Ondra Beneš avatar  avatar  avatar Flori avatar Steven Zhang avatar  avatar Joohun, Maeng avatar Matt Coneybeare avatar

Watchers

Flori avatar mayulu avatar James Cloos avatar  avatar Trent avatar Carabineiro avatar Adriano Monecchi avatar  avatar  avatar  avatar

swipablewebview's Issues

Scroll wheel events not detected when website contains a scrollable element

To reproduce, change the example page.html and wrap the entire contents of the body in the following tags:

<div style="height:500px; width:700px; overflow:auto;">

man page here

</div>

You will see that it is barely possible to go back/forward by swiping to the left/right when the mouse is in the content area even though there is no horizontal scroll bar.

It seems like the scrollWheel callback in DHSwipeClipView is not called often enough in this case.

Compatibility problems with High Sierra

SwipableWebView generates the following error message in the log:
*** WARNING: Method convertPointToBase: in class NSView is deprecated on 10.7 and later. It should not be used in new applications.

Btw. NSLeftMouseDown is deprecated in 10.12.

I recommend the usage of the new WKWebView technology which provides gesture functions in the IB.

The swipe indicator appears behind content within the webview (proposed solution)

Hi,

The bug I was having was that the indicators that appear when you swipe were displaying behind certain DOM elements within my web view (I heavily use zIndex CSS properties on my elements).

In order to fix this problem I modified - (void)launchDrawTimer of DHSwipeClipView.m to the following:

- (void)launchDrawTimer
{
    // a timer is needed because events are queued and processing and drawing
    // takes longer than they are delivered, so the queue fills up
    if(!drawTimer || ![drawTimer isValid])
    {

        self.drawTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f/25 target:webView.swipeIndicator selector:@selector(display) userInfo:nil repeats:NO];

        // keep indicators at top (I added this)
        NSView *v = webView.swipeIndicator.superview;
        [webView.swipeIndicator removeFromSuperview];
        [v addSubview: webView.swipeIndicator];


    }
}

Did I miss something? Or should I be fine doing this.

Swiping with 3 fingers

I have the swiping enabled for three fingers,
System Preferences > Trackpad > More Gestures > Swipe Between pages

therefore, it won't work with either two or three fingers...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.