Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nanoGALLERY: error on hoverOut n[r].toFixed is undefined [nanoGallery] #86

Closed
macsupport opened this issue Jul 28, 2015 · 6 comments
Closed

Comments

@macsupport
Copy link

I am getting this error: nanoGALLERY: error on hoverOut n[r].toFixed is undefined [nanoGallery] when using labelAppear, labelAppear75 for thumbNail effects

@Kris-B
Copy link
Owner

Kris-B commented Sep 3, 2015

Can you give me a live URL to check this?

@andrea-sdl
Copy link

Hi Kris, I just got the same issue like macsupport.
At least in our case the issue can be seen when the CSS is dynamically loaded (async-way) and it happens because on the

var c=jQuery.Color($newDiv.find('.labelImage'),'backgroundColor');

it returns transparent because the browser still hasn't interpreted/loaded the nanogallery CSS.

I guess it's no nanogallery fault in this case but it might help fixing this by adding the possibility to offer a "default" value for the labeImage styling values.

@Kris-B
Copy link
Owner

Kris-B commented Oct 14, 2015

@andrea-sdl many thanks for the update!
I'll implement a fix based on this.

@Kris-B
Copy link
Owner

Kris-B commented Oct 25, 2015

@andrea-sdl a fix is implemented in v5.9.0 but I'm not sure it will always work correctly.
The default value may be incorrect...

@andrea-sdl
Copy link

@Kris-B thanks for the super-fast support.
I checked the code and now it will surely work, although you are right, it might not work correctly because it will use "black" as default background, while it might be an issue with async loading (and therefore the css is still not interpreted).

Your fix will work, although it will cause some graphical inconsistency when the problem arise (as you noted).

To evolve it even further we could

  1. Allow some kind of function to be callable externally so that we can reset G.custGlobals.oldLabelRed etc with the right values (after the CSS has been interpreted).
    I have some ideas on this, maybe I'll try to put them down on code if I got some extra time.
  2. Pass a "default" label rgb-color-background in the init, so instead of 0,0,0 (rgb) we have a more consistent fallback in case of errors. This isn't the cleanest solution but it would probably be the fastest to implement.

@Kris-B
Copy link
Owner

Kris-B commented Jan 15, 2017

a workaround is implemented in nanogallery2 (http://nanogallery2.nanostudio.org)

@Kris-B Kris-B closed this as completed Jan 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants