Autocard question
Discuss anything concerning this site and its contents
Moderator: CCGHQ Admins
Re: Autocard question
by sweetLu » 11 Oct 2014, 06:06
Did something with the autocard change recently? I used to be able to use the autocard on my phone but haven't been able to lately. My phone probably updated recently and I didn't notice but I'm going it's something I can fix.
Re: Autocard question
by Goblin Hero » 11 Oct 2014, 14:35
No. Looks like your phone update is the issue.sweetLu wrote:Did something with the autocard change recently?
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
-
Goblin Hero - Site Admin
- Posts: 1992
- Joined: 23 Oct 2005, 09:37
- Location: Russia
- Has thanked: 218 times
- Been thanked: 351 times
Re: Autocard question
by sweetLu » 12 Oct 2014, 01:30
This is odd. I originally thought the autocard wasn't working at all but it seems that the window position is "off". For instance, in the first post or two of a page the autocard window is right below the card name. But if I click on a card name in the third post of page one in this thread the autocard window appears half a page away below the card name. It gets worse the lower I go to the point none of the autocard windows appear on my screen.
I'm using chrome on an android (I can get version numbers if someone cares). Is there another browser someone is using where they aren't having problems with the autocard feature?
I'm using chrome on an android (I can get version numbers if someone cares). Is there another browser someone is using where they aren't having problems with the autocard feature?
Re: Autocard question
by Goblin Hero » 27 Oct 2014, 15:29
Confirmed. But I'm not a Javascript guru, so I need someone who knows how to fix it. The problem lies in this function:sweetLu wrote:it seems that the window position is "off"
- Code: Select all
function moveCard(event)
{
if (window.pageYOffset)
{
scrolly = window.pageYOffset;
scrollx = window.pageXOffset;
winy = window.innerHeight - 20;
winx = window.innerWidth - 20;
}
else if (document.documentElement && document.documentElement.scrollTop)
{
scrolly = document.documentElement.scrollTop;
scrollx = document.documentElement.scrollLeft;
winy = document.documentElement.clientHeight;
winx = document.documentElement.clientWidth;
}
else if (document.body)
{
scrolly = document.body.scrollTop;
scrollx = document.body.scrollLeft;
winy = document.body.clientHeight;
winx = document.body.clientWidth;
}
if (event.clientX + mtg_text.offsetWidth < winx) resx = scrollx + event.clientX;
else
{
resx = scrollx + event.clientX - mtg_text.offsetWidth;
if (resx < scrollx) resx = scrollx;
}
if (event.clientY + mtg_text.offsetHeight < winy) resy = scrolly + event.clientY + 5;
else
{
resy = scrolly + event.clientY - mtg_text.offsetHeight - 5;
if (resy < scrolly) resy = scrolly;
}
mtg_text.style.left = resx+'px';
mtg_text.style.top = resy+'px';
}
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
-
Goblin Hero - Site Admin
- Posts: 1992
- Joined: 23 Oct 2005, 09:37
- Location: Russia
- Has thanked: 218 times
- Been thanked: 351 times
19 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 33 guests