1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-05 12:57:25 +02:00

codeblast only only actual editing/deletion

This commit is contained in:
Kushagra Gour
2017-03-11 16:44:58 +05:30
parent 8f885c5b91
commit 94fd06b1ff

View File

@@ -164,7 +164,9 @@ https://twitter.com/JoelBesada/status/670343885655293952
requestAnimationFrame(loop); requestAnimationFrame(loop);
} }
function onCodeMirrorChange(editor) { function onCodeMirrorChange(editor, change) {
if (change.origin !== '+input' && change.origin !== '+delete') { return; }
if (editor.getOption('blastCode') === true || editor.getOption('blastCode').shake === undefined) { if (editor.getOption('blastCode') === true || editor.getOption('blastCode').shake === undefined) {
throttledShake(editor, 0.3); throttledShake(editor, 0.3);
} }