GithubHelp home page GithubHelp logo

fians / waves Goto Github PK

View Code? Open in Web Editor NEW
3.5K 3.5K 502.0 710 KB

Click effect inspired by Google's Material Design

Home Page: http://fians.github.io/Waves/

License: MIT License

JavaScript 68.75% CSS 31.25%

waves's Introduction

Waves

Click effect inspired by Google's Material Design http://fian.my.id/Waves/

Documentation

Waves uses Situs to generate documentation. Here are some steps to run documentation locally on your computer:

  1. Make sure Node.js and Ruby are installed in your computer.
  2. Install SASS via RubyGems (gem install sass).
  3. Install Situs globally via npm (npm install situs -g).
  4. Clone Waves's Github repository, if you haven't already (git clone https://github.com/fians/Waves.git).
  5. Run npm install to install the necessary local node packages.
  6. Install grunt globally with npm install -g grunt-cli.
  7. Run grunt to watch the directory, or simply grunt build to do a single build.
  8. Now just start Situs server (situs server), then visit http://localhost:4000/ on your browser.

License

Waves is created by Alfiana Sibuea, and released under MIT license.

Copyright © 2014-2018 Alfiana E. Sibuea. All rights reserved.

waves's People

Contributors

abulrim avatar ameer1234567890 avatar antonyhell avatar cwaazywabbit avatar dawidcxx avatar drsdavidsoft avatar fians avatar hawkrives avatar hoxxep avatar jonathanarbely avatar jsermeno avatar kkirsche avatar kmxz avatar ptrotter1 avatar samkelleher avatar sqal avatar tylerhirschel avatar xiaoyuze88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waves's Issues

Button color issue.

In waves.min.css:

.waves-button, .waves-button-input, .waves-button:hover, .waves-button:link, .waves-button:visited {
...
  background: 0 0;
...
}

It's drop colors.
May be background-position: left top ?

Source files in bower

Hi, I was surprised when bower downloads only dist folder of the project.
Because I want to use scss files. Can you modify your bower.json?

Thanks for project!

Click event in demo

It looks like it doesn't matter right now where someone clicks?
Unlike the google variant, when I click right, bottom on the header for instance, the effect still comes in from the left, top.

Is this intended behavior or should I try to improve on this? I was fooling around before with JSFiddle and was able to create something similar.. (http://jsfiddle.net/Jeffreyvdh/ewmnbLxc/ , please ignore the bad formatting and code, it's just a fiddle)

Conflict beetween mouseup and mouse right click.

There is a conflict beetween mouseup and right click action. If a link button clicked via right click, the Effect.action will be triggered. It will decrease user experience if user accidentally do right-clicking on .waves-button element.

Waves doesn't work with new version

Your new version with the touch-interaction fix isn't working. The waves effect isn't working on my page, but it does with your latest stable release. Code is just the simple example you gave on your own site, your new release just doesn't work on desktop.

Effect does not fade out.

Whenever you press on a button with Waves using BOTH your left mouse button and your right mouse button, it bugs and the effect does not go away. This only happens when you click both very very fast. Just try clicking using both mouse buttons for 2 seconds as fast as you can and look what happens with the element.


edit:
better yet, hold your left mouse button on a div with Waves, and then press right mouse button (while still holding left mouse button), and then release both buttons.. gets same effect.

how to fix:
i.addEventListener('mousedown', Effect.show, false);

change mousedown so it only works for left mouse button.

Rename files

Hi. Preferably all css and js files starting with a lowercase letter, so please rename them

Stylus ?

Hi, maybe, add stylus support ?

Animation doesn't finish

Really wanted to use this on the tile images for my marketplace, fauna.net, but the animation would often not finish when started.

cannot clone to local

Hi, When I try to clone to local dir using Github for Mac, it cannot find Waves.
Any idea..

regards
Gokhan

Double ripple on touch devices with delegated click

Clicking a button or notification on Snarl while using an iOS device (or simulator?) will produce one ripple on the touch event, and then one ripple on the delayed mouseup/click event, meaning it double-ripples with a 300ms delay.

This doesn't happen with Waves v0.5.5, so I'll see why it's happening with the delegated click handler and how to stop it. (Disabling mouse or ripple events after the first touch for the following 500ms would probably fix it? But I'll see if there's a cleaner way.)

I reckon using fastclick.js would also solve it and make pages/buttons feel faster on mobile, but I'll investigate the Waves code first.

Effect is buggy with touch events

Tested on Nexus 5 and with touch emulation in the browser.

The effect goes completely dark for a moment before the wave effect happens.

Add delegated mouse/touch handler because dynamically added .waves-effect doesn't work

If Snarl notifications have the .waves-effect class added to them, no event listener is bound to them, hence clicking them does not start the waves effect. Waves needs to be fully reloaded every time a dynamic element to be used with .waves-effect is added to the document (potentially causing duplicated event listeners).

I'm not sure what the best solution would be, is adding an addWavesListener function which takes the added element as a parameter a good way of [manually] adding the extra event listeners?

Minify

Also provide minified files, please

Sample site

Is it possible to add sample site into github repo? Sometimes we can lost the site or can't imagine what was the benefit of the source.

animation doesn't finish

the browser is webkit core ; android cell phone
my code is

<a href="tel:123456789" class="waves-effect waves-button">click here</a>

when click this button, the browser default action is pop-up notice and will be stop the waves effect,

when trigger focus out event on this element, the waves effect will be continue to implement.

but when finish, this part of the text on the button will be covered , it's look like this

svg error

First I want to note that this is my first issue report ever so don't be to harsh on me. But on to the good or in this case the bad stuff. Mainly, svgs seems to be, for no real reason targeted causing an

Uncaught TypeError: undefined is not a function

It doesn't seems like it would brake anything, just this annoying console message. Here you can see it in action http://codepen.io/anon/pen/MYEgaa open the console click on the div see nothing happening(except the wished ripple effect) but when you click on the svg you get an TypeError.

A second function doesn't get executed when combined with Waves

A second set of javascript doesn't get executed when combined with WavesJS.
Issue is only present in Firefox (33) and Opera (12.16).

So lets say I have this markup for my page

<div class="waves-effect waves-block section section-one">
    <p>Content</p>
</div>
<div class="waves-effect waves-block section section-two">
    <p>Content</p>
</div>
<div class="waves-effect waves-block section section-three">
    <p>Content</p>
</div>
    <script type="text/javascript">
        Waves.displayEffect();
    </script>

    <script type="text/javascript">
        // $sections = the divs that have .section class
        var $sections = $(".section");
        // On clicking a div
        $sections.click(function() {
            // $sectionOthers = Select all other sections other than clicked section
            var $sectionOthers = $sections.not(this);
            // Wait for 500ms (time taken for ripple effect to complete) before continuing
            setTimeout(function(){
                // doSomething
                $sectionOthers.css("background-color","red");
            },500);
        });
    </script>

The second block of JS doesn't get executed. The ripple effect completes but the second function is not called.
It works well with Chrome and mobile version of Chrome and Firefox (Android).
It also gets executed when done in this way.
left click -> right click -> left click (works)
right click -> left click (doesn't work)

Ripple not displaying in combination with bootstrap

Hi I like your work and i want to use it in my project. Unfortunately Bootstrap is messing things up. The ripple is hooked up correct, as i see that the dom is changing when i click on a icon or button. when i set a break point in Waves.js a glimp of the ripple is shown. so there is surely stuff going on. After i remove bootstrap all ripples work fine . So do you have a suggestion how i could use your lib and bootstrap together?

Thanks in advance.
alex

Using Waves in a Meteor package

Hi @fians,

I'm using Waves in this Meteor package: https://github.com/npvn/meteor-material-design

The package aims to provide Meteor developers an easy way to implement material components in their apps.

Could you please review the following files to see if you're ok with the license information?
https://github.com/npvn/meteor-material-design/blob/master/licenses/credits.md
https://github.com/npvn/meteor-material-design/blob/master/licenses/waves.md

If there's anything you want to change, please feel free to let me know.

Thank you for an awesome library!

Combine circle and box shadow

Hi,

Love the project, thanks for creating it!

I'm trying to create a circular button but one that also benefits from the box-shadow effect, but it seems impossible with the current library. Either the box shadow doesn't show up (because of the -webkit-mask-image) or if the latter is removed, the tap effect becomes a box and goes out of bounds of the circle.

Is there a way to combine this and achieve a true FAB, like the one seen here? http://www.polymer-project.org/components/paper-fab/demo.html.

Thank you.

Wrong sources in waves.min.js.map

Hi, /dist/waves.min.js.map points to sources":["../src/js/waves.js"] but the src directory is not available when installing via Bower.
Can you make it point to the waves file in the dist directory? sources":["waves.js"]

Thank you in advance.

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.