Skip to content
Snippets Groups Projects
Commit cbfe9979 authored by Anjali  Prasannan's avatar Anjali Prasannan Committed by Italo Mairo
Browse files

Issue #3498685 by anjaliprasannan, itamair, hetal.solanki, dunx: Create unique...

Issue #3498685 by anjaliprasannan, itamair, hetal.solanki, dunx: Create unique Geofield field type icon for better UX
parent 4c5637bc
Branches commev-alias
No related tags found
1 merge request!39Geofield icon added for add field form field type.
Pipeline #392040 passed with warnings
.field-option__icon.field-icon-geofield {
background-image: url("../geofield-icon.svg");
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?> <!-- Generator: Assembly 2.4 - http://assemblyapp.co --> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100.00" height="100.00" viewBox="0 0 100.0 100.0"> <g id="document" transform="scale(0.0244140625 0.0244140625) translate(2048.0 2048.0)"> <path d="M1710.11,0 C1710.11,-944.466 944.466,-1710.11 0,-1710.11 C-944.466,-1710.11 -1710.11,-944.466 -1710.11,0 C-1710.11,944.466 -944.466,1710.11 0,1710.11 C944.466,1710.11 1710.11,944.466 1710.11,0 Z " fill="#ffffff" fill-opacity="1.00" stroke-width="21.41" stroke="#000000" stroke-linecap="square" stroke-linejoin="miter" /> <g> <path d="M-2019.24,9.68866 L2019.24,9.68874 L2019.24,-9.89204 L-2019.24,-9.89212 L-2019.24,9.68866 Z " fill="#000000" fill-opacity="1.00" stroke-width="121.34" stroke="#000000" stroke-linecap="square" stroke-linejoin="miter" /> <path d="M0.000128367,-2019.35 L4.81557e-05,2019.14 L19.5808,2019.14 L19.5809,-2019.35 L0.000128367,-2019.35 Z " fill="#000000" fill-opacity="1.00" stroke-width="121.34" stroke="#000000" stroke-linecap="square" stroke-linejoin="miter" /> </g> <path d="M-2.20268e-13,-1769.55 C-987.202,-1769.55 -1787.52,-969.236 -1787.52,17.9657 C-1787.52,1005.17 -987.202,1805.48 -2.20268e-13,1805.48 C987.202,1805.48 1787.52,1005.17 1787.52,17.9657 C1787.52,-969.236 987.202,-1769.55 -2.20268e-13,-1769.55 Z M-585.319,-1540.99 C-673.339,-1382.09 -777.508,-1134.8 -845.803,-785.184 L-1460.09,-785.184 C-1268.89,-1130.24 -959.341,-1400.71 -585.319,-1540.99 L-585.319,-1540.99 Z M-1521.98,-661.66 L-866.637,-661.66 C-895.484,-480.69 -914.838,-276.05 -917.797,-43.796 L-1664.86,-43.796 C-1656.6,-263.352 -1607.16,-472.06 -1521.98,-661.66 L-1521.98,-661.66 Z M-1665.72,79.7274 L-917.181,79.7274 C-914.345,313.091 -894.004,516.251 -865.158,697.591 L-1517.29,697.591 C-1602.85,507.375 -1657.58,300.147 -1665.72,79.7274 L-1665.72,79.7274 Z M-1458.37,821.115 L-844.817,821.115 C-775.905,1174.18 -670.257,1421.1 -581.744,1578.28 C-957.245,1438.49 -1266.79,1167.03 -1458.37,821.115 L-1458.37,821.115 Z M-53.9953,1683.31 C-183.683,1679.25 -308.809,1658.78 -429.374,1626.61 C-522.448,1474.24 -643.382,1212.03 -719.814,821.115 L-53.9953,821.115 L-53.9953,1683.31 L-53.9953,1683.31 Z M-53.9953,697.592 L-741.634,697.592 C-770.481,516.498 -790.452,313.091 -793.534,79.7275 L-54.1185,79.7275 L-54.1185,697.592 L-53.9953,697.592 Z M-53.9953,-43.7961 L-794.15,-43.7961 C-791.068,-276.296 -771.59,-480.566 -742.744,-661.66 L-53.9953,-661.66 L-53.9953,-43.7961 L-53.9953,-43.7961 Z M-53.9953,-785.184 L-722.403,-785.184 C-646.588,-1173.26 -526.269,-1434.36 -433.442,-1589.57 C-311.767,-1622.36 -185.039,-1643.19 -53.9952,-1647.51 L-53.9952,-785.184 L-53.9953,-785.184 Z M1664.61,-43.7961 L933.207,-43.7961 C930.125,-276.05 910.77,-480.69 881.923,-661.66 L1519.51,-661.66 C1604.94,-471.69 1656.1,-263.476 1664.61,-43.7961 L1664.61,-43.7961 Z M1457.38,-785.184 L861.09,-785.184 C793.411,-1131.1 690.721,-1376.91 603.317,-1535.94 C969.08,-1393.68 1269.26,-1124.81 1457.38,-785.184 Z M69.4049,-1647.63 C200.941,-1641.84 328.533,-1621 450.577,-1586.85 C543.158,-1431.15 662.614,-1171.16 737.936,-785.184 L69.4049,-785.184 L69.4049,-1647.63 L69.4049,-1647.63 Z M69.4049,-661.66 L758.153,-661.66 C787,-480.566 806.478,-276.296 809.56,-43.796 L69.4049,-43.796 L69.4049,-661.66 L69.4049,-661.66 Z M69.4049,79.7274 L808.82,79.7274 C805.985,313.091 785.767,516.498 756.92,697.591 L69.4049,697.591 L69.4049,79.7274 Z M69.4049,1681.1 L69.4049,820.992 L735.347,820.992 C659.285,1209.56 539.213,1470.78 446.509,1623.77 C325.944,1657.3 199.339,1675.3 69.4049,1681.1 L69.4049,1681.1 Z M599.989,1572.98 C688.009,1415.68 792.301,1170.36 860.35,820.992 L1456.39,820.992 C1268.77,1161.98 967.354,1431.21 599.989,1572.98 Z M1515.69,697.592 L880.567,697.592 C909.414,516.251 929.632,313.091 932.713,79.7275 L1663.38,79.7275 C1655.12,300.023 1600.75,507.252 1515.69,697.592 L1515.69,697.592 Z " fill="#000000" fill-opacity="1.00" /> </g> </svg>
\ No newline at end of file
......@@ -19,3 +19,9 @@ proximity_origin_summary_update:
dependencies:
- core/jquery
- core/once
geofield-icon:
css:
theme:
css/geofield-icon.css: {}
dependencies:
- field_ui/drupal.field_ui.manage_fields
......@@ -6,6 +6,7 @@
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Field\FieldTypeCategoryManagerInterface;
// cspell:ignore itamair
// Ludwig's integration for 'classmap' type phayes/geophp library.
......@@ -152,3 +153,10 @@ function geofield_haversine(array $options = []) {
return $formula;
}
/*
* Implements hook_field_type_category_info_alter().
*/
function geofield_field_type_category_info_alter(&$definitions) {
$definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'geofield/geofield-icon';
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment