From c21fcf890f834795ec567ebd4b67a79b71a5e4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 13 Dec 2015 17:20:11 +0100 Subject: [PATCH] workflows: reduce enclosing polygon to a single dot in svg view (#9317) --- wcs/admin/workflows.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wcs/admin/workflows.py b/wcs/admin/workflows.py index a7437af..fa46920 100644 --- a/wcs/admin/workflows.py +++ b/wcs/admin/workflows.py @@ -61,10 +61,10 @@ def remove_attribute(node, att): def remove_style(node, top, colours, white_text=False): remove_tag(node, TITLE) - if node.get('fill') == 'white' and node.get('stroke') == 'white': - # this is the general white background, wipe it to be transparent - node.attrib['fill'] = 'transparent' - node.attrib['stroke'] = 'transparent' + if (node.get('fill'), node.get('stroke')) in ( + ('white', 'white'), ('white', 'none')): + # this is the general white background, reduce it to a dot + node.attrib['points'] = '0,0 0,0 0,0 0,0' if node.tag == svg('text') and white_text: node.attrib['fill'] = 'white' for child in node: -- 2.6.4