diff --git a/src/interface.js b/src/interface.js index 4b3d1772e93e1e0b4a3d1b2b094444c2ac1e010a..daf405e033d480e768740c0aeef2f9f0f53bc70a 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);