Skip to content

Commit 8763126

Browse files
committed
Fix - prevent setting 'none' as filter to main svg
filter used for inverse colors, but if 'none' - nothing need to be set back
1 parent 939e4d9 commit 8763126

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules/draw.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ async function makeImage(args) {
696696
if (!mainsvg.attr('width') && !mainsvg.attr('height'))
697697
mainsvg.attr('width', args.width).attr('height', args.height);
698698

699-
if (style_filter)
699+
if (style_filter && (style_filter !== 'none'))
700700
mainsvg.style('filter', style_filter);
701701

702702
function clear_element() {

modules/gui/display.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ class BatchDisplay extends MDIDisplay {
12811281
if (!mainsvg.attr('width') && !mainsvg.attr('height'))
12821282
mainsvg.attr('width', this.width).attr('height', this.height);
12831283

1284-
if (style_filter)
1284+
if (style_filter && (style_filter !== 'none'))
12851285
mainsvg.style('filter', style_filter);
12861286

12871287
function clear_element() {

0 commit comments

Comments
 (0)