<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>player/images/board-7.gif</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,9 +3,7 @@
 &lt;html&gt;
 &lt;head&gt;
     &lt;title&gt;EidoGo Problem Example&lt;/title&gt;
-
     &lt;script type=&quot;text/javascript&quot; src=&quot;player/js/all.compressed.js&quot;&gt;&lt;/script&gt;
-    
 &lt;/head&gt;
 &lt;body&gt;
 	
@@ -18,6 +16,12 @@
         ;W[ih];B[kk];W[hi];B[ij];W[hk])
     &lt;/div&gt;
     
+    &lt;p&gt;Non-shrinking problem on 7x7&lt;/p&gt;
+    &lt;div class=&quot;eidogo-player-problem&quot; shrink=&quot;no&quot;&gt;
+        (;GM[1]FF[4]CA[UTF-8]AP[CGoban:3]ST[2]RU[Japanese]SZ[7]KM[0.00]
+        AW[ab][ac])
+    &lt;/div&gt;
+    
     &lt;p&gt;Another problem:&lt;/p&gt;
     &lt;div class=&quot;eidogo-player-problem&quot; sgf=&quot;sgf/problem2.sgf&quot;&gt;&lt;/div&gt;
     </diff>
      <filename>example_problem.html</filename>
    </modified>
    <modified>
      <diff>@@ -438,6 +438,13 @@
 .eidogo-player .board-gutter.with-coords {
     background: #654 url(../images/board-bg-coords.png) no-repeat 5px 5px;
 }
+.eidogo-player .board.size7 {
+	position: absolute;
+	width: 143px;
+	height: 143px;
+	background: #888 url(../images/board-7.gif);
+	margin: 114px 114px;
+}
 .eidogo-player .board.size9 {
 	position: absolute;
 	width: 181px;
@@ -934,8 +941,12 @@
     min-height: 50px;
     background: #555;
 }
-.eidogo-player.theme-problem .board.size19 {
-    background-image: url(../images/board-19-simple.gif) !important;
+.eidogo-player.theme-problem .board-gutter {
+    padding: 0;
+}
+.eidogo-player.theme-problem .board.size7, .eidogo-player.theme-problem .board.size9,
+.eidogo-player.theme-problem .board.size13 {
+    margin: 0;
 }
 .eidogo-player.theme-problem .controls-container {
     float: none;</diff>
      <filename>player/css/player.css</filename>
    </modified>
    <modified>
      <diff>@@ -1010,8 +1010,8 @@ return [x,y,_3b[0],_3b[1]];
 },crop:function(_41){
 eidogo.util.addClass(this.domContainer,&quot;shrunk&quot;);
 this.domGutter.style.overflow=&quot;hidden&quot;;
-var _42=_41.width*this.pointWidth+this.margin;
-var _43=_41.height*this.pointHeight+this.margin;
+var _42=_41.width*this.pointWidth+(this.margin*2);
+var _43=_41.height*this.pointHeight+(this.margin*2);
 this.domGutter.style.width=_42+&quot;px&quot;;
 this.domGutter.style.height=_43+&quot;px&quot;;
 this.player.dom.player.style.width=_42+&quot;px&quot;;
@@ -1272,7 +1272,7 @@ this.searching=false;
 this.editingText=false;
 this.goingBack=false;
 this.problemMode=cfg.problemMode;
-this.problemColor=cfg.problemColor||&quot;W&quot;;
+this.problemColor=cfg.problemColor||&quot;B&quot;;
 this.prefs={};
 this.prefs.markCurrent=typeof cfg.markCurrent!=&quot;undefined&quot;?!!cfg.markCurrent:true;
 this.prefs.markNext=typeof cfg.markNext!=&quot;undefined&quot;?cfg.markNext:false;
@@ -1316,7 +1316,7 @@ this.progressiveUrl=cfg.progressiveUrl||cfg.sgfUrl.replace(/\?.+$/,&quot;&quot;);
 }
 }else{
 var _19=cfg.boardSize||&quot;19&quot;;
-var _1a={19:6.5,13:4.5,9:3.5};
+var _1a={19:6.5,13:4.5,9:3.5,7:2.5};
 var _1b={_children:[{SZ:_19,KM:cfg.komi||_1a[_19]||6.5,_children:[]}]};
 if(cfg.opponentUrl){
 this.gameName=&quot;gnugo&quot;;
@@ -1411,11 +1411,15 @@ _3(&quot;get&quot;,url,null,_27,_2c,this,30000);
 _2e=_2e||{};
 this.handleDisplayPrefs();
 var _2f=_2e.SZ||19;
-if(_2f!=9&amp;&amp;_2f!=13&amp;&amp;_2f!=19){
+if(_2f!=7&amp;&amp;_2f!=9&amp;&amp;_2f!=13&amp;&amp;_2f!=19){
 _2f=19;
 }
 if(this.shrinkToFit){
 this.calcShrinkToFit(_2e,_2f);
+}else{
+if(this.problemMode&amp;&amp;!this.cropParams){
+this.cropParams={width:_2f,height:_2f,top:0,left:0,padding:1};
+}
 }
 if(!this.board){
 this.createBoard(_2f);
@@ -3115,10 +3119,14 @@ if(el.innerHTML){
 _a.sgf=el.innerHTML;
 }
 }
+var _d=el.getAttribute(&quot;shrink&quot;);
+if(_d){
+_a.shrinkToFit=(_d==&quot;no&quot;?false:true);
+}
 el.innerHTML=&quot;&quot;;
 eidogo.util.show(el);
-var _d=new eidogo.Player(_a);
-eidogo.autoPlayers.push(_d);
+var _e=new eidogo.Player(_a);
+eidogo.autoPlayers.push(_e);
 }
 });
 })();</diff>
      <filename>player/js/all.compressed.js</filename>
    </modified>
    <modified>
      <diff>@@ -349,8 +349,8 @@ eidogo.BoardRendererHtml.prototype = {
     crop: function(crop) {
         eidogo.util.addClass(this.domContainer, &quot;shrunk&quot;);
         this.domGutter.style.overflow = &quot;hidden&quot;;
-        var width = crop.width * this.pointWidth + this.margin;
-        var height = crop.height * this.pointHeight + this.margin;
+        var width = crop.width * this.pointWidth + (this.margin * 2);
+        var height = crop.height * this.pointHeight + (this.margin * 2);
         this.domGutter.style.width = width + &quot;px&quot;;
         this.domGutter.style.height = height + &quot;px&quot;;
         this.player.dom.player.style.width = width + &quot;px&quot;;</diff>
      <filename>player/js/board.js</filename>
    </modified>
    <modified>
      <diff>@@ -51,9 +51,13 @@
             for (var key in autoCfg)
                 cfg[key] = autoCfg[key];
             var sgfUrl = el.getAttribute('sgf');
-            if (sgfUrl) cfg.sgfUrl = sgfUrl;
-            else if (el.innerHTML) cfg.sgf = el.innerHTML;
-            
+            if (sgfUrl)
+                cfg.sgfUrl = sgfUrl;
+            else if (el.innerHTML)
+                cfg.sgf = el.innerHTML;
+            var shrink = el.getAttribute('shrink');
+            if (shrink)
+                cfg.shrinkToFit = (shrink == &quot;no&quot; ? false : true);            
             el.innerHTML = &quot;&quot;;
             eidogo.util.show(el);
             </diff>
      <filename>player/js/init.js</filename>
    </modified>
    <modified>
      <diff>@@ -291,7 +291,7 @@ eidogo.Player.prototype = {
         
         // problem-solving mode: respond when the user plays a move
         this.problemMode = cfg.problemMode;
-        this.problemColor = cfg.problemColor || &quot;W&quot;;
+        this.problemColor = cfg.problemColor || &quot;B&quot;;
     
         // user-changeable preferences
         this.prefs = {};
@@ -373,7 +373,7 @@ eidogo.Player.prototype = {
     
             // start from scratch
             var boardSize = cfg.boardSize || &quot;19&quot;;
-            var komiMap = {19: 6.5, 13: 4.5, 9: 3.5};
+            var komiMap = {19: 6.5, 13: 4.5, 9: 3.5, 7: 2.5};
             var blankGame = {_children: [{
                     SZ: boardSize,
                     KM: cfg.komi || komiMap[boardSize] || 6.5,
@@ -532,9 +532,18 @@ eidogo.Player.prototype = {
         this.handleDisplayPrefs();
         var size = gameRoot.SZ || 19;
         // Only three sizes supported for now
-        if (size != 9 &amp;&amp; size != 13 &amp;&amp; size != 19)
+        if (size != 7 &amp;&amp; size != 9 &amp;&amp; size != 13 &amp;&amp; size != 19)
             size = 19;
-        if (this.shrinkToFit) this.calcShrinkToFit(gameRoot, size);
+        if (this.shrinkToFit)
+            this.calcShrinkToFit(gameRoot, size);
+        else if (this.problemMode &amp;&amp; !this.cropParams) {
+            this.cropParams = {
+                width: size,
+                height: size,
+                top: 0,
+                left: 0,
+                padding: 1};
+        }
         if (!this.board) {
             // first time
             this.createBoard(size);</diff>
      <filename>player/js/player.js</filename>
    </modified>
    <modified>
      <diff>@@ -25,6 +25,9 @@ if ($dir &amp;&amp; $collections[$dir] &amp;&amp; $num) {
 } else {
     
     echo &quot;&lt;h2&gt;Go Problems&lt;/h2&gt;&quot;;
+    echo &quot;&lt;p&gt;Note: responses are provided for the problems, but they will not
+        tell you when you get it right. This area of the site is still
+        being developed.&lt;/p&gt;&quot;;
     echo &quot;&lt;ul&gt;\n&quot;;
     foreach ($collections as $dir =&gt; $title) {
         echo &quot;&lt;li&gt;&lt;p&gt;&lt;a href='/problems/$dir/1'&gt;$title&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;\n&quot;;</diff>
      <filename>problems.phtml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ee0aa05283b865261607bd8416832e2a5f904b3b</id>
    </parent>
  </parents>
  <author>
    <name>Justin Kramer</name>
    <email>jkkramer@gmail.com</email>
  </author>
  <url>http://github.com/jkk/eidogo/commit/bc9c23d996c5e8a670a053ef8f4aca4b9b4bac5c</url>
  <id>bc9c23d996c5e8a670a053ef8f4aca4b9b4bac5c</id>
  <committed-date>2008-09-12T11:29:56-07:00</committed-date>
  <authored-date>2008-09-12T11:29:56-07:00</authored-date>
  <message>7x7 board, shrinkToFit:false for problem mode, other problem mode fixes</message>
  <tree>c17596da03c670f804cc179d0c4c9825752044bc</tree>
  <committer>
    <name>Justin Kramer</name>
    <email>jkkramer@gmail.com</email>
  </committer>
</commit>
