View Issue Details

IDProjectCategoryView StatusLast Update
0001243HTML & PERLBug Report - Interfacepublic2009-04-14 21:58
ReporterDvdKhl Assigned ToDvdKhl  
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Summary0001243: Anime Group Graphicbar -> wrong width size & tooltip placement (ajax)
DescriptionWhen the "show all" link clicked, the additional groups added to the list have a wrong width size (to small).
While hovering the added groups the tooltip is too far on the right.
TagsAJAX, animepage

Activities

fahrenheit

2008-08-16 17:26

reporter   ~0002291

just looked at it with ergo proxy and the widths are okay.
so specify animes where you get that effect.

also you have to be more specific on the tooltip issue, because they are not the same as the usual title tooltips :P

DvdKhl

2008-08-18 17:20

developer   ~0002296

OK I finally found an example (Found it in the Forum).

http://anidb.net/perl-bin/animedb.pl?show=anime&aid=5625
Click "show all" and then bars with different sizes should appear.

Forum Link: http://forum.anidb.net/viewtopic.php?p=36330#p36330

The tooltip placement is probably my fault:
In CCS I used max-width: 1600px for the html tag and centered it if required.
Therefore I have 160px margin on the left, which is most likely the length by which the tootltip is misplaced.

fahrenheit

2008-08-18 18:41

reporter   ~0002298

man, this issue is very recurrent, i've fixed this several times in the past but for some reason there's always some quirk that makes the freaking width wrong...

DvdKhl

2008-08-18 20:02

developer   ~0002299

Last edited: 2008-08-18 20:08

The function which creates the pieces for the bar, has one issue which seems a bit odd:
(util.js l434)
if ( total > 0 && 200 / total >= 1) mult = Math.floor(200 / total);
img.width = ( width * mult );

Math.floor is used a bit early, cutting of valueable decimals when calculating the img width.
An Anime with 26 episodes would produce a 182px bar,
while one with 12 it would be a 192px bar.

In case of To-Love-ru:
Since it doesn't have max eps entry it uses the max currently available episodes which is currently 26.
200/26 = 7.6923 => mult = 7 => img.width = 2*26 = 182
So the issue with different sizes only applies to anime where neps is 0.
http://anidb.net/perl-bin/animedb.pl?show=anime&aid=5625
http://anidb.net/perl-bin/animedb.pl?show=anime&aid=5373
http://anidb.net/perl-bin/animedb.pl?show=anime&aid=3468

The serverside script seems to take the highest episode released by a group as the max eps.

A good example is Gintama:
The Javascript gets epcnt in the anime xml node (121) since neps is 0
200/121 = 1.652 => mult = 1 => img.width = 121

The serverside script gets the highest ep count by a group which is SaiyaMan with 72
200/72 = 2.777 => mult = 2 => img.width = 2*72 = 144

fahrenheit

2008-08-20 14:57

reporter   ~0002301

fixed, had to revert some of the changes you made DvdKhl, but the gist of it (as in grouprels are there).

DvdKhl

2009-04-14 17:32

developer   ~0002692

Ahm it is happening again *duck*
http://anidb.net/perl-bin/animedb.pl?show=anime&aid=5873
The bar for the group Ayako is too short.

http://arokh.dnsalias.org/AniDB/EpBar.png

I still have the code from my optimizations, should I try to fix it?

fahrenheit

2009-04-14 17:42

reporter   ~0002693

sure

DvdKhl

2009-04-14 17:49

developer   ~0002694

I just noticed, there might be a little more going on:

The javascript doesn't seem to finish properly on that page.
The 'customise' tab never shows.

DvdKhl

2009-04-14 21:34

developer   ~0002695

Ok I've fixed the different length between groups & anime.
(The issue was also present in Conan TV)

I've committed the change to the SVN.
(I only changed the makeBar method in utils.js)

Issue History

Date Modified Username Field Change
2008-08-13 16:59 DvdKhl New Issue
2008-08-15 12:40 antennen Tag Attached: AJAX
2008-08-15 12:40 antennen Tag Attached: anime page
2008-08-16 17:26 fahrenheit Note Added: 0002291
2008-08-18 17:20 DvdKhl Note Added: 0002296
2008-08-18 18:41 fahrenheit Note Added: 0002298
2008-08-18 20:02 DvdKhl Note Added: 0002299
2008-08-18 20:08 DvdKhl Note Edited: 0002299
2008-08-20 14:57 fahrenheit Status new => resolved
2008-08-20 14:57 fahrenheit Resolution open => fixed
2008-08-20 14:57 fahrenheit Assigned To => fahrenheit
2008-08-20 14:57 fahrenheit Note Added: 0002301
2009-01-29 09:54 ninjamask Tag Attached: animepage
2009-01-29 09:57 nwa Tag Detached: anime page
2009-04-14 17:32 DvdKhl Note Added: 0002692
2009-04-14 17:32 DvdKhl Status resolved => feedback
2009-04-14 17:32 DvdKhl Resolution fixed => reopened
2009-04-14 17:42 fahrenheit Note Added: 0002693
2009-04-14 17:49 DvdKhl Note Added: 0002694
2009-04-14 21:34 DvdKhl Note Added: 0002695
2009-04-14 21:58 fahrenheit Status feedback => assigned
2009-04-14 21:58 fahrenheit Assigned To fahrenheit => DvdKhl
2009-04-14 21:58 fahrenheit Status assigned => resolved
2009-04-14 21:58 fahrenheit Resolution reopened => fixed