Code Monkey home page Code Monkey logo

letterpic's People

Contributors

yakovlevga 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

Watchers

 avatar  avatar  avatar  avatar  avatar

letterpic's Issues

More than 19 colors/gradients = "TypeError: Cannot read property '0' of undefined"

Using default options on a webpage that has more than 19 unique users, I encountered a "TypeError: Cannot read property '0' of undefined". This error caused only the first 19 icons to be generated and everything after was an unrendered invisible DIV. If I disable the gradient option and use fill: 'color', no error is throw, but all users over the count of 19 appear on a black background.

Is this a bug or are developers required to identify the maximum unique users being displayed and specify an array of colors that meets or exceeds that amount? (I was under the impression that additional icon colors would start over at the beginning of the array of colors.)

Thanks.

Chainable?

Are you able to make the plugin "chainable" or add an event?

For example, I tried to add a class after calling letterpic and get a Cannot read property 'addClass' of undefined error.

$(".letterpic").letterpic().addClass('pointer');

Am I doing this wrong? I tried using deferred.then(), but it didn't work either.

My use case is: I'd like to identify elements that have a successfully loaded images (identified by an undefined "width" attribute) and add a click event to use MagnificPopUp to display a larger version of the image (or launch a upload tool, editor, crop-tool, etc.)

NOTE: I'll probably work around this by changing my trigger to use img.letterpic.

it's overriding window.self variable

It's a nice plugin.
Found one critical issue. It's overriding the window.self variable, and thus my other js libraries (or any other plugin which depends on window.self object) are not working correctly.
Please check line no. 36 in jquery.letterpic.js.
It should be "var self = this; "

Square support

[FEATURE REQUEST] The avatar images on many of my projects are displayed using square shapes and occasionally have slightly rounded corners. In some UIs, the profile image may appear as a top-hanging tab w/rounded corners only on the bottom. (I noticed GitHub uses square avatars w/slightly rounded corners.) Would it be difficult to add square and corner-rounding options? Thanks.

Not working inside hidden element, eg. tab

Hi, this is great and really useful. I'm using the HTML method, but the pics won't display in an initially hidden element; in my case a Bootstrap tab. I have tried to initialize the letterpic plugin after the tab is shown, but they still won't display. Any ideas what I can do to get them to show up?

Combination of images and solid/gradient background

Hi,

First of all, thank you for this great plugin!

Is it possible to 'dynamically' load images depending on a data-attribute (for example) for certain users and the solid/gradient colors for all others?
Not all users have supplied images/their photo. But I would love to show their photo when it is there, and solid/gradient background for the others.

Thank you in advance for your reply.

Maurice.

Letter pic based on first initial?

Hi there,

Great library, I was wondering is there any way to have all names with the first letter the same color?

Example
Andrew - Green
Adam - Green
Harry - Red
Tom - Blue
Tim - Blue

The issue I face currently is that if I have an avatar on a layout page at the top, (similar to how githbu shows your avatar on the top of the page) then the avatar is always displayed as the first colour in the array. So if I login as Andrew it will be red, if I login as Harry it will be red.

But if I have a page that shows a list of people, then my avatar colour at the top of the page and my avatar colour in the list could be different

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.