From fc785b8b8d99f2fdafe15182a3a76b40002ca16f Mon Sep 17 00:00:00 2001
From: Delucse <46593742+Delucse@users.noreply.github.com>
Date: Fri, 2 Oct 2020 16:01:11 +0200
Subject: [PATCH] ensure that fill-opacity is 1 (blockly-svg)
---
src/components/Blockly/BlocklySvg.js | 6 +++++-
src/components/WorkspaceFunc.js | 5 +++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/components/Blockly/BlocklySvg.js b/src/components/Blockly/BlocklySvg.js
index 174b7c3..f20ce0c 100644
--- a/src/components/Blockly/BlocklySvg.js
+++ b/src/components/Blockly/BlocklySvg.js
@@ -38,9 +38,13 @@ class BlocklySvg extends Component {
cssContent += document.getElementsByTagName('style')[i].firstChild.data.replace(/\..* \./g, '.');
}
}
+ // ensure that fill-opacity is 1, because there cannot be a replacing
+ // https://github.com/google/blockly/pull/3431/files#diff-00254795773903d3c0430915a68c9521R328
+ cssContent += `.blocklyPath {
+ fill-opacity: 1;
+ } `;
var css = '';
-
var bbox = document.getElementsByClassName("blocklyBlockCanvas")[0].getBBox();
var content = new XMLSerializer().serializeToString(canvas);
diff --git a/src/components/WorkspaceFunc.js b/src/components/WorkspaceFunc.js
index 96f3cb4..0b74f0c 100644
--- a/src/components/WorkspaceFunc.js
+++ b/src/components/WorkspaceFunc.js
@@ -102,6 +102,11 @@ class WorkspaceFunc extends Component {
cssContent += document.getElementsByTagName('style')[i].firstChild.data.replace(/\..* \./g, '.');
}
}
+ // ensure that fill-opacity is 1, because there cannot be a replacing
+ // https://github.com/google/blockly/pull/3431/files#diff-00254795773903d3c0430915a68c9521R328
+ cssContent += `.blocklyPath {
+ fill-opacity: 1;
+ } `;
var css = '';