|
|
@@ -31,8 +31,17 @@
|
|
31
|
31
|
var styleNode = document.createElement("style");
|
|
32
|
32
|
|
|
33
|
33
|
// Copy the stylesheets from the whiteboard to the exported SVG
|
|
34
|
|
- styleNode.innerHTML = Array.from(document.styleSheets).map(
|
|
35
|
|
- function (stylesheet) {
|
|
|
34
|
+ styleNode.innerHTML = Array.from(document.styleSheets)
|
|
|
35
|
+ .filter(function (stylesheet) {
|
|
|
36
|
+ if(stylesheet.href && (stylesheet.href.match(/boards\/tools\/.*\.css/)
|
|
|
37
|
+ || stylesheet.href.match(/board\.css/))) {
|
|
|
38
|
+ // This is a Stylesheet from a Tool or the Board itself, so we should include it
|
|
|
39
|
+ return true;
|
|
|
40
|
+ }
|
|
|
41
|
+ // Not a stylesheet of the tool, so we can ignore it for export
|
|
|
42
|
+ return false;
|
|
|
43
|
+ })
|
|
|
44
|
+ .map(function (stylesheet) {
|
|
36
|
45
|
return Array.from(stylesheet.cssRules).map(
|
|
37
|
46
|
function (rule) {
|
|
38
|
47
|
return rule.cssText
|