Skip to content

Commit

Permalink
fixes scrubbing in non pjs environments
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbarabash committed Feb 18, 2015
1 parent a715116 commit 5e8a1d1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
16 changes: 9 additions & 7 deletions build/js/live-editor.ui.js
Expand Up @@ -928,14 +928,16 @@ window.LiveEditor = Backbone.View.extend({
type: this.editorType
});

this.noLint = false;
this.editor.on("scrubbingStarted", function() {
this.noLint = true;
}.bind(this));

this.editor.on("scrubbingEnded", function() {
if (this.editorType === "ace_pjs") {
this.noLint = false;
}.bind(this));
this.editor.on("scrubbingStarted", function() {
this.noLint = true;
}.bind(this));

this.editor.on("scrubbingEnded", function() {
this.noLint = false;
}.bind(this));
}

this.tipbar = new TipBar({
el: this.$(this.dom.OUTPUT_DIV),
Expand Down
1 change: 1 addition & 0 deletions demos/simple/index.html
Expand Up @@ -53,6 +53,7 @@ <h1>Live Editor Example</h1>
workersDir: "../../build/workers/",
externalsDir: "../../build/external/",
imagesDir: "../../build/images/",
soundsDir: "../../sounds/",
execFile: outputUrl,
jshintFile: "../../build/external/jshint/jshint.js",
useDebugger: useDebugger
Expand Down
16 changes: 9 additions & 7 deletions js/live-editor.js
Expand Up @@ -112,14 +112,16 @@ window.LiveEditor = Backbone.View.extend({
type: this.editorType
});

this.noLint = false;
this.editor.on("scrubbingStarted", function() {
this.noLint = true;
}.bind(this));

this.editor.on("scrubbingEnded", function() {
if (this.editorType === "ace_pjs") {
this.noLint = false;
}.bind(this));
this.editor.on("scrubbingStarted", function() {
this.noLint = true;
}.bind(this));

this.editor.on("scrubbingEnded", function() {
this.noLint = false;
}.bind(this));
}

this.tipbar = new TipBar({
el: this.$(this.dom.OUTPUT_DIV),
Expand Down

0 comments on commit 5e8a1d1

Please sign in to comment.