Deltakosh преди 7 години
родител
ревизия
0dbf32216c
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      gui/src/2D/controls/displayGrid.ts

+ 4 - 2
gui/src/2D/controls/displayGrid.ts

@@ -123,8 +123,10 @@ export class DisplayGrid extends Control {
 
         if (this._processMeasures(parentMeasure, context)) {
 
-            context.fillStyle = this._background;
-            context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
+            if (this._background) {
+                context.fillStyle = this._background;
+                context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
+            }
 
             let cellCountX = this._currentMeasure.width / this._cellWidth;
             let cellCountY = this._currentMeasure.height / this._cellHeight;