_SnappingControls.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. @mixin snappingControls() {
  2. $border: 1px solid $border-color;
  3. .esri-snapping-controls__toggle-block {
  4. margin-top: 0;
  5. }
  6. .esri-snapping-controls__layer-list-block {
  7. border-bottom: none;
  8. }
  9. .esri-snapping-controls__layer-list {
  10. overflow: auto;
  11. max-height: 220px;
  12. }
  13. .esri-snapping-controls {
  14. display: flex;
  15. flex-flow: column wrap;
  16. }
  17. .esri-snapping-controls__container {
  18. display: flex;
  19. flex: 1 1 auto;
  20. flex-direction: column;
  21. }
  22. .esri-snapping-controls__panel {
  23. width: 320px;
  24. }
  25. .esri-snapping-controls__item {
  26. @include cardBoxShadow();
  27. padding: 3px;
  28. background-color: $background-color;
  29. cursor: pointer;
  30. margin: 3px 0;
  31. border: $border;
  32. border-color: transparent;
  33. border-radius: 2px;
  34. display: flex;
  35. justify-content: space-between;
  36. transition: border-color 125ms ease-in-out;
  37. }
  38. .esri-snapping-controls__item-action-icon {
  39. flex: 0 0 $icon-size;
  40. font-size: $icon-size;
  41. display: inline-block;
  42. width: $icon-size;
  43. height: $icon-size;
  44. margin-top: 0.1em;
  45. }
  46. .esri-snapping-controls__action-toggle {
  47. align-items: flex-start;
  48. border: 1px solid transparent;
  49. cursor: pointer;
  50. display: flex;
  51. flex-flow: row-reverse;
  52. font-size: $font-size--small;
  53. justify-content: space-between;
  54. margin: 0;
  55. opacity: 1;
  56. padding: $cap-spacing--half $side-spacing;
  57. transition: opacity 250ms ease-in-out 250ms, background-color 250ms ease-in-out;
  58. width: 100%;
  59. .esri-snapping-controls__item-action-title {
  60. margin-left: 0;
  61. }
  62. .esri-snapping-controls__item-action-icon {
  63. background-color: $background-color--hover;
  64. border-radius: $toggle-height;
  65. box-shadow: 0 0 0 1px $interactive-font-color;
  66. flex: 0 0 $toggle-width;
  67. height: $toggle-height;
  68. overflow: hidden;
  69. padding: 0;
  70. position: relative;
  71. transition: background-color 125ms ease-in-out;
  72. width: $icon-size;
  73. &:before {
  74. // Toggle handle. Overrides any icon class
  75. background-color: $interactive-font-color;
  76. box-shadow: 0 0 0 1px $interactive-font-color--inverse;
  77. border-radius: 100%;
  78. content: "";
  79. display: block;
  80. height: $toggle-handle-size;
  81. left: 0;
  82. margin: 2px;
  83. position: absolute;
  84. top: 0;
  85. transition: background-color 125ms ease-in-out, left 125ms ease-in-out;
  86. width: $toggle-handle-size;
  87. }
  88. }
  89. &.esri-disabled-element {
  90. pointer-events: none;
  91. opacity: $opacity--disabled;
  92. }
  93. }
  94. .esri-snapping-controls__action-toggle--on .esri-snapping-controls__item-action-icon {
  95. // Toggle on
  96. background-color: $button-color;
  97. box-shadow: 0 0 0 1px $button-color;
  98. &:before {
  99. background-color: $interactive-font-color--inverse;
  100. left: $toggle-handle-size;
  101. }
  102. }
  103. .esri-snapping-controls__nested-container {
  104. padding: 0 0 0 1em;
  105. }
  106. [dir="rtl"] {
  107. .esri-snapping-controls__nested-container {
  108. padding: 0 1em 0 0;
  109. }
  110. }
  111. }
  112. @if $include_SnappingControls == true {
  113. @include snappingControls();
  114. }