Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blank layout and (kind of) fix scrolling for mobible #99

Merged
merged 3 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions app/components/ModalMapSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ const customStyles = {
transform : 'translate(-50%, -50%)',
background: 'none',
border: 0,
padding: 20,
display: 'flex',
maxHeight: '98%',
padding: 0,
maxHeight: '90%',
maxWidth: '90%',
}
};

Expand Down Expand Up @@ -123,6 +124,8 @@ function IslandLayoutSelector() {
return Layouts.south;
case LayoutType.east:
return Layouts.east;
case LayoutType.blank:
return Layouts.blank;
}
return [];
}
Expand Down Expand Up @@ -181,7 +184,14 @@ function IslandLayoutSelector() {
<Card onClick={() => setLayoutType(LayoutType.west)}><Image variant='card' src={'static/img/island-type-west.png'}/></Card>
<Card onClick={() => setLayoutType(LayoutType.south)}><Image variant='card' src={'static/img/island-type-south.png'}/></Card>
<Card onClick={() => setLayoutType(LayoutType.east)}><Image variant='card' src={'static/img/island-type-east.png'}/></Card>
</Flex>
<Card onClick={() => {
setLayoutType(LayoutType.blank);
confirmDestructiveAction(
'Clear your map? You will lose all unsaved changes.',
() => {
setLayout(0);
});
}}><Image variant='card' src={'static/img/island-type-blank.png'}/></Card> </Flex>
);
}
return (
Expand Down
10 changes: 9 additions & 1 deletion app/components/islandLayouts.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@

export interface Layout { name: string, contributor: string, link?: string, data: string, quality: number }
export enum LayoutType { none = "", west = "west", south = "south", east = "east"}
export enum LayoutType { none = "", blank = "blank", west = "west", south = "south", east = "east"}

export default {
[LayoutType.blank]: [
{
name: 'flat',
contributor: 'eugeneration',
data: '{"version":1,"drawing":{"sand":[5,12,5,9,6,8,8,8,9,9,9,11,10,11,11,10,15,10,16,11,16,13,18,13,19,12,19,10,20,9,25,9,27,11,29,11,30,12,34,12,35,11,38,11,40,13,41,13,42,12,43,12,44,11,47,11,47,12,48,13,49,12,50,12,51,11,53,11,55,13,57,13,59,11,63,11,63,12,64,13,64,12,65,11,65,9,67,9,69,11,74,11,75,10,76,10,77,9,80,12,85,12,86,11,87,11,88,12,89,12,90,11,92,11,93,10,95,10,96,11,100,7,101,8,102,8,103,9,104,9,104,8,105,7,106,7,107,8,107,12,108,13,108,14,107,15,105,15,105,87,103,89,9,89,7,87,7,13,6,13],"level1":[90,13,90,12,92,12,92,13,96,13,99,16,99,81,97,83,15,83,13,81,13,16,16,13],"level2":[90,12,92,12,92,13,90,13],"level3":[90,13,90,12,92,12,92,13],"rock":[[8,14,7,13,6,13,5,12,5,9,6,8,8,8,9,9,9,11,10,11,11,10,15,10,16,11,16,13,13,16,12,16,10,14],[34,12,35,11,38,11,40,13,18,13,19,12,19,10,20,9,25,9,27,11,29,11,30,12],[47,11,47,12,48,13,49,12,50,12,51,11,53,11,55,13,41,13,42,12,43,12,44,11],[59,11,63,11,63,12,64,13,57,13],[69,11,74,11,75,10,76,10,77,9,80,12,85,12,86,11,87,11,88,12,89,12,90,11,92,11,93,10,95,10,96,11,100,7,101,8,102,8,103,9,104,9,104,8,105,7,106,7,107,8,107,12,108,13,108,14,107,15,100,15,99,16,96,13,64,13,64,12,65,11,65,9,67,9]],"pathStone":[]}}',
quality: 5,
}
],
[LayoutType.east]: [
{
name: 'a1',
Expand Down
1 change: 1 addition & 0 deletions app/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ body {
margin: 0;
height: 100%;
overscroll-behavior: none;
overflow: hidden,
}

.no-focus-outline a:focus,
Expand Down
10 changes: 5 additions & 5 deletions bundle.js

Large diffs are not rendered by default.

Binary file added static/img/island-type-blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/layouts/blank-flat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vendor.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5882,7 +5882,7 @@ paper-animate@1.2.1:

paper@eugeneration/paper.js#develop:
version "0.12.4"
resolved "https://codeload.github.com/eugeneration/paper.js/tar.gz/3fcb6d515a57f79e600344812e52f24fb1175e54"
resolved "https://codeload.github.com/eugeneration/paper.js/tar.gz/95ea3d0733260943597ccd99547696c7481b6700"

parallel-transform@^1.1.0:
version "1.2.0"
Expand Down