News for hackers. Stuff that matters.
Re:Mystery Rock 'Appears' in Front of Mars Rover by abruzzi on Friday January 17, 2014 @11:59AM (#7076818)
I'm probably crazy, but I've been staring at the two images for five minutes and can't see anything in one that isn't in the other, unless it is obscured by the annoying "view related gallery"button.

EDIT: Ok, half the time I load the page, the page works and I see the rock, but the other half of the time, the image is shifted down, the top half of the display box is black, and the "rock" is off screen...

Re:Mystery Rock 'Appears' in Front of Mars Rover by sisk on Friday January 17, 2014 @12:49PM (#7077218)
You're not crazy.

Psst. Discovery folks. You've got yourself a race condition. You're calculating a `margin-top` to center an image vertically irrespective of whether that image has loaded. You either need to explicitly set the width and height as attributes on the image (good for preventing reflow anyway) or hold off on calculating your dimensions until after the image has loaded. You could even just wait for window load (instead of DOMContentLoaded).

EDIT: Here's an untested, hacky fix. Not an ideal solution but concise and without having to change anything. https://gist.github.com/anonymous/c40e8baf679aad65cb2c

Re:Mystery Rock 'Appears' in Front of Mars Rover by runn1ng on Friday January 17, 2014 @01:34PM (#7077540)
CSS has race conditions?
Re:Mystery Rock 'Appears' in Front of Mars Rover by ehsanu1 on Friday January 17, 2014 @01:40PM (#7077583)
It's JS, check the gist. The race condition is with image loading. I don't think CSS has race conditions, but someone please prove me wrong here :)
Re:Mystery Rock 'Appears' in Front of Mars Rover by troels on Friday January 17, 2014 @02:41PM (#7077967)
I suppose implementation could have, but since the language is declarative, I think that could rightfully be considered a bug.
Re:Mystery Rock 'Appears' in Front of Mars Rover by runn1ng on Tuesday January 21, 2014 @06:48AM (#7094677)
Oh all right, that makes more sense.
Re:Mystery Rock 'Appears' in Front of Mars Rover by bookface on Friday January 17, 2014 @01:39PM (#7077577)
Not that I know of, but javascript does.
Re:Mystery Rock 'Appears' in Front of Mars Rover by vdaniuk on Saturday January 18, 2014 @08:23AM (#7080934)
Imagine the horror.
Re:Mystery Rock 'Appears' in Front of Mars Rover by bfe on Friday January 17, 2014 @01:18PM (#7077418)
You're not crazy, they've discovered a Schrödinger's rock. With a ridiculously high Planck's constant, and conscious observation working backward in time through an imager and interplanetary transmitter to collapse the wave function. So, pretty big news.

[Edited to add umlaut.]

Re:Mystery Rock 'Appears' in Front of Mars Rover by dredmorbius on Saturday January 18, 2014 @12:10AM (#7080168)
Wouldn't Schrödinger's rock with a high Planck's constant be a stick?
Re:Mystery Rock 'Appears' in Front of Mars Rover by computerbob on Friday January 17, 2014 @01:08PM (#7077347)
Link to the image directly. I also had problems with the gallery.

http://static.ddmcdn.com/gif/blogs/dnews-files-2014-01-myste...

Re:Mystery Rock 'Appears' in Front of Mars Rover by Zhenya on Friday January 17, 2014 @12:32PM (#7077097)
Same thing happened to me. I stared and then reloaded page. Something is wonky with their gallery.