From ccd5e322d677b2704fd88b4422122108ea172654 Mon Sep 17 00:00:00 2001 From: hasparus Date: Tue, 30 Oct 2018 09:14:49 +0100 Subject: [PATCH 1/5] Add Load dropdown --- index.css | 12 +- index.html | 647 +++++++++++++++++++++++++++++++++-------------------- script.js | 7 +- 3 files changed, 417 insertions(+), 249 deletions(-) diff --git a/index.css b/index.css index 7c1467bc..154e1027 100644 --- a/index.css +++ b/index.css @@ -845,22 +845,26 @@ div.slider .ui-slider-handle { line-height: 1.6em; } -#saveDropdown { +.dropdown { + display: inline-block; + /* todo: float: left? */ +} + +.dropdown__options { display: none; position: absolute; - left: 29%; top: 100%; border: 1px solid #5e4fa2; background-color: #a4879b; width: 44px; } -#saveDropdown>div { +.dropdown__options > div { padding: 2px 4px; cursor: pointer; } -#saveDropdown>div:hover { +.dropdown__options > div:hover { color: white; } diff --git a/index.html b/index.html index 755d9893..87a77f20 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ + @@ -7,7 +8,7 @@ @@ -20,8 +21,8 @@ - - + + @@ -31,87 +32,88 @@ - - - + + + + - + - + - + - + - - - + + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - + - + - + - + @@ -130,54 +132,57 @@ - + - + - + - + - - + + - - - - - - - + + + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - + + + @@ -217,26 +222,34 @@

Displayed layers. Drag to move, click to toggle

- -
@@ -277,7 +290,8 @@

Size: 10 - (52 mi) + (52 + mi)

Elements: @@ -285,15 +299,15 @@
- Background: #000000
- Foreground: #53679f + Background: #000000
+ Foreground: #53679f
- Fill: + Fill: #5E4FA2
- Stroke: + Stroke: #5E4FA2
@@ -312,11 +326,14 @@
-
Font size: +
Font size:
-
Radius: - Stroke: +
Radius: + Stroke:
@@ -352,7 +369,8 @@
Label groups: - +
@@ -366,7 +384,8 @@
-

Generation options (new map to apply):

+

Generation options + (new map to apply):

@@ -383,7 +402,8 @@ - + @@ -393,7 +413,8 @@ - + @@ -448,7 +473,8 @@ - + - + @@ -575,7 +607,8 @@
- +
@@ -624,26 +660,55 @@
-

Fantasy Map Generator is an open source tool which procedurally generates fantasy maps. You may use auto-generated maps as they are, edit them or even create a map from scratch. Check out the quick start tutorial and project wiki for guidance. Join our Reddit Community if you have questions, need any help, have a suggestion or just want to share a created map.

-

The project is under active development. For older versions see the changelog. Some details are covered in my blog. To track the current progress see the devboard.

-

Please report bugs here. You may also send me an email.

+

Fantasy Map Generator is an open source + tool which procedurally generates fantasy maps. You may use auto-generated maps as they are, edit them or + even create a map from scratch. Check out the quick start tutorial and project wiki for guidance. Join our Reddit Community if you have questions, need any help, have a suggestion or just want + to share a created map.

+

The project is under active development. For older versions see the changelog. Some details are covered in my blog. To track the current progress see the devboard.

+

Please report bugs here. + You may also send me an email.

- - -
-
.map
-
.svg
-
.png
-
- + + +
@@ -655,33 +720,38 @@ @@ -701,15 +771,18 @@ - + @@ -743,17 +817,19 @@ @@ -777,8 +853,10 @@ @@ -788,7 +866,8 @@ @@ -798,27 +877,32 @@ @@ -834,32 +918,41 @@ - + @@ -871,7 +964,8 @@ @@ -879,11 +973,14 @@
Map cells densityMap + cells density
- + Heightmap template @@ -412,7 +433,8 @@
- + Burgs count @@ -424,7 +446,8 @@
- + States count @@ -436,9 +459,11 @@
- + States disbalanceStates + disbalance
- + Neutral distance @@ -460,9 +486,11 @@
- + Burg names styleBurg + names style
- + Cultures count @@ -485,7 +514,8 @@
- + Precipitation @@ -497,7 +527,8 @@
- + Swampiness @@ -538,7 +569,8 @@
PNG resolutionPNG + resolution
@@ -893,13 +990,17 @@ @@ -923,7 +1024,8 @@
- + @@ -931,7 +1033,8 @@ - +
Mountain @@ -942,10 +1045,12 @@ - + - +
@@ -956,12 +1061,14 @@ - + - + - +
@@ -985,10 +1092,12 @@ -
+
- - + +
@@ -996,12 +1105,15 @@ - + - + - + - + @@ -1024,13 +1137,19 @@ - + const linkInputName = "link"; modal.innerHTML = `
@@ -7891,7 +7891,8 @@ function fantasyMap() {
Enter link to your map
{ event.preventDefault(); - console.log("ok", event) + const formData = new FormData(event.target); + console.log("ok", formData.get(linkInputName), event) document.body.removeChild(modal); }