Also check predefined styles for validity.

This commit is contained in:
Maximilian Krög
2019-10-03 03:02:58 +02:00
parent b4a996e760
commit d0cd1064ff

View File

@@ -103,10 +103,8 @@ select.value = 'circles';
function onSelectChange() {
const style = select.value;
const newLiteralStyle = predefinedStyles[style];
if (refreshLayer(newLiteralStyle)) {
editor.value = JSON.stringify(newLiteralStyle, null, 2);
}
setStyleStatus();
setStyleStatus(refreshLayer(newLiteralStyle) ? undefined : false);
editor.value = JSON.stringify(newLiteralStyle, null, 2);
}
onSelectChange();
select.addEventListener('change', onSelectChange);