Skip to content

Commit

Permalink
stencil & pixel selector zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
b-j-roberts committed Jan 18, 2025
1 parent aea66b7 commit 793d0f3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions backend/routes/worlds.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ func getWorlds(w http.ResponseWriter, r *http.Request) {
query := `
SELECT
worlds.*,
COALESCE(favortie_count, 0) AS favorites,
COALESCE(worldfavorites.favorite_count, 0) AS favorites,
COALESCE((SELECT true FROM worldfavorites WHERE user_address = $1 AND worldfavorites.world_id = worlds.world_id), false) as favorited
FROM
worlds
LEFT JOIN (
SELECT
world_id,
COUNT(*) AS favorites
COUNT(*) AS favorite_count
FROM
worldfavorites
GROUP BY
Expand Down Expand Up @@ -485,7 +485,7 @@ func getFavoriteWorlds(w http.ResponseWriter, r *http.Request) {
SELECT * FROM (
SELECT
worlds.*,
COALESCE(favorite_count, 0) AS favorites,
COALESCE(worldfavorites.favorite_count, 0) AS favorites,
COALESCE((SELECT true FROM worldfavorites WHERE user_address = $1 AND worldfavorites.world_id = worlds.world_id), false) as favorited
FROM
worlds
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/canvas/CanvasContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,17 +818,17 @@ const CanvasContainer = (props) => {
<div
className='Canvas__selection'
style={{
top: props.selectedPositionY * canvasScale,
left: props.selectedPositionX * canvasScale
top: props.selectedPositionY * canvasScale * artificialZoom,
left: props.selectedPositionX * canvasScale * artificialZoom
}}
>
<div
className='Canvas__selection__pixel'
style={{
boxShadow: selectedBoxShadow,
backgroundColor: selectedBackgroundColor,
width: canvasScale,
height: canvasScale
width: canvasScale * artificialZoom,
height: canvasScale * artificialZoom
}}
></div>
</div>
Expand Down Expand Up @@ -916,7 +916,7 @@ const CanvasContainer = (props) => {
canvasRef={props.canvasRef}
width={props.width}
height={props.height}
canvasScale={canvasScale}
canvasScale={canvasScale * artificialZoom}
overlayTemplate={props.overlayTemplate}
setTemplateOverlayMode={props.setTemplateOverlayMode}
setOverlayTemplate={props.setOverlayTemplate}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/tabs/stencils/Stencils.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const StencilsExpandedSection = (props) => {
key={index}
openedStencilId={props.openedStencilId}
setOpenedStencilId={props.setOpenedStencilId}
openedWorldId={props.openedWorldId}
address={props.address}
account={props.account}
estimateInvokeFee={props.estimateInvokeFee}
Expand Down
4 changes: 2 additions & 2 deletions infra/art-peace-infra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ postgres:
password: ArtPeacePassword1234

apibara:
streamUrl: https://mainnet.starknet.a5a.ch
#streamUrl: https://sepolia.starknet.a5a.ch
#streamUrl: https://mainnet.starknet.a5a.ch
streamUrl: https://sepolia.starknet.a5a.ch
indexerId: art-peace-indexer-id
authToken: dna_aabbcc

Expand Down

0 comments on commit 793d0f3

Please sign in to comment.