فهرست منبع

fixed svg gradient scaling and css flickering issue

John Anderson 6 سال پیش
والد
کامیت
ea5c9df095
2فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 6 0
      netbox/dcim/constants.py
  2. 4 3
      netbox/dcim/models.py

+ 6 - 0
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);
 }

+ 4 - 3
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')