rvera / image-picker

Image Picker is a simple jQuery plugin that transforms a select element into a more user friendly graphical interface.
http://rvera.github.com/image-picker
Other
907 stars 216 forks source link

data-img-class attribute issue #84

Closed JoseLuisGJ closed 6 years ago

JoseLuisGJ commented 7 years ago

Hi!

I got crazy finding why data-img-class attribute doesn't work on my project. In my case was because using minified version image-picker.min.js disables this feature. Using the image-picker.js version works perfectly. Using Version 0.3.1

Thanks for the project!

ninsky commented 7 years ago

Hi ergum

Thanks for this bug report. I can confirm this behaviour.

BR ninsky

rvera commented 7 years ago

Thanks @ergum and @ninsky, will take a look.

mpgn commented 7 years ago

9 month later. Is this project deprecated ?

rvera commented 7 years ago

Hey @mpgn I've been struggling a bit to find the time to fix this, if you can make a PR with a fix it would be greatly appreciated.

mpgn commented 7 years ago

@rvera I just found after compiling the coffee that the data-img-class is working well. The min.js file on the github is not compiled to the lastest coffee script version. THAT the real bug...

Also why apply the class to every element ?

!

Where the custom class is col-6, refering to :

      @node.addClass(imgClass)
      image.addClass(imgClass)
      thumbnail.addClass(imgClass)

in https://github.com/rvera/image-picker/blob/master/source/coffee/image-picker.coffee#L168

Humni commented 6 years ago

@rvera If you accept any of my pull requests this bug will be resolved (and a few others).

rvera commented 6 years ago

Closing this since it'll be properly compiled and fixed in the next release.