Skip to content

Commit

Permalink
Place single pixel call
Browse files Browse the repository at this point in the history
  • Loading branch information
b-j-roberts committed Jan 18, 2025
1 parent c34299d commit f554cb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,7 @@ function App() {
colorPixel={colorPixel}
worldsMode={worldsMode}
openedWorldId={openedWorldId}
placeWorldPixelCall={placeWorldPixelCall}
activeWorld={activeWorld}
width={width}
height={height}
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/canvas/CanvasContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,16 @@ const CanvasContainer = (props) => {
if (!devnetMode) {
props.setSelectedColorId(-1);
props.colorPixel(position, colorId);
await placePixelCall(position, colorId, timestamp);
if (props.worldsMode) {
await props.placeWorldPixelCall(
props.openedWorldId,
[position],
[colorId],
timestamp
);
} else {
await placePixelCall(position, colorId, timestamp);
}
props.clearPixelSelection();
props.setLastPlacedTime(timestamp * 1000);
return;
Expand Down

0 comments on commit f554cb9

Please sign in to comment.