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() { function onSelectChange() {
const style = select.value; const style = select.value;
const newLiteralStyle = predefinedStyles[style]; const newLiteralStyle = predefinedStyles[style];
if (refreshLayer(newLiteralStyle)) { setStyleStatus(refreshLayer(newLiteralStyle) ? undefined : false);
editor.value = JSON.stringify(newLiteralStyle, null, 2); editor.value = JSON.stringify(newLiteralStyle, null, 2);
}
setStyleStatus();
} }
onSelectChange(); onSelectChange();
select.addEventListener('change', onSelectChange); select.addEventListener('change', onSelectChange);