Skip to content

Commit a2cb03f

Browse files
committedMar 25, 2025
Fix use of old methods in Grid.
Fixes #6962.
1 parent f253761 commit a2cb03f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎src/gameobjects/shape/grid/Grid.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ var GridRender = require('./GridRender');
1919
* grid as well as the width and height of the grid cells. You can set a fill color for each grid
2020
* cell as well as an alternate fill color. When the alternate fill color is set then the grid
2121
* cells will alternate the fill colors as they render, creating a chess-board effect. You can
22-
* also optionally have an outline fill color. If set, this draws lines between the grid cells
23-
* in the given color. If you specify an outline color with an alpha of zero, then it will draw
22+
* also optionally have a stroke fill color. If set, this draws lines between the grid cells
23+
* in the given color. If you specify a stroke color with an alpha of zero, then it will draw
2424
* the cells spaced out, but without the lines between them.
2525
*
2626
* @class Grid
@@ -38,8 +38,8 @@ var GridRender = require('./GridRender');
3838
* @param {number} [cellHeight=32] - The height of one cell in the grid.
3939
* @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.
4040
* @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
41-
* @param {number} [outlineFillColor] - The color of the lines between the grid cells. See the `setOutline` method.
42-
* @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.
41+
* @param {number} [strokeFillColor] - The color of the lines between the grid cells. See the `setStrokeStyle` method.
42+
* @param {number} [strokeFillAlpha] - The alpha of the lines between the grid cells.
4343
*/
4444
var Grid = new Class({
4545

@@ -51,7 +51,7 @@ var Grid = new Class({
5151

5252
initialize:
5353

54-
function Grid (scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)
54+
function Grid (scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, strokeFillColor, strokeFillAlpha)
5555
{
5656
if (x === undefined) { x = 0; }
5757
if (y === undefined) { y = 0; }
@@ -151,9 +151,9 @@ var Grid = new Class({
151151

152152
this.setFillStyle(fillColor, fillAlpha);
153153

154-
if (outlineFillColor !== undefined)
154+
if (strokeFillColor !== undefined)
155155
{
156-
this.setOutlineStyle(outlineFillColor, outlineFillAlpha);
156+
this.setStrokeStyle(strokeFillColor, strokeFillAlpha);
157157
}
158158

159159
this.updateDisplayOrigin();
@@ -164,7 +164,7 @@ var Grid = new Class({
164164
*
165165
* If this method is called with no values then alternating grid cells will not be rendered in a different color.
166166
*
167-
* Also see the `setOutlineStyle` and `setFillStyle` methods.
167+
* Also see the `setStrokeStyle` and `setFillStyle` methods.
168168
*
169169
* This call can be chained.
170170
*

0 commit comments

Comments
 (0)
Please sign in to comment.