Mousing over diagrams
- daal
- Oza
- Posts: 2508
- Joined: Wed Apr 21, 2010 1:30 am
- GD Posts: 0
- Has thanked: 1304 times
- Been thanked: 1128 times
Mousing over diagrams
When mousing over a diagram, it would be nice if the pop-up would contain a lot less information. As it is, the huge white window full of %20s is a bit bothersome.
Patience, grasshopper.
- schultz
- Lives in gote
- Posts: 505
- Joined: Tue Apr 20, 2010 5:31 pm
- GD Posts: 0
- Location: Montana
- Has thanked: 80 times
- Been thanked: 62 times
Re: Mousing over diagrams
I'm only seeing it when the page first begins loading. I thought it might be the alternate text for the image, as the issue daal is saying makes it very much sound like that. It's not happening to me, though. Daal, what browser are you using?
Looking at the source code for the page itself, it looks like the javascript behind the processing of the diagram code is what's causing this (does a bunch of replaces on the text sent in and then adds it to the link that gets sent to the actual image/diagram/sgf creator).
Looking at the source code for the page itself, it looks like the javascript behind the processing of the diagram code is what's causing this (does a bunch of replaces on the text sent in and then adds it to the link that gets sent to the actual image/diagram/sgf creator).
KGS: schultz [?].
- Gresil
- Lives with ko
- Posts: 206
- Joined: Tue Apr 20, 2010 11:03 pm
- Rank: mid-SDK
- GD Posts: 495
- KGS: Gresil
- Location: Finland
- Has thanked: 29 times
- Been thanked: 9 times
Re: Mousing over diagrams
Does your browser show image URLs when mousing over? Turn that off, because it looks like a diagram's URL encodes the entire diagram definition. Here's the URL of a random diagram:
Code: Select all
http://www.lifein19x19.com/forum/example4.php?request=SGF&msg=$$Bcm151 Moves 151 to 160 This is a long title, which I am going to keep writing about. You can write paragraphs and paragraphs, and the captions should wrap correctly, and not overlap with the image. Hopefully this works on all diagram sizes. If it does, that would be cool. And nothing else to say here, I guess...
$$ ---------------------------------------
$$ | . . . . . . . . . . . . O . . . . . . |
$$ | . . . . O X . . . . X O X O O . O . . |
$$ | . O O O . X . . . X . . X X O O X . . |
$$ | . . X O . . . X . , X . . X X X O O . |
$$ | . . X O . X X X X O . O . . . X X O . |
$$ | . . . . O O O X O . . . . . X X O . . |
$$ | . . X . . . . O O . . O . . X O . O . |
$$ | . . . . O X . . . . . . X X O O . . . |
$$ | . X X . O 6 . O . O . X . . . O O . . |
$$ | . O X , X . X O . , . . . . X O X X . |
$$ | . O O X . . X O X X . X X X . X . . . |
$$ | . . . X . . . X O . . O X O X X 5 O . |
$$ | . . O X . . . X O . O . O O O . X 4 . |
$$ | . . O X . . . X O . . . O . X O O O . |
$$ | . . O . . . . O X O O . O . . X . . . |
$$ | . . O X X . . . X X X O . O . X O . . |
$$ | . . X O X . . . X . . X O . . X O . . |
$$ | . . O O X 3 . . . . . . X X . X O 0 . |
$$ | . . 2 C O . . . . . . . . . . 9 7 8 . |
$$ ---------------------------------------
So you've got an eye?
That don't impress me much
That don't impress me much
- schultz
- Lives in gote
- Posts: 505
- Joined: Tue Apr 20, 2010 5:31 pm
- GD Posts: 0
- Location: Montana
- Has thanked: 80 times
- Been thanked: 62 times
Re: Mousing over diagrams
Gresil wrote:Does your browser show image URLs when mousing over? Turn that off, because it looks like a diagram's URL encodes the entire diagram definition. Here's the URL of a random diagram:Code: Select all
http://www.lifein19x19.com/forum/example4.php?request=SGF&msg=$$Bcm151 Moves 151 to 160 This is a long title, which I am going to keep writing about. You can write paragraphs and paragraphs, and the captions should wrap correctly, and not overlap with the image. Hopefully this works on all diagram sizes. If it does, that would be cool. And nothing else to say here, I guess...
$$ ---------------------------------------
$$ | . . . . . . . . . . . . O . . . . . . |
$$ | . . . . O X . . . . X O X O O . O . . |
$$ | . O O O . X . . . X . . X X O O X . . |
$$ | . . X O . . . X . , X . . X X X O O . |
$$ | . . X O . X X X X O . O . . . X X O . |
$$ | . . . . O O O X O . . . . . X X O . . |
$$ | . . X . . . . O O . . O . . X O . O . |
$$ | . . . . O X . . . . . . X X O O . . . |
$$ | . X X . O 6 . O . O . X . . . O O . . |
$$ | . O X , X . X O . , . . . . X O X X . |
$$ | . O O X . . X O X X . X X X . X . . . |
$$ | . . . X . . . X O . . O X O X X 5 O . |
$$ | . . O X . . . X O . O . O O O . X 4 . |
$$ | . . O X . . . X O . . . O . X O O O . |
$$ | . . O . . . . O X O O . O . . X . . . |
$$ | . . O X X . . . X X X O . O . X O . . |
$$ | . . X O X . . . X . . X O . . X O . . |
$$ | . . O O X 3 . . . . . . X X . X O 0 . |
$$ | . . 2 C O . . . . . . . . . . 9 7 8 . |
$$ ---------------------------------------
Gresil beat me to it, was editing my post while he posted the above.
Edit - Found where I saw that, and feel a little silly. Code that is tagged with a familiar author...Adrian Petrescu.
KGS: schultz [?].
- daal
- Oza
- Posts: 2508
- Joined: Wed Apr 21, 2010 1:30 am
- GD Posts: 0
- Has thanked: 1304 times
- Been thanked: 1128 times
Re: Mousing over diagrams
I'm using Opera, and I don't have any idea how to turn off image urls.
BTW, I wanted to post a screenshot of what I'm seeing, and I can't figure out how to do that either
Edit: It must be a browser thing, The pop-ups don't show up in Firefox...
BTW, I wanted to post a screenshot of what I'm seeing, and I can't figure out how to do that either
Edit: It must be a browser thing, The pop-ups don't show up in Firefox...
Patience, grasshopper.
- daal
- Oza
- Posts: 2508
- Joined: Wed Apr 21, 2010 1:30 am
- GD Posts: 0
- Has thanked: 1304 times
- Been thanked: 1128 times
Re: Mousing over diagrams
I uploaded this to Imgur (thanks sol.ch), but is there a more direct way to post an image? In any case, this is what I'm seeing:


Patience, grasshopper.
- Phelan
- Gosei
- Posts: 1449
- Joined: Tue Apr 20, 2010 3:15 pm
- Rank: KGS 6k
- GD Posts: 892
- Has thanked: 1550 times
- Been thanked: 140 times
Re: Mousing over diagrams
daal wrote:I uploaded this to Imgur (thanks sol.ch), but is there a more direct way to post an image?
You can use the "upload attachment" function below the main post writing area.
-
Kirby
- Honinbo
- Posts: 9553
- Joined: Wed Feb 24, 2010 6:04 pm
- GD Posts: 0
- KGS: Kirby
- Tygem: 커비라고해
- Has thanked: 1583 times
- Been thanked: 1707 times
Re: Mousing over diagrams
Yes, currently information is passed through the URL to generate an image on the fly. The image is not actually saved anywhere. This was because it was the only way I could figure out how to make diagrams work at the time. I think there's probably an alternative method that we can look into, but maybe after I work on the space issue with the diagrams that I think simpkin brought up.
be immersed
- fwiffo
- Gosei
- Posts: 1435
- Joined: Tue Apr 20, 2010 6:22 am
- Rank: Out of practice
- GD Posts: 1104
- KGS: fwiffo
- Location: California
- Has thanked: 49 times
- Been thanked: 168 times
- ross
- Dies with sente
- Posts: 92
- Joined: Wed Apr 21, 2010 4:40 pm
- Rank: DGS 9k
- GD Posts: 1315
- Location: ã·ã¢ãã«
- Has thanked: 24 times
- Been thanked: 36 times
Re: Mousing over diagrams
daal wrote:I'm using Opera, and I don't have any idea how to turn off image urls.
I'm using Opera too, but I'm not seeing it--but if I remember correctly, I've used versions of Opera that will use the image URL as the alt text if no alt text is specified. That means that this problem could be fixed by just adding some short alt text for the image (like "Go Diagram"), I'm guessing.
-
Kirby
- Honinbo
- Posts: 9553
- Joined: Wed Feb 24, 2010 6:04 pm
- GD Posts: 0
- KGS: Kirby
- Tygem: 커비라고해
- Has thanked: 1583 times
- Been thanked: 1707 times
Re: Mousing over diagrams
fwiffo wrote:Does the server side script even cache the generated images?
Well, if I think about the actual implementation, there's a good chance that it does. Basically, we just use the php imagepng function, which outputs the raw image stream directly. I haven't looked into how php implements this.
The imagepng function can also take a filename as a parameter, in which case it will save the file to the given location.
be immersed
-
Kirby
- Honinbo
- Posts: 9553
- Joined: Wed Feb 24, 2010 6:04 pm
- GD Posts: 0
- KGS: Kirby
- Tygem: 커비라고해
- Has thanked: 1583 times
- Been thanked: 1707 times
Re: Mousing over diagrams
ross wrote:daal wrote:I'm using Opera, and I don't have any idea how to turn off image urls.
I'm using Opera too, but I'm not seeing it--but if I remember correctly, I've used versions of Opera that will use the image URL as the alt text if no alt text is specified. That means that this problem could be fixed by just adding some short alt text for the image (like "Go Diagram"), I'm guessing.
I'm wasn't seeing the behavior before, either, but I added the alt text like you suggested for now.
be immersed
- daal
- Oza
- Posts: 2508
- Joined: Wed Apr 21, 2010 1:30 am
- GD Posts: 0
- Has thanked: 1304 times
- Been thanked: 1128 times
Re: Mousing over diagrams
Kirby wrote:ross wrote:daal wrote:I'm using Opera, and I don't have any idea how to turn off image urls.
I'm using Opera too, but I'm not seeing it--but if I remember correctly, I've used versions of Opera that will use the image URL as the alt text if no alt text is specified. That means that this problem could be fixed by just adding some short alt text for the image (like "Go Diagram"), I'm guessing.
I'm wasn't seeing the behavior before, either, but I added the alt text like you suggested for now.
Doesn't seem to have done the trick, but thanks for the effort.
Patience, grasshopper.
-
Kirby
- Honinbo
- Posts: 9553
- Joined: Wed Feb 24, 2010 6:04 pm
- GD Posts: 0
- KGS: Kirby
- Tygem: 커비라고해
- Has thanked: 1583 times
- Been thanked: 1707 times
Re: Mousing over diagrams
daal wrote:
Doesn't seem to have done the trick, but thanks for the effort.
It looks like your browser shows the URL regardless of the ALT text, then. I'm thinking that we're going to have to save the images on the server to adjust this, rather than generating them dynamically. I don't see how using an MD5 for a dynamically generated filename would allow for us to get around saving the images to disk since MD5 can have collisions. Perhaps we could save the files to the server using an MD5 hash for the filename, and if a duplicate filename existed, we could increment the filecount (eg. <md5-hash>1.gif, <md5-hash>2.gif, etc.). This would be inefficient for the cases where you have two of the same images (because we would generate separate, but identical images).
On the other hand, perhaps the chances of having an MD5 collision are low enough that we could use this filenaming scheme.
be immersed