Skip to content

Instantly share code, notes, and snippets.

@TimWolla
Created May 31, 2011 13:26
Show Gist options
  • Select an option

  • Save TimWolla/1000495 to your computer and use it in GitHub Desktop.

Select an option

Save TimWolla/1000495 to your computer and use it in GitHub Desktop.
if ($this->fowLayer) {
$this->result .= '</div><div class="fowLayer">';
for ($y = 0; $y < $sizeY; $y++) {
for ($x = 0; $x < $sizeX; $x++) {
$startX = $x;
do {
$isFow = isset($fow[serialize(array('x' => $x, 'y' => $y))]);
$x++;
}
while ($isFow && $x < $sizeX);
$diff = $x - $startX;
$x--;
$this->result .= '<span';
if ($isFow) {
$this->result .= ' class="fow" style="width:'.($diff * 16).'px"';
}
$this->result .= '></span>';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment