Skip to content

Commit

Permalink
modify grid size
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed May 8, 2024
1 parent d9a07c3 commit 38a8488
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions game/static/game/js/drawing.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ var GRID_SPACE_SIZE = 100
let PAPER_WIDTH = GRID_SPACE_SIZE * GRID_WIDTH
let PAPER_HEIGHT = GRID_SPACE_SIZE * GRID_HEIGHT
let PAPER_PADDING = 30
let EXTENDED_PAPER_WIDTH = '100%'
let EXTENDED_PAPER_HEIGHT = '100%'
let EXTENDED_PAPER_WIDTH = PAPER_WIDTH + 2 * PAPER_PADDING
let EXTENDED_PAPER_HEIGHT = PAPER_WIDTH + 2 * PAPER_PADDING

let DEFAULT_CHARACTER_WIDTH = 40
let DEFAULT_CHARACTER_HEIGHT = 20
Expand Down
5 changes: 0 additions & 5 deletions game/static/game/js/level_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,6 @@ ocargo.LevelEditor = function(levelId) {
var imageHeight;

function onDragMove(dx, dy) {
console.log("onDragMove");
paperX = dx + originX;
paperY = dy + originY;

Expand All @@ -1447,18 +1446,14 @@ ocargo.LevelEditor = function(levelId) {

// Stop it being dragged off the edge of the page
if (paperX < 0) {
console.log("paperX < 0");
paperX = 0;
} else if (paperX + imageWidth > paperWidth) {
console.log("paperX off edge");
paperX = paperWidth - imageWidth;
}

if (paperY < 0) {
console.log("paperY < 0");
paperY = 0;
} else if (paperY + imageHeight > paperHeight) {
console.log("paperY off edge");
paperY = paperHeight - imageHeight;
}

Expand Down

0 comments on commit 38a8488

Please sign in to comment.