concord-consortium/lab — pull request #25 by wday (2013-04-10 19:12:20+00:00)
Title: layerPosition property is used to render images within a layer

This fixes sporadic render order issues with image-layers and Diffusion Across a Permeable membrane by using layerPosition property from the classic MW models. The renderer uses this to order the svg image nodes accordingly such that the specified layer position order is respected by the rendering engine. The image-layers.mml -> image-layers.json conversion output test has the updated json output for the test to pass.

Without using the layerPosition property within a layer it is possible for element z-order to change depending on how long it takes for the elements to be retrieved / rendered. To see this, open the Image Layers test and change size a few times. Every now and then the below top element will appear below bottom. With this patch, the order is consistent.

Smoke tested the public curriculum models and so no bugs were introduced by this change to the rendering engine.