artasparks / glift

Go Lightweight Frontend
MIT License
115 stars 33 forks source link

Missing board rows when STANDARD_PROBLEM and drawBoardCoords #128

Closed pconerly closed 8 years ago

pconerly commented 8 years ago

There are missing rows and columns when the standard_problem widget is used with drawBoardCoords and a full board.

screen shot 2015-10-28 at 8 09 19 pm

Using this in htmltests/Derp.html

<!DOCTYPE html>
<html>
<head>

<title> ProblemTester </title>
<script type="text/javascript" src="../testdata/sgfs.js"></script>

<!-- AUTO-GEN-DEPS -->
<!-- Compiled -->
<script type="text/javascript" src="../compiled/glift.js"></script>

<!-- END-AUTO-GEN-DEPS -->

    <style>
      * {
        margin: 0;
        padding: 0;
      }
      #glift_display1 {
        width:100%;
        height:500px;
        position:relative;
      }
    </style>
  </head>

  <body>
    <div id="wrap" style="position:relative; width:100%">
      <div id="gheader"></div>
      <div id="glift_display1"></div>
      <div id="extra_info"></div>
      <script type="text/javascript">
        //glift.global.performanceDebugLevel = 'info'
        var basicProblem = glift.create({
          allowWrapAround: true,
          sgfCollection: [
            {
              url: '../testdata/frankbrown_peter.sgf',
              // initialPosition: 
              // boardRegion: 'ALL',
            },
          ],
          divId: "glift_display1",
          sgfDefaults: {
            widgetType: 'STANDARD_PROBLEM'
          },
          display: {
            // drawBoardCoords: false,
            drawBoardCoords: true,
            disableZoomForMobile: false,
            // theme: 'COLORFUL', // useful for debugging box issues.
          }
        });
        window.onresize = function() {
          basicProblem.redraw();
        };
      </script>
    </div>
  </body>
</html>

I'm looking into a fix but I figured I would log it first.

artasparks commented 8 years ago

Oh, try syncing. Should be fixed on head

artasparks commented 8 years ago

In other words, I believe this commit should fix your problem: https://github.com/Kashomon/glift/commit/cd04b4239067cb12fa7999c48acd776e6c5db1e0

pconerly commented 8 years ago

Yup it's fixed, thanks!