mirror of
https://github.com/maputnik/editor.git
synced 2026-01-04 12:30:00 +00:00
Support copy, delete and toggle visibility
This commit is contained in:
@@ -24,7 +24,17 @@ function ensureMetadataExists(style) {
|
||||
return ensureHasId(ensureHasTimestamp(style))
|
||||
}
|
||||
|
||||
function indexOfLayer(layers, layerId) {
|
||||
for (let i = 0; i < layers.length; i++) {
|
||||
if(layers[i].id === layerId) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export default {
|
||||
ensureMetadataExists,
|
||||
emptyStyle,
|
||||
indexOfLayer,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user