Browse Source

Use the server's global max_board_size on the client

dev_h
ophir 4 years ago
parent
commit
233d756cc7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      client-data/js/board.js

+ 1
- 1
client-data/js/board.js View File

430
 function resizeCanvas(m) {
430
 function resizeCanvas(m) {
431
 	//Enlarge the canvas whenever something is drawn near its border
431
 	//Enlarge the canvas whenever something is drawn near its border
432
 	var x = m.x | 0, y = m.y | 0
432
 	var x = m.x | 0, y = m.y | 0
433
-	var MAX_BOARD_SIZE = 65536; // Maximum value for any x or y on the board
433
+	var MAX_BOARD_SIZE = Tools.server_config.MAX_BOARD_SIZE || 65536; // Maximum value for any x or y on the board
434
 	if (x > Tools.svg.width.baseVal.value - 2000) {
434
 	if (x > Tools.svg.width.baseVal.value - 2000) {
435
 		Tools.svg.width.baseVal.value = Math.min(x + 2000, MAX_BOARD_SIZE);
435
 		Tools.svg.width.baseVal.value = Math.min(x + 2000, MAX_BOARD_SIZE);
436
 	}
436
 	}

Loading…
Cancel
Save