_SnappingControls.scss 3.3 KB

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