Fix horizontal scroll on sprite tile palette
@@ -166,15 +166,22 @@ const SpriteTilePalette = ({ id }: SpriteTilePaletteProps) => {
bottom: 0,
overflowX: "auto",
overflowY: "scroll",
+ minWidth: 0,
}}
>
<div
style={{
display: "flex",
width: "100%",
- justifyContent: "center",
+ minHeight: "100%",
alignItems: "center",
- marginTop: 10,
+ justifyContent: "center",
+ }}
+ >
+ <div
+ style={{
+ width: "100%",
+ textAlign: "center",
}}
>
<div
@@ -182,6 +189,7 @@ const SpriteTilePalette = ({ id }: SpriteTilePaletteProps) => {
style={{
position: "relative",
userSelect: "none",
+ display: "inline-block",
}}
onMouseDown={onDragStart}
onMouseMove={onHover}
@@ -241,6 +249,7 @@ const SpriteTilePalette = ({ id }: SpriteTilePaletteProps) => {
</div>
</div>
</div>
+ </div>
);
};
