From 17e87ab88b4d63decf41a50781df6612c2f6b58d Mon Sep 17 00:00:00 2001
From: kyeshmz <kyeshimizu@gmail.com>
Date: Wed, 16 Oct 2024 16:25:42 -0400
Subject: [PATCH] fix drillholes to flip!

---
 src/interface.js | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/interface.js b/src/interface.js
index 4b3d177..daf405e 100644
--- a/src/interface.js
+++ b/src/interface.js
@@ -163,7 +163,7 @@ function updateSVG(fromSettingsChange=false) {
     globalXMLRoot.setAttribute("height", `${(vb[3]/1000).toFixed(3)}mm`);
     if (!globalSettings.transparent) {
         let backgroundElem = globalXMLRoot.ownerDocument.createElement("rect");
-        if (globalSettings.blackAndWhite) {
+        if (globalSettings.blackAndWhite && layersSorted.length >= 2) {
             backgroundElem.setAttribute("fill", "rgb(0,0,0)");
         } else {
             backgroundElem.setAttribute("fill", "rgb(255,255,255)");
@@ -196,8 +196,14 @@ function updateSVG(fromSettingsChange=false) {
                 // let ty = Number(m[1]) + (layerVB[3]-(yMax-yMin))/2;
                 if (globalSettings.blackAndWhite) {
                     g.setAttribute("opacity", 1.0);
-                    g.setAttribute("fill", "rgb(255,255,255)");
-                    g.setAttribute("stroke", "rgb(255,255,255)");
+                    if(layerName === "drill"){
+                        g.setAttribute("fill", "rgb(0,0,0)"); 
+                        g.setAttribute("stroke", "rgb(0,0,0)");
+
+                    } else {
+                        g.setAttribute("fill", "rgb(255,255,255)");
+                        g.setAttribute("stroke", "rgb(255,255,255)");
+                    }
                 } else {
                     g.setAttribute("opacity", layerOpacity);
                     g.setAttribute("fill", layerRGB);
-- 
GitLab