From ea5c9df095e87ea4fc83426981f03c839d94b5e1 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Thu, 12 Dec 2019 00:30:22 -0500 Subject: [PATCH] fixed svg gradient scaling and css flickering issue --- netbox/dcim/constants.py | 6 ++++++ netbox/dcim/models.py | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/netbox/dcim/constants.py b/netbox/dcim/constants.py index a33744ece..7596e393b 100644 --- a/netbox/dcim/constants.py +++ b/netbox/dcim/constants.py @@ -88,6 +88,12 @@ text { .slot:hover+.add-device { fill: blue; } +.add-device:hover { + fill: blue; +} +.add-device:hover+.slot { + fill: #fff; +} .reserved { fill: url(#reserved); } diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 5406b6916..f2611febd 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -470,11 +470,12 @@ class RackElevationHelperMixin: @staticmethod def _add_gradient(drawing, id_, color): gradient = drawing.linearGradient( - start=('0', '20%'), - end=('0', '40%'), + start=('0', '0%'), + end=('0', '5%'), spreadMethod='repeat', id_=id_, - gradientTransform='rotate(80)' + gradientTransform='rotate(45, 0, 0)', + gradientUnits='userSpaceOnUse' ) gradient.add_stop_color(offset='0%', color='#f7f7f7') gradient.add_stop_color(offset='50%', color='#f7f7f7')