mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-27 20:12:40 +00:00
add check for change to current viewport
This commit is contained in:
@@ -80,6 +80,7 @@ const CodeEditor = createClass({
|
||||
|
||||
// Note: codeMirror passes a copy of itself in this callback. cm === this.codeMirror. Either one works.
|
||||
this.codeMirror.on('change', (cm)=>{this.props.onChange(cm.getValue());});
|
||||
this.codeMirror.on('viewportChange', _.debounce((cm)=>{this.props.onChange(cm.getValue());},200));
|
||||
this.updateSize();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user