mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
v. 0.55.92b
This commit is contained in:
parent
8dae6b7986
commit
01af21b989
2 changed files with 9 additions and 9 deletions
|
|
@ -28,8 +28,8 @@
|
||||||
<script src="libs/polylabel.min.js"></script>
|
<script src="libs/polylabel.min.js"></script>
|
||||||
<script src="libs/quantize.min.js" defer></script>
|
<script src="libs/quantize.min.js" defer></script>
|
||||||
<script src="libs/d3-hexbin.v0.2.min.js" defer></script>
|
<script src="libs/d3-hexbin.v0.2.min.js" defer></script>
|
||||||
<link rel="stylesheet" type="text/css" href="index.css?version=0.5591b"/>
|
<link rel="stylesheet" type="text/css" href="index.css?version=0.5592b"/>
|
||||||
<link rel="stylesheet" type="text/css" href="icons.css?version=0.5591b"/>
|
<link rel="stylesheet" type="text/css" href="icons.css?version=0.5592b"/>
|
||||||
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
|
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body class="fullscreen">
|
<body class="fullscreen">
|
||||||
|
|
@ -761,5 +761,5 @@
|
||||||
Type: <span id="feature">no</span>
|
Type: <span id="feature">no</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="script.js?version=0.5591b"></script>
|
<script type="text/javascript" src="script.js?version=0.5592b"></script>
|
||||||
</body>
|
</body>
|
||||||
12
script.js
12
script.js
|
|
@ -2969,7 +2969,7 @@ function fantasyMap() {
|
||||||
var name = generateName(culture);
|
var name = generateName(culture);
|
||||||
// please label
|
// please label
|
||||||
if (brush === "addLabel") {
|
if (brush === "addLabel") {
|
||||||
addedLabels.append("text").attr("x", x).attr("y", y).text(name).on("click", editLabel);
|
labels.select("#addedLabels").append("text").attr("x", x).attr("y", y).text(name).on("click", editLabel);
|
||||||
if (!shift) {$("#"+brush).removeClass("pressed");}
|
if (!shift) {$("#"+brush).removeClass("pressed");}
|
||||||
}
|
}
|
||||||
if (brush === "addBurg") {
|
if (brush === "addBurg") {
|
||||||
|
|
@ -3372,15 +3372,15 @@ function fantasyMap() {
|
||||||
var group = d3.select(elSelected.node().parentNode);
|
var group = d3.select(elSelected.node().parentNode);
|
||||||
var groupOld = group.attr("id");
|
var groupOld = group.attr("id");
|
||||||
var groupNew = editGroupSelect.value;
|
var groupNew = editGroupSelect.value;
|
||||||
// check if label is country name
|
// check if label is a country name
|
||||||
if (elSelected.attr("id").includes("regionLabel")) {
|
if (elSelected.attr("id").includes("regionLabel")) {
|
||||||
var state = +elSelected.attr("id").slice(11);
|
var state = +elSelected.attr("id").slice(11);
|
||||||
states[state].name = name;
|
states[state].name = editText.value;
|
||||||
}
|
}
|
||||||
// check if label is manor name
|
// check if label is a manor name
|
||||||
if (elSelected.attr("id").includes("manorLabel")) {
|
if (elSelected.attr("id").includes("manorLabel")) {
|
||||||
var manor = +elSelected.attr("id").slice(10);
|
var manor = +elSelected.attr("id").slice(10);
|
||||||
manors[manor].name = name;
|
manors[manor].name = editText.value;
|
||||||
}
|
}
|
||||||
if (editGroupInput.value !== "") {
|
if (editGroupInput.value !== "") {
|
||||||
groupNew = editGroupInput.value.toLowerCase().replace(/ /g, "_").replace(/[^\w\s]/gi, "");
|
groupNew = editGroupInput.value.toLowerCase().replace(/ /g, "_").replace(/[^\w\s]/gi, "");
|
||||||
|
|
@ -3392,7 +3392,7 @@ function fantasyMap() {
|
||||||
group = labels.select("#"+groupNew);
|
group = labels.select("#"+groupNew);
|
||||||
editFontSelect.value = fonts.indexOf(group.attr("data-font"));
|
editFontSelect.value = fonts.indexOf(group.attr("data-font"));
|
||||||
editSize.value = group.attr("data-size");
|
editSize.value = group.attr("data-size");
|
||||||
editColor.value = toHEX(group.attr("fill"));
|
editColor.value = toHEX(group.attr("fill"));
|
||||||
editOpacity.value = group.attr("opacity");
|
editOpacity.value = group.attr("opacity");
|
||||||
} else {
|
} else {
|
||||||
if (group.selectAll("text").size() === 0) {group.remove();}
|
if (group.selectAll("text").size() === 0) {group.remove();}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue