keep preview when clicking there
This commit is contained in:
parent
98a6c30465
commit
9b72b0bf93
|
@ -337,6 +337,9 @@ svg.addEventListener('mouseout', e => {
|
||||||
document.body.addEventListener('click', e => {
|
document.body.addEventListener('click', e => {
|
||||||
let el = e.target;
|
let el = e.target;
|
||||||
|
|
||||||
|
// Ignore clicks, i.e. to select, in the preview.
|
||||||
|
if (document.getElementById('preview').contains(el)) return;
|
||||||
|
|
||||||
// Remove possible forced stroke from previously-locked color.
|
// Remove possible forced stroke from previously-locked color.
|
||||||
document.querySelectorAll('polygon[style]').forEach(el => {
|
document.querySelectorAll('polygon[style]').forEach(el => {
|
||||||
el.removeAttribute('style');
|
el.removeAttribute('style');
|
||||||
|
|
Loading…
Reference in New Issue