GithubHelp home page GithubHelp logo

simonwep / gpickr Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 13.0 570 KB

Demo of pickr integrated into another widget. A gradient-picker.

Home Page: https://simonwep.github.io/gpickr

License: MIT License

HTML 2.73% JavaScript 72.00% CSS 25.27%

gpickr's Introduction

gpickr's People

Contributors

simonwep 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gpickr's Issues

Error in setLinearAngle

There's an error in gpickr.js - setLinearAngle, lines 403/404:

angle = typeof angle === 'number' ? angle : (normalize.angleToDegrees(angle) || (this._angles.find(v => v.name === angle) || {}).angle);

when angle = '0deg', normalize.angleToDegrees(angle) returns (correctly) 0, but in this case in the expression this is considered as logical "false", so lines 403/404 return a value of 'undefined' !

I solved it in the following way:

if (typeof angle !== 'number') { if ((angle = normalize.angleToDegrees(angle)) === null) { angle = (this._angles.find(v => v.name === angle) || {}).angle; } }

Publish In NPM

Hi There

today I have successfully implemented/integrated this project into WPOnion but I am not able to install it via NPM. so my wponion's release is on hold. until this gets released in NPM.

I hope you can get this released soon.

Parsing existing gradient-strings

I am trying to set a gradient color via javascript function using below gradient css

radial-gradient(circle at bottom right, rgba(66, 68, 90, 1) 0%,rgba(66, 68, 90, 1) 0%,rgba(255, 168, 125, 1) 0%,rgba(255, 69, 69, 1) 100%)

And JS is

gpickr.setGradient('radial-gradient(circle at bottom right, rgba(66, 68, 90, 1) 0%,rgba(66, 68, 90, 1) 0%,rgba(255, 168, 125, 1) 0%,rgba(255, 69, 69, 1) 100%)')

when the above code used the output should look like below

Correct Output

Instead the output looks like

Wrong Output

You can run the above JS in your demo via browser console and try

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.