markuapad 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module Markuapad
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/src/jsx/editor.jsx CHANGED
@@ -12,7 +12,7 @@ class Editor extends React.Component {
12
12
  this.onCurrentFileLoaded = this.onCurrentFileLoaded.bind(this);
13
13
 
14
14
  // Make the editor changed function not spammy
15
- this.onEditorChanged = _.debounce(this.onEditorChanged.bind(this), 100);
15
+ this.onEditorChanged = _.debounce(this.onEditorChanged.bind(this), props.CHANGED_INTERVAL || 100);
16
16
  this.onCursorChanged = this.onCursorChanged.bind(this)
17
17
  }
18
18
 
data/src/jsx/main.jsx CHANGED
@@ -124,6 +124,7 @@ class Main extends React.Component {
124
124
  onBookContentChanged={this.onBookContentChanged}
125
125
  inLiveMode={this.state.inLiveMode}
126
126
  currentFile={this.state.currentFile}
127
+ CHANGED_INTERVAL={this.props.options.CHANGED_INTERVAL}
127
128
  />
128
129
  { this.state.inLiveMode ? <LivePreview key='live-mode' ref="liveMode" html={this.state.previewHtml} previewState={this.state.previewState} previewErrors={this.state.previewErrors} /> : null }
129
130
  </section>
data/src/markuapad.js CHANGED
@@ -10,7 +10,9 @@ import FileAccessor from "./file_accessor";
10
10
 
11
11
  _.string = _string;
12
12
 
13
- let DEFAULT_OPTIONS = {}
13
+ let DEFAULT_OPTIONS = {
14
+ CHANGED_INTERVAL: 100
15
+ }
14
16
 
15
17
  class Markuapad {
16
18
  constructor() {
data/src/web.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import Markuapad from "./markuapad"
2
2
 
3
3
  // Call the api to create a new markuapad instance on the #main element
4
- Markuapad.create("main", { fileAccessor: ExampleFileAccessor });
4
+ Markuapad.create("main", { fileAccessor: ExampleFileAccessor, CHANGED_INTERVAL: 100 });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markuapad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braden Simpson