diff options
Diffstat (limited to 'app/assets/javascripts/blob/stl_viewer.js')
-rw-r--r-- | app/assets/javascripts/blob/stl_viewer.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/blob/stl_viewer.js b/app/assets/javascripts/blob/stl_viewer.js index 0ea623a705a..768bbce9c57 100644 --- a/app/assets/javascripts/blob/stl_viewer.js +++ b/app/assets/javascripts/blob/stl_viewer.js @@ -5,15 +5,15 @@ export default () => { [].slice.call(document.querySelectorAll('.js-material-changer')).forEach((el) => { el.addEventListener('click', (e) => { - const { target } = e; + const { currentTarget } = e; e.preventDefault(); document.querySelector('.js-material-changer.selected').classList.remove('selected'); - target.classList.add('selected'); - target.blur(); + currentTarget.classList.add('selected'); + currentTarget.blur(); - viewer.changeObjectMaterials(target.dataset.type); + viewer.changeObjectMaterials(currentTarget.dataset.material); }); }); }; |