v1.6.11 - fix saving issues

This commit is contained in:
Azgaar 2021-03-06 01:54:26 +03:00
parent 8767893d72
commit 69c44317e3
4 changed files with 10 additions and 15 deletions

View file

@ -1741,22 +1741,16 @@ rect.fillRect {
fill: none; fill: none;
} }
#ruler circle { #ruler .rulerPoints {
stroke: #4e5a69; stroke: #4e5a69;
fill: yellow; fill: yellow;
cursor: grab; cursor: grab;
} }
#ruler circle.control { #ruler .rulerPoints .control {
fill: #999999; fill: #999999;
} }
#ruler rect {
stroke: #3d3d3d;
fill: yellow;
cursor: col-resize;
}
#ruler .white { #ruler .white {
stroke: white; stroke: white;
} }
@ -1769,13 +1763,12 @@ rect.fillRect {
#ruler text { #ruler text {
font-family: 'Georgia'; font-family: 'Georgia';
fill: #3d3d3d; fill: #3d3d3d;
stroke: none;
text-anchor: middle; text-anchor: middle;
text-shadow: 0 0 4px white; text-shadow: 0 0 4px white;
cursor: pointer; cursor: pointer;
} }
#ruler .planimeter { #ruler path.planimeter {
fill: lightblue; fill: lightblue;
fill-rule: evenodd; fill-rule: evenodd;
fill-opacity: 0.5; fill-opacity: 0.5;

View file

@ -212,7 +212,7 @@ function inlineStyle(clone) {
const emptyG = clone.append("g").node(); const emptyG = clone.append("g").node();
const defaultStyles = window.getComputedStyle(emptyG); const defaultStyles = window.getComputedStyle(emptyG);
clone.selectAll("g, #ruler > g > *, #scaleBar > text").each(function() { clone.selectAll("g, #ruler *, #scaleBar > text").each(function() {
const compStyle = window.getComputedStyle(this); const compStyle = window.getComputedStyle(this);
let style = ""; let style = "";

View file

@ -138,10 +138,10 @@ function showMapTooltip(point, e, i, g) {
if (group === "labels") {tip("Click to edit the Label"); return;} if (group === "labels") {tip("Click to edit the Label"); return;}
if (group === "markers") {tip("Click to edit the Marker"); return;} if (group === "markers") {tip("Click to edit the Marker"); return;}
if (group === "ruler") { if (group === "ruler") {
if (tag === "rect") {tip("Drag to split the ruler into 2 parts"); return;}
if (tag === "circle") {tip("Drag to adjust the measurer"); return;} if (tag === "circle") {tip("Drag to adjust the measurer"); return;}
if (tag === "path" || tag === "line") {tip("Drag to move the measurer"); return;} if (tag === "path") {tip("Drag to move the measurer"); return;}
if (tag === "text") {tip("Click to remove the measurer"); return;} if (tag === "polyline") {tip("Drag to add a control point"); return;}
if (tag === "text") {tip("Drag to move, click to remove the measurer"); return;}
} }
if (subgroup === "burgIcons") {tip("Click to edit the Burg"); return;} if (subgroup === "burgIcons") {tip("Click to edit the Burg"); return;}
if (subgroup === "burgLabels") {tip("Click to edit the Burg"); return;} if (subgroup === "burgLabels") {tip("Click to edit the Burg"); return;}

View file

@ -235,6 +235,7 @@ function editUnits() {
restoreDefaultEvents(); restoreDefaultEvents();
clearMainTip(); clearMainTip();
addOpisometer.classList.remove("pressed"); addOpisometer.classList.remove("pressed");
if (opisometer.points.length < 2) rulers.remove(opisometer.id);
if (!d3.event.sourceEvent.shiftKey) opisometer.optimize(); if (!d3.event.sourceEvent.shiftKey) opisometer.optimize();
}); });
})); }));
@ -264,7 +265,8 @@ function editUnits() {
restoreDefaultEvents(); restoreDefaultEvents();
clearMainTip(); clearMainTip();
addPlanimeter.classList.remove("pressed"); addPlanimeter.classList.remove("pressed");
if (!d3.event.sourceEvent.shiftKey) planimeter.optimize(); if (planimeter.points.length < 3) rulers.remove(planimeter.id);
else if (!d3.event.sourceEvent.shiftKey) planimeter.optimize();
}); });
})); }));