mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-07 11:34:35 +02:00
Create simple debounce and throttle instead of _.
This commit is contained in:
parent
ae0030daa7
commit
e6d7edd130
7 changed files with 43 additions and 8 deletions
|
@ -2,6 +2,7 @@ var _ = require('underscore');
|
|||
var Q = require('q');
|
||||
|
||||
var Views = require('../views');
|
||||
var throttle = require('../util/throttle');
|
||||
var ModalTerminal = Views.ModalTerminal;
|
||||
var ContainedBase = Views.ContainedBase;
|
||||
|
||||
|
@ -97,7 +98,7 @@ var MarkdownGrabber = ContainedBase.extend({
|
|||
|
||||
keyup: function() {
|
||||
if (!this.throttledPreview) {
|
||||
this.throttledPreview = _.throttle(
|
||||
this.throttledPreview = throttle(
|
||||
this.updatePreview.bind(this),
|
||||
500
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue