It is currently 28 Apr 2024, 10:40
   
Text Size

Autocard question

Discuss anything concerning this site and its contents

Moderator: CCGHQ Admins

Re: Autocard question

Postby 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.
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: Autocard question

Postby Goblin Hero » 11 Oct 2014, 14:35

sweetLu wrote:Did something with the autocard change recently?
No. Looks like your phone update is the issue.
When you´re a goblin, you don´t have to step forward to be a hero -- everyone else just has to step back.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Re: Autocard question

Postby 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?
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: Autocard question

Postby Goblin Hero » 27 Oct 2014, 15:29

sweetLu wrote:it seems that the window position is "off"
Confirmed. But I'm not a Javascript guru, so I need someone who knows how to fix it. The problem lies in this function:
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.
User avatar
Goblin Hero
Site Admin
Site Admin
 
Posts: 1992
Joined: 23 Oct 2005, 09:37
Location: Russia
Has thanked: 218 times
Been thanked: 351 times

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 33 guests


Who is online

In total there are 33 users online :: 0 registered, 0 hidden and 33 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 33 guests

Login Form