@eox/layercontrol 0.29.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +2996 -2869
- package/dist/eox-layercontrol.umd.cjs +626 -565
- package/dist/material-symbols-outlined.woff2 +0 -0
- package/dist/material-symbols-rounded.woff2 +0 -0
- package/dist/material-symbols-sharp.woff2 +0 -0
- package/dist/material-symbols-subset.woff2 +0 -0
- package/package.json +8 -5
- package/src/components/add-layers.js +79 -179
- package/src/components/layer-config.js +22 -3
- package/src/components/layer-group.js +41 -18
- package/src/components/layer-legend.js +7 -4
- package/src/components/layer-list.js +27 -19
- package/src/components/layer-tools.js +60 -120
- package/src/components/layer.js +215 -59
- package/src/components/optional-list.js +32 -25
- package/src/components/tools-items.js +34 -31
- package/src/enums/index.js +1 -0
- package/src/enums/stories/index.js +4 -2
- package/src/helpers/clean-json-input.js +0 -1
- package/src/helpers/create-sortable.js +4 -1
- package/src/helpers/get-layer-type.js +2 -1
- package/src/helpers/get-start-vals.js +0 -3
- package/src/helpers/index.js +1 -0
- package/src/helpers/layer-tools.js +75 -13
- package/src/main.js +37 -7
- package/src/methods/layer-config/apply-updated-styles.js +1 -0
- package/src/methods/layercontrol/first-update.js +10 -4
- package/types/layercontrol/src/components/add-layers.d.ts +2 -2
- package/types/layercontrol/src/components/add-layers.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-config.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-datetime.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-group.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-legend.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-list.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-tools.d.ts +8 -4
- package/types/layercontrol/src/components/layer-tools.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer.d.ts +9 -0
- package/types/layercontrol/src/components/layer.d.ts.map +1 -1
- package/types/layercontrol/src/components/optional-list.d.ts.map +1 -1
- package/types/layercontrol/src/components/tools-items.d.ts.map +1 -1
- package/types/layercontrol/src/enums/index.d.ts +1 -1
- package/types/layercontrol/src/enums/stories/index.d.ts +1 -0
- package/types/layercontrol/src/enums/stories/index.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/clean-json-input.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/create-sortable.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/fetch-capabilities.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/filter-layers.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-layer-type.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-legend-config.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-start-vals.d.ts +1 -1
- package/types/layercontrol/src/helpers/get-start-vals.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/index.d.ts +1 -1
- package/types/layercontrol/src/helpers/layer-tools.d.ts +13 -3
- package/types/layercontrol/src/helpers/layer-tools.d.ts.map +1 -1
- package/types/layercontrol/src/main.d.ts +2 -2
- package/types/layercontrol/src/main.d.ts.map +1 -1
- package/types/layercontrol/src/methods/add-layer/wms-search-url.d.ts.map +1 -1
- package/types/layercontrol/src/methods/layer-config/apply-updated-styles.d.ts +1 -1
- package/types/layercontrol/src/methods/layer-config/apply-updated-styles.d.ts.map +1 -1
- package/types/layercontrol/src/methods/layercontrol/first-update.d.ts +2 -2
- package/types/layercontrol/src/methods/layercontrol/first-update.d.ts.map +1 -1
- package/types/map/src/components/compare.d.ts +2 -2
- package/types/map/src/components/compare.d.ts.map +1 -1
- package/types/map/src/components/tooltip.d.ts +7 -2
- package/types/map/src/components/tooltip.d.ts.map +1 -1
- package/types/map/src/controls/controls.d.ts +2 -8
- package/types/map/src/controls/controls.d.ts.map +1 -1
- package/types/map/src/controls/geo-location.d.ts +5 -5
- package/types/map/src/controls/geo-location.d.ts.map +1 -1
- package/types/map/src/controls/loading-indicator.d.ts +3 -3
- package/types/map/src/controls/loading-indicator.d.ts.map +1 -1
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts +27 -0
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +1 -0
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts +35 -0
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +1 -0
- package/types/map/src/helpers/add-new-feature.d.ts +2 -1
- package/types/map/src/helpers/add-new-feature.d.ts.map +1 -1
- package/types/map/src/helpers/center.d.ts.map +1 -1
- package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +1 -1
- package/types/map/src/helpers/draw.d.ts +6 -6
- package/types/map/src/helpers/draw.d.ts.map +1 -1
- package/types/map/src/helpers/generate.d.ts +13 -11
- package/types/map/src/helpers/generate.d.ts.map +1 -1
- package/types/map/src/helpers/interactions.d.ts.map +1 -1
- package/types/map/src/helpers/layer.d.ts +5 -5
- package/types/map/src/helpers/layer.d.ts.map +1 -1
- package/types/map/src/helpers/parse-feature.d.ts.map +1 -1
- package/types/map/src/helpers/parse-text.d.ts +3 -1
- package/types/map/src/helpers/parse-text.d.ts.map +1 -1
- package/types/map/src/helpers/register-projection-from-code.d.ts.map +1 -1
- package/types/map/src/helpers/register-projection.d.ts.map +1 -1
- package/types/map/src/helpers/select.d.ts +14 -14
- package/types/map/src/helpers/select.d.ts.map +1 -1
- package/types/map/src/helpers/tile-grid.d.ts +2 -2
- package/types/map/src/helpers/tile-grid.d.ts.map +1 -1
- package/types/map/src/helpers/transform.d.ts +2 -2
- package/types/map/src/helpers/transform.d.ts.map +1 -1
- package/types/map/src/layers.d.ts +116 -0
- package/types/map/src/layers.d.ts.map +1 -0
- package/types/map/src/main.d.ts +31 -31
- package/types/map/src/main.d.ts.map +1 -1
- package/types/map/src/methods/map/add-update-layer.d.ts +2 -2
- package/types/map/src/methods/map/add-update-layer.d.ts.map +1 -1
- package/types/map/src/methods/map/getters.d.ts.map +1 -1
- package/types/map/src/methods/map/setters.d.ts +12 -12
- package/types/map/src/methods/map/setters.d.ts.map +1 -1
- package/types/map/{types.d.ts → src/types.d.ts} +35 -34
- package/types/map/src/types.d.ts.map +1 -0
- package/types/map/types.d.ts.map +0 -1
|
@@ -3,20 +3,18 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
|
3
3
|
import { map } from "lit/directives/map.js";
|
|
4
4
|
import { when } from "lit/directives/when.js";
|
|
5
5
|
import { live } from "lit/directives/live.js";
|
|
6
|
+
import eoxStyle from "@eox/ui/style.css?inline";
|
|
6
7
|
import "./layer-config";
|
|
7
8
|
import "./layer-datetime";
|
|
8
9
|
import "./layer-legend";
|
|
9
10
|
import "./tools-items";
|
|
10
|
-
import button from "@eox/elements-utils/styles/dist/button.style";
|
|
11
|
-
import radio from "@eox/elements-utils/styles/dist/radio.style";
|
|
12
|
-
import checkbox from "@eox/elements-utils/styles/dist/checkbox.style";
|
|
13
|
-
import slider from "@eox/elements-utils/styles/dist/slider.style";
|
|
14
11
|
import {
|
|
15
12
|
Button,
|
|
16
13
|
_parseActions,
|
|
17
14
|
_parseTools,
|
|
18
15
|
removeButton,
|
|
19
16
|
sortButton,
|
|
17
|
+
getToolsIcon,
|
|
20
18
|
} from "../helpers";
|
|
21
19
|
|
|
22
20
|
/**
|
|
@@ -34,6 +32,7 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
34
32
|
unstyled: { type: Boolean },
|
|
35
33
|
noShadow: { type: Boolean },
|
|
36
34
|
toolsAsList: { type: Boolean },
|
|
35
|
+
embedded: { state: true },
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
constructor() {
|
|
@@ -74,6 +73,15 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
74
73
|
* @type {Boolean}
|
|
75
74
|
*/
|
|
76
75
|
this.toolsAsList = false;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Determine if tools are embedded in layercontrol or stand-alone
|
|
79
|
+
*
|
|
80
|
+
* @type {Boolean}
|
|
81
|
+
*/
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
this.embedded = this.parentElement?.tagName === "EOX-LAYERCONTROL-LAYER";
|
|
84
|
+
});
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
/**
|
|
@@ -84,10 +92,10 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
// Initializes '_removeButton' invoking 'removeButton' function with 'this' context.
|
|
87
|
-
_removeButton = () => removeButton(this);
|
|
95
|
+
_removeButton = (icon) => removeButton(this, icon);
|
|
88
96
|
|
|
89
97
|
// Initializes '_sortButton' invoking 'sortButton' function with 'unstyled' property as a parameter.
|
|
90
|
-
_sortButton = () => sortButton(this.unstyled);
|
|
98
|
+
_sortButton = (icon) => sortButton(this, icon, this.unstyled);
|
|
91
99
|
|
|
92
100
|
/**
|
|
93
101
|
* Initializes '_button' as a function accepting 'tool' parameter to generate a Button.
|
|
@@ -96,24 +104,30 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
96
104
|
* @param {string} tool - Tool parameter for Button generation.
|
|
97
105
|
* @returns {import("lit").HTMLTemplateResult} - The generated Button element.
|
|
98
106
|
*/
|
|
99
|
-
_button = (tool) => Button(tool, this.unstyled);
|
|
107
|
+
_button = (tool, icon) => Button(tool, icon, this.unstyled);
|
|
100
108
|
|
|
101
|
-
_getDefaultTools = () => {
|
|
109
|
+
_getDefaultTools = (icons) => {
|
|
102
110
|
return html`
|
|
103
111
|
<div slot="info-content">
|
|
104
112
|
${unsafeHTML(this.layer.get("description"))}
|
|
105
113
|
</div>
|
|
106
114
|
<div slot="opacity-content">
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
<div class="row">
|
|
116
|
+
<!-- Input for opacity -->
|
|
117
|
+
<input
|
|
118
|
+
type="range"
|
|
119
|
+
min="0"
|
|
120
|
+
max="1"
|
|
121
|
+
step="0.01"
|
|
122
|
+
value=${live(this.layer?.getOpacity())}
|
|
123
|
+
class="tiny max"
|
|
124
|
+
@input=${(/** @type {{ target: { value: string; }; }} */ evt) => {
|
|
125
|
+
this.layer.setOpacity(parseFloat(evt.target.value));
|
|
126
|
+
this.requestUpdate();
|
|
127
|
+
}}
|
|
128
|
+
/>
|
|
129
|
+
<span class="small-text" style="width: 30px; text-align: right">${Math.round(this.layer?.getOpacity() * 100)}%</span>
|
|
130
|
+
</div class="row">
|
|
117
131
|
</div>
|
|
118
132
|
<div slot="config-content">
|
|
119
133
|
<!-- Layer configuration -->
|
|
@@ -163,8 +177,8 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
163
177
|
`,
|
|
164
178
|
)}
|
|
165
179
|
</div>
|
|
166
|
-
<div slot="remove-icon">${this._removeButton()}</div>
|
|
167
|
-
<div slot="sort-icon">${this._sortButton()}</div>
|
|
180
|
+
<div slot="remove-icon">${this._removeButton(icons.remove)}</div>
|
|
181
|
+
<div slot="sort-icon">${this._sortButton(icons.sort)}</div>
|
|
168
182
|
`;
|
|
169
183
|
};
|
|
170
184
|
|
|
@@ -174,14 +188,12 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
174
188
|
const tools = _parseTools(this.tools, this.layer);
|
|
175
189
|
|
|
176
190
|
// Determine the single action element if only one action is present
|
|
177
|
-
//
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this[`_${actions?.[0]}Button`]()
|
|
181
|
-
: nothing;
|
|
191
|
+
// const singleActionEle = this[`_${actions?.[0]}Button`]
|
|
192
|
+
// ? this[`_${actions?.[0]}Button`](getToolsIcon()[actions?.[0]])
|
|
193
|
+
// : nothing;
|
|
182
194
|
|
|
183
195
|
// Determine icon class based on the number of tools
|
|
184
|
-
const iconClass = this.tools?.length === 1 ? `${this.tools[0]}-icon` : "";
|
|
196
|
+
// const iconClass = this.tools?.length === 1 ? `${this.tools[0]}-icon` : "";
|
|
185
197
|
|
|
186
198
|
// Determine the number of actions and tools for conditional rendering
|
|
187
199
|
const actionsLen = actions?.length;
|
|
@@ -196,20 +208,15 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
196
208
|
actionsLen + toolsLen > 0,
|
|
197
209
|
() => html`
|
|
198
210
|
${when(
|
|
199
|
-
actionsLen === 1 && toolsLen === 0,
|
|
200
|
-
() => html`
|
|
201
|
-
<div class="single-action-container">
|
|
202
|
-
<div class="single-action">${singleActionEle}</div>
|
|
203
|
-
</div>
|
|
204
|
-
`,
|
|
211
|
+
!(actionsLen === 1 && toolsLen === 0),
|
|
205
212
|
() => html`
|
|
206
213
|
<details
|
|
207
214
|
class="tools"
|
|
208
|
-
open=${this.
|
|
215
|
+
open=${this.embedded === false
|
|
216
|
+
? true
|
|
217
|
+
: this.layer.get("layerControlToolsExpand") || nothing}
|
|
209
218
|
>
|
|
210
|
-
<summary>
|
|
211
|
-
<button class="icon ${iconClass}">Tools</button>
|
|
212
|
-
</summary>
|
|
219
|
+
<summary></summary>
|
|
213
220
|
<eox-layercontrol-tools-items
|
|
214
221
|
class="${this.toolsAsList ? "tools-list" : "tools-tab"}"
|
|
215
222
|
.noShadow=${false}
|
|
@@ -219,9 +226,11 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
219
226
|
.toolsAsList=${this.toolsAsList}
|
|
220
227
|
>
|
|
221
228
|
<!-- Rendering tabs and content -->
|
|
222
|
-
${map(tools, (tool) =>
|
|
229
|
+
${map(tools, (tool) =>
|
|
230
|
+
this._button(tool, getToolsIcon()[tool]),
|
|
231
|
+
)}
|
|
223
232
|
<!-- Including default tools -->
|
|
224
|
-
${this._getDefaultTools()}
|
|
233
|
+
${this._getDefaultTools(getToolsIcon())}
|
|
225
234
|
</eox-layercontrol-tools-items>
|
|
226
235
|
</details>
|
|
227
236
|
`,
|
|
@@ -234,116 +243,42 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
234
243
|
#styleBasic = ``;
|
|
235
244
|
|
|
236
245
|
#styleEOX = `
|
|
237
|
-
${
|
|
238
|
-
${radio}
|
|
239
|
-
${checkbox}
|
|
240
|
-
${slider}
|
|
246
|
+
${!this.embedded ? eoxStyle : ""}
|
|
241
247
|
.drag-handle {
|
|
242
|
-
|
|
248
|
+
-webkit-user-drag: element;
|
|
249
|
+
user-select: none;
|
|
243
250
|
}
|
|
244
251
|
.single-action-container,
|
|
245
252
|
details.tools {
|
|
246
253
|
position: relative;
|
|
247
254
|
}
|
|
248
|
-
eox-layercontrol-layer details summary::before {
|
|
249
|
-
content: "";
|
|
250
|
-
}
|
|
251
|
-
details.tools[open] {
|
|
252
|
-
/*border-top: 1px solid #0041703a;*/
|
|
253
|
-
}
|
|
254
255
|
.single-action {
|
|
255
256
|
position: relative;
|
|
256
257
|
}
|
|
257
|
-
details.tools summary
|
|
258
|
+
details.tools summary button {
|
|
258
259
|
pointer-events: none;
|
|
259
260
|
}
|
|
260
261
|
.single-action,
|
|
261
262
|
details.tools summary {
|
|
262
263
|
position: absolute;
|
|
263
|
-
right:
|
|
264
|
-
top: -
|
|
264
|
+
right: 1.5rem;
|
|
265
|
+
top: -32px;
|
|
265
266
|
height: 24px;
|
|
266
267
|
cursor: pointer;
|
|
267
268
|
display: var(--layer-tools-button-visibility);
|
|
268
269
|
}
|
|
269
|
-
.single-action .icon::before,
|
|
270
|
-
details.tools summary .icon::before {
|
|
271
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Edots-vertical%3C/title%3E%3Cpath d='M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z' /%3E%3C/svg%3E");
|
|
272
|
-
}
|
|
273
270
|
.single-action,
|
|
274
|
-
details.tools summary
|
|
275
|
-
eox-layercontrol-tools-items button.icon {
|
|
271
|
+
details.tools summary {
|
|
276
272
|
transition: opacity .2s;
|
|
277
273
|
}
|
|
278
274
|
.single-action,
|
|
279
275
|
details.tools summary {
|
|
280
276
|
opacity: .5;
|
|
281
277
|
}
|
|
282
|
-
eox-layercontrol-tools-items button.icon {
|
|
283
|
-
opacity: .7;
|
|
284
|
-
}
|
|
285
|
-
eox-layercontrol-tools-items.tools-list button.icon {
|
|
286
|
-
cursor: auto;
|
|
287
|
-
}
|
|
288
278
|
.single-action:hover,
|
|
289
|
-
details.tools summary:hover
|
|
290
|
-
eox-layercontrol-tools-items button.icon:hover {
|
|
279
|
+
details.tools summary:hover {
|
|
291
280
|
opacity: 1;
|
|
292
281
|
}
|
|
293
|
-
eox-layercontrol-tools-items.tools-list button.icon:hover {
|
|
294
|
-
opacity: .7;
|
|
295
|
-
}
|
|
296
|
-
.tools-placeholder,
|
|
297
|
-
.single-action .icon,
|
|
298
|
-
.single-action .icon::before,
|
|
299
|
-
details.tools summary .icon,
|
|
300
|
-
details.tools summary .icon::before {
|
|
301
|
-
height: 16px;
|
|
302
|
-
width: 16px;
|
|
303
|
-
margin-right: var(--padding);
|
|
304
|
-
}
|
|
305
|
-
eox-layercontrol-tools-items button.icon,
|
|
306
|
-
eox-layercontrol-tools-items .button.icon {
|
|
307
|
-
display: flex;
|
|
308
|
-
justify-content: center;
|
|
309
|
-
}
|
|
310
|
-
eox-layercontrol-tools-items.tools-list button.icon,
|
|
311
|
-
eox-layercontrol-tools-items.tools-list .button.icon {
|
|
312
|
-
margin-left: -6px;
|
|
313
|
-
}
|
|
314
|
-
eox-layercontrol-tools-items button.icon::before,
|
|
315
|
-
eox-layercontrol-tools-items .button.icon::before {
|
|
316
|
-
width: 16px;
|
|
317
|
-
height: 16px;
|
|
318
|
-
}
|
|
319
|
-
details.tools summary .info-icon,
|
|
320
|
-
button.icon[slot=info-icon]::before {
|
|
321
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Einformation-outline%3C/title%3E%3Cpath d='M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z' /%3E%3C/svg%3E");
|
|
322
|
-
}
|
|
323
|
-
details.tools summary .opacity-icon,
|
|
324
|
-
button.icon[slot=opacity-icon]::before {
|
|
325
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eopacity%3C/title%3E%3Cpath d='M17.66,8L12,2.35L6.34,8C4.78,9.56 4,11.64 4,13.64C4,15.64 4.78,17.75 6.34,19.31C7.9,20.87 9.95,21.66 12,21.66C14.05,21.66 16.1,20.87 17.66,19.31C19.22,17.75 20,15.64 20,13.64C20,11.64 19.22,9.56 17.66,8M6,14C6,12 6.62,10.73 7.76,9.6L12,5.27L16.24,9.65C17.38,10.77 18,12 18,14H6Z' /%3E%3C/svg%3E");
|
|
326
|
-
}
|
|
327
|
-
details.tools summary .config-icon,
|
|
328
|
-
button.icon[slot=config-icon]::before {
|
|
329
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Etune%3C/title%3E%3Cpath d='M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z' /%3E%3C/svg%3E");
|
|
330
|
-
}
|
|
331
|
-
details.tools summary .datetime-icon,
|
|
332
|
-
button.icon[slot=datetime-icon]::before {
|
|
333
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eclock-outline%3C/title%3E%3Cpath d='M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z' /%3E%3C/svg%3E");
|
|
334
|
-
}
|
|
335
|
-
details.tools summary .legend-icon,
|
|
336
|
-
button.icon[slot=legend-icon]::before {
|
|
337
|
-
content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ctitle%3Emap-legend%3C%2Ftitle%3E%3Cpath%20d%3D%22M9%2C3L3.36%2C4.9C3.15%2C4.97%203%2C5.15%203%2C5.38V20.5A0.5%2C0.5%200%200%2C0%203.5%2C21L3.66%2C20.97L9%2C18.9L15%2C21L20.64%2C19.1C20.85%2C19.03%2021%2C18.85%2021%2C18.62V3.5A0.5%2C0.5%200%200%2C0%2020.5%2C3L20.34%2C3.03L15%2C5.1L9%2C3M8%2C5.45V17.15L5%2C18.31V6.46L8%2C5.45M10%2C5.47L14%2C6.87V18.53L10%2C17.13V5.47M19%2C5.7V17.54L16%2C18.55V6.86L19%2C5.7M7.46%2C6.3L5.57%2C6.97V9.12L7.46%2C8.45V6.3M7.46%2C9.05L5.57%2C9.72V11.87L7.46%2C11.2V9.05M7.46%2C11.8L5.57%2C12.47V14.62L7.46%2C13.95V11.8M7.46%2C14.55L5.57%2C15.22V17.37L7.46%2C16.7V14.55Z%22%20%2F%3E%3C%2Fsvg%3E");
|
|
338
|
-
}
|
|
339
|
-
.single-action .remove-icon::before,
|
|
340
|
-
[slot=remove-icon] button.icon::before {
|
|
341
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ff0000' viewBox='0 0 24 24'%3E%3Ctitle%3Edelete-outline%3C/title%3E%3Cpath d='M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z' /%3E%3C/svg%3E");
|
|
342
|
-
}
|
|
343
|
-
.single-action .sort-icon::before,
|
|
344
|
-
[slot=sort-icon] .button.icon::before {
|
|
345
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag-horizontal-variant%3C/title%3E%3Cpath d='M21 11H3V9H21V11M21 13H3V15H21V13Z' /%3E%3C/svg%3E");
|
|
346
|
-
}
|
|
347
282
|
[slot=info-content],
|
|
348
283
|
[slot=opacity-content],
|
|
349
284
|
[slot=config-content],
|
|
@@ -354,6 +289,11 @@ export class EOxLayerControlLayerTools extends LitElement {
|
|
|
354
289
|
[slot=info-content] * {
|
|
355
290
|
max-width: 100%;
|
|
356
291
|
}
|
|
292
|
+
/*eox-layercontrol-layerconfig {
|
|
293
|
+
border: 1px solid var(--outline-variant);
|
|
294
|
+
padding: .5rem !important;
|
|
295
|
+
display: block;
|
|
296
|
+
}*/
|
|
357
297
|
`;
|
|
358
298
|
}
|
|
359
299
|
|
package/src/components/layer.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { LitElement, html } from "lit";
|
|
1
|
+
import { LitElement, html, nothing } from "lit";
|
|
2
2
|
import { when } from "lit/directives/when.js";
|
|
3
3
|
import { live } from "lit/directives/live.js";
|
|
4
4
|
import "./layer-tools";
|
|
5
|
-
import checkbox from "@eox/elements-utils/styles/dist/checkbox.style";
|
|
6
5
|
import { firstUpdatedMethod, inputClickMethod } from "../methods/layer";
|
|
6
|
+
import {
|
|
7
|
+
getToolsIcon,
|
|
8
|
+
_parseActions,
|
|
9
|
+
_parseTools,
|
|
10
|
+
removeButton,
|
|
11
|
+
sortButton,
|
|
12
|
+
} from "../helpers/layer-tools";
|
|
7
13
|
|
|
8
14
|
/**
|
|
9
15
|
* `EOxLayerControlLayer` represents a custom web component managing individual layers within the EOxLayerControl system.
|
|
@@ -16,6 +22,7 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
16
22
|
// Define static properties for the component
|
|
17
23
|
static properties = {
|
|
18
24
|
layer: { attribute: false },
|
|
25
|
+
layerType: { attribute: false },
|
|
19
26
|
map: { attribute: false, state: true },
|
|
20
27
|
titleProperty: { attribute: "title-property", type: String },
|
|
21
28
|
showLayerZoomState: { attribute: "show-layer-zoom-state", type: Boolean },
|
|
@@ -43,6 +50,13 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
43
50
|
*/
|
|
44
51
|
this.layer = null;
|
|
45
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The type of the layer, which can be a string representing the layer type.
|
|
55
|
+
*
|
|
56
|
+
* @type {string|undefined} - The inferred layer type: "group", "draw", "vector", "raster", or undefined if not determinable.
|
|
57
|
+
*/
|
|
58
|
+
this.layerType = undefined;
|
|
59
|
+
|
|
46
60
|
/**
|
|
47
61
|
* The native OL map
|
|
48
62
|
*
|
|
@@ -154,7 +168,23 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
154
168
|
: "checkbox";
|
|
155
169
|
|
|
156
170
|
// Check if tools are available for the layer
|
|
157
|
-
const
|
|
171
|
+
const isActionAvail = _parseActions(this.tools, this.layer)?.length > 0;
|
|
172
|
+
|
|
173
|
+
// Check if tools are available for the layer
|
|
174
|
+
const isToolsAvail = _parseTools(this.tools, this.layer)?.length > 0;
|
|
175
|
+
|
|
176
|
+
// Check if eox-layercontrol-layer-tools is available in the DOM elsewhere for external tools,
|
|
177
|
+
// otherwise render inside layercontrol
|
|
178
|
+
const externalTools = document.querySelector(
|
|
179
|
+
"eox-layercontrol-layer-tools",
|
|
180
|
+
);
|
|
181
|
+
if (externalTools) {
|
|
182
|
+
Object.assign(externalTools, {
|
|
183
|
+
layer: this.layer,
|
|
184
|
+
tools: this.tools,
|
|
185
|
+
toolsAsList: this.toolsAsList,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
158
188
|
|
|
159
189
|
return html`
|
|
160
190
|
<style>
|
|
@@ -165,30 +195,151 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
165
195
|
this.layer,
|
|
166
196
|
() => html`
|
|
167
197
|
<!-- Render the layer -->
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
198
|
+
<nav
|
|
199
|
+
class="layer ${disableClass} ${visibilityClass} ${layerZoomStateClass} responsive tiny-space"
|
|
200
|
+
>
|
|
201
|
+
${when(!this.unstyled, () => {
|
|
202
|
+
if (this.#getLayer("color")) {
|
|
203
|
+
return html`
|
|
204
|
+
<i class="small" style="color: ${this.#getLayer("color")}">
|
|
205
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
206
|
+
<title>square-rounded</title>
|
|
207
|
+
<path
|
|
208
|
+
d="M8 3H16C18.76 3 21 5.24 21 8V16C21 18.76 18.76 21 16 21H8C5.24 21 3 18.76 3 16V8C3 5.24 5.24 3 8 3Z"
|
|
209
|
+
/>
|
|
210
|
+
</svg>
|
|
211
|
+
</i>
|
|
212
|
+
`;
|
|
213
|
+
}
|
|
214
|
+
switch (this.layerType) {
|
|
215
|
+
case "group":
|
|
216
|
+
// handled in layer group component
|
|
217
|
+
return html` <i class="small"> </i> `;
|
|
218
|
+
case "draw":
|
|
219
|
+
return html`
|
|
220
|
+
<i class="small grey-text">
|
|
221
|
+
<svg
|
|
222
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
223
|
+
viewBox="0 0 24 24"
|
|
224
|
+
>
|
|
225
|
+
<title>vector-square-edit</title>
|
|
226
|
+
<path
|
|
227
|
+
d="M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z"
|
|
228
|
+
/>
|
|
229
|
+
</svg>
|
|
230
|
+
</i>
|
|
231
|
+
`;
|
|
232
|
+
case "vector":
|
|
233
|
+
return html`
|
|
234
|
+
<i class="small grey-text">
|
|
235
|
+
<svg
|
|
236
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
237
|
+
viewBox="0 0 24 24"
|
|
238
|
+
>
|
|
239
|
+
<title>vector-polygon</title>
|
|
240
|
+
<path
|
|
241
|
+
d="M2,2V8H4.28L5.57,16H4V22H10V20.06L15,20.05V22H21V16H19.17L20,9H22V3H16V6.53L14.8,8H9.59L8,5.82V2M4,4H6V6H4M18,5H20V7H18M6.31,8H7.11L9,10.59V14H15V10.91L16.57,9H18L17.16,16H15V18.06H10V16H7.6M11,10H13V12H11M6,18H8V20H6M17,18H19V20H17"
|
|
242
|
+
/>
|
|
243
|
+
</svg>
|
|
244
|
+
</i>
|
|
245
|
+
`;
|
|
246
|
+
case "raster":
|
|
247
|
+
return html`
|
|
248
|
+
<i class="small grey-text">
|
|
249
|
+
<svg
|
|
250
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
251
|
+
viewBox="0 0 24 24"
|
|
252
|
+
>
|
|
253
|
+
<title>checkerboard</title>
|
|
254
|
+
<path
|
|
255
|
+
d="M2 2V22H22V2H2M20 12H16V16H20V20H16V16H12V20H8V16H4V12H8V8H4V4H8V8H12V4H16V8H20V12M16 8V12H12V8H16M12 12V16H8V12H12Z"
|
|
256
|
+
/>
|
|
257
|
+
</svg>
|
|
258
|
+
</i>
|
|
259
|
+
`;
|
|
260
|
+
default:
|
|
261
|
+
return html` <i class="small grey-text"> </i> `;
|
|
262
|
+
}
|
|
263
|
+
})}
|
|
264
|
+
|
|
265
|
+
<!-- Layer title -->
|
|
266
|
+
<div class="max truncate drag-handle ${disableClass}">
|
|
267
|
+
<span class="layertitle truncate"
|
|
268
|
+
>${this.#getLayer(this.titleProperty)}</span
|
|
269
|
+
>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
${when(
|
|
273
|
+
isToolsAvail,
|
|
274
|
+
() => html`
|
|
275
|
+
<button
|
|
276
|
+
class="transparent square primary-text small action tools ${this
|
|
277
|
+
.tools.length === 1
|
|
278
|
+
? this.tools[0]
|
|
279
|
+
: "dots"}"
|
|
280
|
+
@click=${() => {
|
|
281
|
+
const toolsDetails = this.renderRoot
|
|
282
|
+
.querySelector("eox-layercontrol-layer-tools")
|
|
283
|
+
?.querySelector("details");
|
|
284
|
+
// Toggle tools details open/close
|
|
285
|
+
toolsDetails.open = !toolsDetails.open;
|
|
286
|
+
}}
|
|
287
|
+
>
|
|
288
|
+
<i class="small">
|
|
289
|
+
${getToolsIcon()[
|
|
290
|
+
this.tools.length > 1 ? "dots" : this.tools[0]
|
|
291
|
+
]}
|
|
292
|
+
</i>
|
|
293
|
+
<!--<div class="tooltip top" style="pointer-events: none">Tools</div>-->
|
|
294
|
+
</button>
|
|
295
|
+
`,
|
|
296
|
+
)}
|
|
297
|
+
${when(!isToolsAvail && isActionAvail, () =>
|
|
298
|
+
this.tools[0] === "remove"
|
|
299
|
+
? removeButton(this, getToolsIcon()[this.tools[0]])
|
|
300
|
+
: sortButton(this, getToolsIcon()[this.tools[0]], false),
|
|
301
|
+
)}
|
|
302
|
+
|
|
303
|
+
<!-- Input element for layer visibility -->
|
|
304
|
+
<label
|
|
305
|
+
class="${disableClass} ${inputType} icon square primary-text action visibility small"
|
|
306
|
+
>
|
|
171
307
|
<input
|
|
172
308
|
type=${inputType}
|
|
173
309
|
.checked=${live(visibility)}
|
|
174
310
|
@click=${this.#handleInputClick}
|
|
311
|
+
disabled=${disableClass || nothing}
|
|
175
312
|
/>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
313
|
+
<span>
|
|
314
|
+
<i>
|
|
315
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
316
|
+
<title>eye-off-outline</title>
|
|
317
|
+
<path
|
|
318
|
+
d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z"
|
|
319
|
+
/>
|
|
320
|
+
</svg>
|
|
321
|
+
</i>
|
|
322
|
+
<i>
|
|
323
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
324
|
+
<title>eye</title>
|
|
325
|
+
<path
|
|
326
|
+
d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"
|
|
327
|
+
/>
|
|
328
|
+
</svg>
|
|
329
|
+
</i>
|
|
183
330
|
</span>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
)}
|
|
331
|
+
<!--<div class="tooltip top" style="pointer-events: none">${visibility
|
|
332
|
+
? "Hide"
|
|
333
|
+
: "Show"}</div>-->
|
|
188
334
|
</label>
|
|
189
|
-
</
|
|
335
|
+
</nav>
|
|
336
|
+
`,
|
|
337
|
+
)}
|
|
190
338
|
|
|
191
|
-
|
|
339
|
+
<!-- Render layer tools -->
|
|
340
|
+
${when(
|
|
341
|
+
isToolsAvail && !externalTools,
|
|
342
|
+
() => html`
|
|
192
343
|
<eox-layercontrol-layer-tools
|
|
193
344
|
.noShadow=${true}
|
|
194
345
|
.layer=${this.layer}
|
|
@@ -203,63 +354,68 @@ export class EOxLayerControlLayer extends LitElement {
|
|
|
203
354
|
|
|
204
355
|
#styleBasic = ``;
|
|
205
356
|
#styleEOX = `
|
|
206
|
-
${checkbox}
|
|
207
357
|
eox-layercontrol-layer {
|
|
208
358
|
width: 100%;
|
|
209
359
|
position: relative;
|
|
210
360
|
}
|
|
361
|
+
eox-layercontrol-layer nav {
|
|
362
|
+
height: 32px;
|
|
363
|
+
margin-block-start: 0 !important;
|
|
364
|
+
}
|
|
365
|
+
eox-layercontrol-layer > nav > .action.tools {
|
|
366
|
+
display: var(--layer-tools-button-visibility);
|
|
367
|
+
}
|
|
368
|
+
eox-layercontrol-layer .action.tools.dots {
|
|
369
|
+
transition: rotate 0s;
|
|
370
|
+
}
|
|
371
|
+
eox-layercontrol-layer:has(eox-layercontrol-layer-tools > details[open]) .action.tools.dots {
|
|
372
|
+
transform: rotate(180deg);
|
|
373
|
+
}
|
|
374
|
+
eox-layercontrol-layer > nav > .action.visibility {
|
|
375
|
+
padding: .3rem;
|
|
376
|
+
transform: translateX(.3rem);
|
|
377
|
+
}
|
|
378
|
+
@media (pointer:fine) {
|
|
379
|
+
eox-layercontrol-layer:not(:hover) > nav > .action {
|
|
380
|
+
display: var(--layer-toggle-button-visibility);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
eox-layercontrol-layer nav:has(.action input[type=checkbox]:not(:checked)),
|
|
384
|
+
eox-layercontrol-layer nav:has(.action input[type=radio]:not(:checked)),
|
|
385
|
+
eox-layercontrol-layer:has(.action input[type=checkbox]:not(:checked)) eox-layercontrol-layer-tools,
|
|
386
|
+
eox-layercontrol-layer:has(.action input[type=radio]:not(:checked)) eox-layercontrol-layer-tools,
|
|
387
|
+
eox-layercontrol-layer-group:has(summary .action input[type=checkbox]:not(:checked)) eox-layercontrol-layer-list,
|
|
388
|
+
eox-layercontrol-layer-group:has(summary .action input[type=radio]:not(:checked)) eox-layercontrol-layer-list,
|
|
389
|
+
eox-layercontrol-layer-group:has(summary .action input[type=checkbox]:not(:checked)) .arrow-container,
|
|
390
|
+
eox-layercontrol-layer-group:has(summary .action input[type=radio]:not(:checked)) .arrow-container,
|
|
391
|
+
eox-layercontrol-layer-group:has(summary .action input[type=checkbox]:not(:checked)) eox-layercontrol-layer-tools,
|
|
392
|
+
eox-layercontrol-layer-group:has(summary .action input[type=radio]:not(:checked)) eox-layercontrol-layer-tools {
|
|
393
|
+
opacity: .5;
|
|
394
|
+
}
|
|
395
|
+
.tooltip {
|
|
396
|
+
opacity: 1;
|
|
397
|
+
}
|
|
211
398
|
.layer input[type=checkbox],
|
|
212
399
|
.layer input[type=radio] {
|
|
213
400
|
display: var(--layer-input-visibility);
|
|
214
401
|
}
|
|
215
402
|
.layer.zoom-state-invisible {
|
|
216
|
-
|
|
217
|
-
opacity: 0.3;
|
|
403
|
+
opacity: 0.5;
|
|
218
404
|
}
|
|
219
405
|
.layer {
|
|
220
|
-
width: 100%;
|
|
221
|
-
align-items: center;
|
|
222
|
-
justify-content: space-between;
|
|
223
406
|
padding: var(--padding-vertical) 0;
|
|
224
407
|
display: var(--layer-visibility);
|
|
408
|
+
user-select: none;
|
|
225
409
|
}
|
|
226
|
-
|
|
227
|
-
display: flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
}
|
|
231
|
-
.title {
|
|
410
|
+
.layertitle {
|
|
232
411
|
display: var(--layer-title-visibility);
|
|
233
412
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
height: 20px;
|
|
238
|
-
margin-right: 6px;
|
|
239
|
-
display: var(--layer-type-visibility);
|
|
240
|
-
}
|
|
241
|
-
[data-type] .title.color-swatch::before {
|
|
242
|
-
background: var(--layer-color);
|
|
243
|
-
border-radius: 3px;
|
|
244
|
-
content: "" !important;
|
|
245
|
-
width: 16px;
|
|
246
|
-
min-width: 16px;
|
|
247
|
-
height: 16px;
|
|
248
|
-
}
|
|
249
|
-
[data-type=group] .title::before {
|
|
250
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
|
|
251
|
-
}
|
|
252
|
-
[data-type=group] > eox-layercontrol-layer-group > details[open] > summary > eox-layercontrol-layer > .layer > label > .title::before {
|
|
253
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-open-outline%3C/title%3E%3Cpath d='M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z' /%3E%3C/svg%3E");
|
|
254
|
-
}
|
|
255
|
-
[data-type=raster] .title::before {
|
|
256
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckerboard%3C/title%3E%3Cpath d='M2 2V22H22V2H2M20 12H16V16H20V20H16V16H12V20H8V16H4V12H8V8H4V4H8V8H12V4H16V8H20V12M16 8V12H12V8H16M12 12V16H8V12H12Z' /%3E%3C/svg%3E");
|
|
257
|
-
}
|
|
258
|
-
[data-type=vector] .title::before {
|
|
259
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-outline%3C/title%3E%3Cpath d='M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z' /%3E%3C/svg%3E");
|
|
413
|
+
.drag-handle {
|
|
414
|
+
-webkit-user-drag: element;
|
|
415
|
+
user-select: none;
|
|
260
416
|
}
|
|
261
|
-
|
|
262
|
-
|
|
417
|
+
:is(.checkbox,.radio)>span:after {
|
|
418
|
+
transition: none !important;
|
|
263
419
|
}
|
|
264
420
|
`;
|
|
265
421
|
}
|