editor: reduce scroll duration when inserting a new champ

The previous default was 1s, which felt slooooow.
This commit is contained in:
Pierre de La Morinerie 2019-11-07 15:44:55 +01:00
parent fc8a0d46ff
commit 8a7f4ec769

View file

@ -56,7 +56,9 @@ function addTypeDeChamp(state, typeDeChamps, insertAfter, done) {
state.flash.success(); state.flash.success();
done(); done();
if (insertAfter) { if (insertAfter) {
scrollToComponent(insertAfter.target.nextElementSibling); scrollToComponent(insertAfter.target.nextElementSibling, {
duration: 300
});
} }
}) })
.catch(message => state.flash.error(message)); .catch(message => state.flash.error(message));