mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2026-04-30 00:00:04 +08:00
Docs update
This commit is contained in:
+2867
-2119
File diff suppressed because it is too large
Load Diff
+37142
-33189
File diff suppressed because it is too large
Load Diff
+18180
-14549
File diff suppressed because it is too large
Load Diff
@@ -336,7 +336,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/demo/App.js.html#lineNumber54">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/demo/App.js.html#lineNumber58">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -424,7 +424,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/demo/App.js.html#lineNumber66">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/demo/App.js.html#lineNumber70">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/demo/App.js.html#lineNumber73">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/demo/App.js.html#lineNumber77">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|||||||
@@ -1388,7 +1388,7 @@ As keys are pressed, text will be added/removed at that position within the inpu
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber519">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber531">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1433,7 +1433,7 @@ As keys are pressed, text will be added/removed at that position within the inpu
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber597">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber609">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1477,7 +1477,7 @@ As keys are pressed, text will be added/removed at that position within the inpu
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber607">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber619">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1521,7 +1521,7 @@ As keys are pressed, text will be added/removed at that position within the inpu
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber265">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber272">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1564,7 +1564,7 @@ As keys are pressed, text will be added/removed at that position within the inpu
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber229">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber233">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1607,7 +1607,7 @@ As keys are pressed, text will be added/removed at that position within the inpu
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber744">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber764">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1731,7 +1731,7 @@ keyboard.clearInput();</code></pre>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber218">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber222">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2192,7 +2192,7 @@ keyboard.clearInput();</code></pre>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber563">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber575">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2236,7 +2236,7 @@ keyboard.clearInput();</code></pre>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber339">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber350">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2327,7 +2327,7 @@ keyboard.clearInput();</code></pre>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber375">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber386">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2407,7 +2407,7 @@ keyboard.clearInput();</code></pre>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber508">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber519">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2467,7 +2467,7 @@ keyboard.clearInput();</code></pre>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber349">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber360">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2512,7 +2512,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber284">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber295">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2573,7 +2573,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber359">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber370">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2646,7 +2646,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber477">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber488">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2719,7 +2719,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber299">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber310">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2865,7 +2865,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber261">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber265">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2925,7 +2925,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber214">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber218">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -2991,7 +2991,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber251">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber255">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3035,7 +3035,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber495">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber506">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3079,7 +3079,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber573">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber585">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3123,7 +3123,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber530">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber542">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3167,7 +3167,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber555">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber567">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3211,7 +3211,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber547">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber559">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3255,7 +3255,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber425">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber436">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3335,7 +3335,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber614">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber626">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3379,7 +3379,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber331">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber342">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3440,7 +3440,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber316">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber327">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -3508,7 +3508,7 @@ Used interally between re-renders.</p>
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber274">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/components/Keyboard.js.html#lineNumber285">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span class="code" data-ice="name"><span><a href="class/src/lib/services/Utilities.js~Utilities.html#instance-method-addStringAt">addStringAt</a></span></span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, string: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
|
<span class="code" data-ice="name"><span><a href="class/src/lib/services/Utilities.js~Utilities.html#instance-method-addStringAt">addStringAt</a></span></span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, string: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, moveCaret: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>): <span>*</span></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -372,7 +372,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span class="code" data-ice="name"><span><a href="class/src/lib/services/Utilities.js~Utilities.html#instance-method-getUpdatedInput">getUpdatedInput</a></span></span><span class="code" data-ice="signature">(button: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, input: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, caretPos: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
|
<span class="code" data-ice="name"><span><a href="class/src/lib/services/Utilities.js~Utilities.html#instance-method-getUpdatedInput">getUpdatedInput</a></span></span><span class="code" data-ice="signature">(button: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, input: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, caretPos: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, moveCaret: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>): <span>*</span></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -459,7 +459,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span class="code" data-ice="name"><span><a href="class/src/lib/services/Utilities.js~Utilities.html#instance-method-removeAt">removeAt</a></span></span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
|
<span class="code" data-ice="name"><span><a href="class/src/lib/services/Utilities.js~Utilities.html#instance-method-removeAt">removeAt</a></span></span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, moveCaret: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>): <span>*</span></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -572,7 +572,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber300">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber308">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -657,11 +657,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span class="code" data-ice="name">addStringAt</span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, string: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
|
<span class="code" data-ice="name">addStringAt</span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, string: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, moveCaret: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>): <span>*</span></span>
|
||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber198">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber202">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -702,6 +702,13 @@
|
|||||||
<td data-ice="description"><p>The (cursor) position where the string should be added</p>
|
<td data-ice="description"><p>The (cursor) position where the string should be added</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr data-ice="property" data-depth="0">
|
||||||
|
<td data-ice="name" class="code" data-depth="0">moveCaret</td>
|
||||||
|
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span></td>
|
||||||
|
<td data-ice="appendix"></td>
|
||||||
|
<td data-ice="description"><p>Whether to update simple-keyboard's cursor</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -748,7 +755,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber337">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber345">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -821,7 +828,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber347">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber355">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1114,11 +1121,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span class="code" data-ice="name">getUpdatedInput</span><span class="code" data-ice="signature">(button: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, input: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, caretPos: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
|
<span class="code" data-ice="name">getUpdatedInput</span><span class="code" data-ice="signature">(button: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, input: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></span>, caretPos: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, moveCaret: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>): <span>*</span></span>
|
||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber135">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber136">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1166,6 +1173,13 @@
|
|||||||
<td data-ice="description"><p>The cursor's current position</p>
|
<td data-ice="description"><p>The cursor's current position</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr data-ice="property" data-depth="0">
|
||||||
|
<td data-ice="name" class="code" data-depth="0">moveCaret</td>
|
||||||
|
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span></td>
|
||||||
|
<td data-ice="appendix"></td>
|
||||||
|
<td data-ice="description"><p>Whether to update simple-keyboard's cursor</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -1212,7 +1226,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber275">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber284">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1296,7 +1310,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber328">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber336">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1348,11 +1362,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span class="code" data-ice="name">removeAt</span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
|
<span class="code" data-ice="name">removeAt</span><span class="code" data-ice="signature">(source: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, position: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>, moveCaret: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>): <span>*</span></span>
|
||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber228">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber233">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -1386,6 +1400,13 @@
|
|||||||
<td data-ice="description"><p>The (cursor) position from where the characters should be removed</p>
|
<td data-ice="description"><p>The (cursor) position from where the characters should be removed</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr data-ice="property" data-depth="0">
|
||||||
|
<td data-ice="name" class="code" data-depth="0">moveCaret</td>
|
||||||
|
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span></td>
|
||||||
|
<td data-ice="appendix"></td>
|
||||||
|
<td data-ice="description"><p>Whether to update simple-keyboard's cursor</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -1432,7 +1453,7 @@
|
|||||||
<span class="right-info">
|
<span class="right-info">
|
||||||
|
|
||||||
|
|
||||||
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber182">source</a></span></span>
|
<span data-ice="source"><span><a href="file/src/lib/services/Utilities.js.html#lineNumber185">source</a></span></span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|||||||
@@ -68,12 +68,16 @@ class App {
|
|||||||
* Creates a new simple-keyboard instance
|
* Creates a new simple-keyboard instance
|
||||||
*/
|
*/
|
||||||
this.keyboard = new Keyboard({
|
this.keyboard = new Keyboard({
|
||||||
//debug: true,
|
debug: true,
|
||||||
layoutName: this.layoutName,
|
layoutName: this.layoutName,
|
||||||
onChange: input => this.onChange(input),
|
onChange: input => this.onChange(input),
|
||||||
onKeyPress: button => this.onKeyPress(button),
|
onKeyPress: button => this.onKeyPress(button),
|
||||||
newLineOnEnter: true,
|
newLineOnEnter: true,
|
||||||
physicalKeyboardHighlight: true,
|
physicalKeyboardHighlight: true,
|
||||||
|
inputName: "inputPhone",
|
||||||
|
maxLength: {
|
||||||
|
inputPhone: 11
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,7 +85,7 @@ class App {
|
|||||||
*/
|
*/
|
||||||
document.querySelector('.simple-keyboard').insertAdjacentHTML('beforebegin', `
|
document.querySelector('.simple-keyboard').insertAdjacentHTML('beforebegin', `
|
||||||
<div class="simple-keyboard-preview">
|
<div class="simple-keyboard-preview">
|
||||||
<textarea class="input"></textarea>
|
<textarea class="input" maxlength="11"></textarea>
|
||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
|||||||
@@ -215,7 +215,9 @@ class SimpleKeyboard {
|
|||||||
if(!this.input[this.options.inputName])
|
if(!this.input[this.options.inputName])
|
||||||
this.input[this.options.inputName] = '';
|
this.input[this.options.inputName] = '';
|
||||||
|
|
||||||
let updatedInput = this.utilities.getUpdatedInput(button, this.input[this.options.inputName], this.options, this.caretPosition);
|
let updatedInput = this.utilities.getUpdatedInput(
|
||||||
|
button, this.input[this.options.inputName], this.options, this.caretPosition
|
||||||
|
);
|
||||||
|
|
||||||
if(this.input[this.options.inputName] !== updatedInput){
|
if(this.input[this.options.inputName] !== updatedInput){
|
||||||
|
|
||||||
@@ -226,7 +228,9 @@ class SimpleKeyboard {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.input[this.options.inputName] = updatedInput;
|
this.input[this.options.inputName] = this.utilities.getUpdatedInput(
|
||||||
|
button, this.input[this.options.inputName], this.options, this.caretPosition, true
|
||||||
|
);
|
||||||
|
|
||||||
if(debug)
|
if(debug)
|
||||||
console.log('Input changed:', this.input);
|
console.log('Input changed:', this.input);
|
||||||
@@ -301,12 +305,19 @@ class SimpleKeyboard {
|
|||||||
*/
|
*/
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
handleButtonHold(button){
|
handleButtonHold(button){
|
||||||
|
if(this.holdInteractionTimeout)
|
||||||
|
clearTimeout(this.holdInteractionTimeout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {object} Timeout dictating the speed of key hold iterations
|
* @type {object} Timeout dictating the speed of key hold iterations
|
||||||
*/
|
*/
|
||||||
this.holdInteractionTimeout = setTimeout(() => {
|
this.holdInteractionTimeout = setTimeout(() => {
|
||||||
this.handleButtonClicked(button);
|
if(this.isMouseHold){
|
||||||
this.handleButtonHold(button);
|
this.handleButtonClicked(button);
|
||||||
|
this.handleButtonHold(button);
|
||||||
|
} else {
|
||||||
|
clearTimeout(this.holdInteractionTimeout);
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -551,8 +562,9 @@ class SimpleKeyboard {
|
|||||||
let targetTagName = event.target.tagName.toLowerCase();
|
let targetTagName = event.target.tagName.toLowerCase();
|
||||||
|
|
||||||
if(
|
if(
|
||||||
targetTagName === "textarea" ||
|
(targetTagName === "textarea" ||
|
||||||
targetTagName === "input"
|
targetTagName === "input") &&
|
||||||
|
!this.options.disableCaretPositioning
|
||||||
){
|
){
|
||||||
/**
|
/**
|
||||||
* Tracks current cursor position
|
* Tracks current cursor position
|
||||||
@@ -726,7 +738,10 @@ class SimpleKeyboard {
|
|||||||
*/
|
*/
|
||||||
var buttonDOM = document.createElement('div');
|
var buttonDOM = document.createElement('div');
|
||||||
buttonDOM.className += `hg-button ${fctBtnClass}${buttonThemeClass ? " "+buttonThemeClass : ""}`;
|
buttonDOM.className += `hg-button ${fctBtnClass}${buttonThemeClass ? " "+buttonThemeClass : ""}`;
|
||||||
buttonDOM.onclick = () => this.handleButtonClicked(button);
|
buttonDOM.onclick = () => {
|
||||||
|
this.isMouseHold = false;
|
||||||
|
this.handleButtonClicked(button);
|
||||||
|
}
|
||||||
buttonDOM.onmousedown = (e) => this.handleButtonMouseDown(button, e);
|
buttonDOM.onmousedown = (e) => this.handleButtonMouseDown(button, e);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -779,17 +794,17 @@ class SimpleKeyboard {
|
|||||||
*/
|
*/
|
||||||
this.onRender();
|
this.onRender();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handling mouseup
|
||||||
|
*/
|
||||||
|
document.onmouseup = () => this.handleButtonMouseUp();
|
||||||
|
|
||||||
if(!this.initialized){
|
if(!this.initialized){
|
||||||
/**
|
/**
|
||||||
* Ensures that onInit is only called once per instantiation
|
* Ensures that onInit is only called once per instantiation
|
||||||
*/
|
*/
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* Handling mouseup
|
|
||||||
*/
|
|
||||||
document.onmouseup = () => this.handleButtonMouseUp();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calling onInit
|
* Calling onInit
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -173,48 +173,51 @@ class Utilities {
|
|||||||
* @param {string} input The input string
|
* @param {string} input The input string
|
||||||
* @param {object} options The simple-keyboard options object
|
* @param {object} options The simple-keyboard options object
|
||||||
* @param {number} caretPos The cursor's current position
|
* @param {number} caretPos The cursor's current position
|
||||||
|
* @param {boolean} moveCaret Whether to update simple-keyboard's cursor
|
||||||
*/
|
*/
|
||||||
getUpdatedInput(button, input, options, caretPos){
|
getUpdatedInput(button, input, options, caretPos, moveCaret){
|
||||||
|
|
||||||
let output = input;
|
let output = input;
|
||||||
|
|
||||||
if((button === "{bksp}" || button === "{backspace}") && output.length > 0){
|
if((button === "{bksp}" || button === "{backspace}") && output.length > 0){
|
||||||
output = this.removeAt(output, caretPos);
|
output = this.removeAt(output, caretPos, moveCaret);
|
||||||
|
|
||||||
} else if(button === "{space}")
|
} else if(button === "{space}")
|
||||||
output = this.addStringAt(output, " ", caretPos);
|
output = this.addStringAt(output, " ", caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button === "{tab}" && !(typeof options.tabCharOnTab === "boolean" && options.tabCharOnTab === false)){
|
else if(button === "{tab}" && !(typeof options.tabCharOnTab === "boolean" && options.tabCharOnTab === false)){
|
||||||
output = this.addStringAt(output, "\t", caretPos);
|
output = this.addStringAt(output, "\t", caretPos, moveCaret);
|
||||||
|
|
||||||
} else if((button === "{enter}" || button === "{numpadenter}") && options.newLineOnEnter)
|
} else if((button === "{enter}" || button === "{numpadenter}") && options.newLineOnEnter)
|
||||||
output = this.addStringAt(output, "\n", caretPos);
|
output = this.addStringAt(output, "\n", caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button.includes("numpad") && Number.isInteger(Number(button[button.length - 2]))){
|
else if(button.includes("numpad") && Number.isInteger(Number(button[button.length - 2]))){
|
||||||
output = this.addStringAt(output, button[button.length - 2], caretPos);
|
output = this.addStringAt(output, button[button.length - 2], caretPos);
|
||||||
}
|
}
|
||||||
else if(button === "{numpaddivide}")
|
else if(button === "{numpaddivide}")
|
||||||
output = this.addStringAt(output, '/', caretPos);
|
output = this.addStringAt(output, '/', caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button === "{numpadmultiply}")
|
else if(button === "{numpadmultiply}")
|
||||||
output = this.addStringAt(output, '*', caretPos);
|
output = this.addStringAt(output, '*', caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button === "{numpadsubtract}")
|
else if(button === "{numpadsubtract}")
|
||||||
output = this.addStringAt(output, '-', caretPos);
|
output = this.addStringAt(output, '-', caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button === "{numpadadd}")
|
else if(button === "{numpadadd}")
|
||||||
output = this.addStringAt(output, '+', caretPos);
|
output = this.addStringAt(output, '+', caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button === "{numpaddecimal}")
|
else if(button === "{numpaddecimal}")
|
||||||
output = this.addStringAt(output, '.', caretPos);
|
output = this.addStringAt(output, '.', caretPos, moveCaret);
|
||||||
|
|
||||||
else if(button === "{" || button === "}")
|
else if(button === "{" || button === "}")
|
||||||
output = this.addStringAt(output, button, caretPos);
|
output = this.addStringAt(output, button, caretPos, moveCaret);
|
||||||
|
|
||||||
else if(!button.includes("{") && !button.includes("}"))
|
else if(!button.includes("{") && !button.includes("}"))
|
||||||
output = this.addStringAt(output, button, caretPos);
|
output = this.addStringAt(output, button, caretPos, moveCaret);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the cursor position by a given amount
|
* Moves the cursor position by a given amount
|
||||||
*
|
*
|
||||||
@@ -224,7 +227,7 @@ class Utilities {
|
|||||||
updateCaretPos(length, minus){
|
updateCaretPos(length, minus){
|
||||||
if(minus){
|
if(minus){
|
||||||
if(this.simpleKeyboardInstance.caretPosition > 0)
|
if(this.simpleKeyboardInstance.caretPosition > 0)
|
||||||
this.simpleKeyboardInstance.caretPosition = this.simpleKeyboardInstance.caretPosition - length
|
this.simpleKeyboardInstance.caretPosition = this.simpleKeyboardInstance.caretPosition - length;
|
||||||
} else {
|
} else {
|
||||||
this.simpleKeyboardInstance.caretPosition = this.simpleKeyboardInstance.caretPosition + length;
|
this.simpleKeyboardInstance.caretPosition = this.simpleKeyboardInstance.caretPosition + length;
|
||||||
}
|
}
|
||||||
@@ -236,14 +239,11 @@ class Utilities {
|
|||||||
* @param {string} source The source input
|
* @param {string} source The source input
|
||||||
* @param {string} string The string to add
|
* @param {string} string The string to add
|
||||||
* @param {number} position The (cursor) position where the string should be added
|
* @param {number} position The (cursor) position where the string should be added
|
||||||
|
* @param {boolean} moveCaret Whether to update simple-keyboard's cursor
|
||||||
*/
|
*/
|
||||||
addStringAt(source, string, position){
|
addStringAt(source, string, position, moveCaret){
|
||||||
let output;
|
let output;
|
||||||
|
|
||||||
if(this.simpleKeyboardInstance.options.debug){
|
|
||||||
console.log("Caret at:", position);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!position && position !== 0){
|
if(!position && position !== 0){
|
||||||
output = source + string;
|
output = source + string;
|
||||||
} else {
|
} else {
|
||||||
@@ -253,11 +253,15 @@ class Utilities {
|
|||||||
* Avoid caret position change when maxLength is set
|
* Avoid caret position change when maxLength is set
|
||||||
*/
|
*/
|
||||||
if(!this.isMaxLengthReached()){
|
if(!this.isMaxLengthReached()){
|
||||||
this.updateCaretPos(string.length);
|
if(moveCaret) this.updateCaretPos(string.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.simpleKeyboardInstance.options.debug && moveCaret){
|
||||||
|
console.log("Caret at:", position);
|
||||||
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,8 +270,9 @@ class Utilities {
|
|||||||
*
|
*
|
||||||
* @param {string} source The source input
|
* @param {string} source The source input
|
||||||
* @param {number} position The (cursor) position from where the characters should be removed
|
* @param {number} position The (cursor) position from where the characters should be removed
|
||||||
|
* @param {boolean} moveCaret Whether to update simple-keyboard's cursor
|
||||||
*/
|
*/
|
||||||
removeAt(source, position){
|
removeAt(source, position, moveCaret){
|
||||||
if(this.simpleKeyboardInstance.caretPosition === 0){
|
if(this.simpleKeyboardInstance.caretPosition === 0){
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
@@ -287,10 +292,10 @@ class Utilities {
|
|||||||
|
|
||||||
if(emojiMatched){
|
if(emojiMatched){
|
||||||
output = source.substr(0, (position - 2)) + source.substr(position);
|
output = source.substr(0, (position - 2)) + source.substr(position);
|
||||||
this.updateCaretPos(2, true);
|
if(moveCaret) this.updateCaretPos(2, true);
|
||||||
} else {
|
} else {
|
||||||
output = source.substr(0, (position - 1)) + source.substr(position);
|
output = source.substr(0, (position - 1)) + source.substr(position);
|
||||||
this.updateCaretPos(1, true);
|
if(moveCaret) this.updateCaretPos(1, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
prevTwoChars = source.slice(-2);
|
prevTwoChars = source.slice(-2);
|
||||||
@@ -298,13 +303,17 @@ class Utilities {
|
|||||||
|
|
||||||
if(emojiMatched){
|
if(emojiMatched){
|
||||||
output = source.slice(0, -2);
|
output = source.slice(0, -2);
|
||||||
this.updateCaretPos(2, true);
|
if(moveCaret) this.updateCaretPos(2, true);
|
||||||
} else {
|
} else {
|
||||||
output = source.slice(0, -1);
|
output = source.slice(0, -1);
|
||||||
this.updateCaretPos(1, true);
|
if(moveCaret) this.updateCaretPos(1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.simpleKeyboardInstance.options.debug && moveCaret){
|
||||||
|
console.log("Caret at:", this.simpleKeyboardInstance.caretPosition);
|
||||||
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -319,7 +328,6 @@ class Utilities {
|
|||||||
let currentInput = inputObj[options.inputName];
|
let currentInput = inputObj[options.inputName];
|
||||||
let condition = currentInput.length === maxLength;
|
let condition = currentInput.length === maxLength;
|
||||||
|
|
||||||
|
|
||||||
if(
|
if(
|
||||||
/**
|
/**
|
||||||
* If pressing this button won't add more characters
|
* If pressing this button won't add more characters
|
||||||
|
|||||||
+109
-79
File diff suppressed because one or more lines are too long
+9
-9
@@ -58,9 +58,9 @@
|
|||||||
<td data-ice="filePath"><span><a href="file/src/demo/App.js.html">src/demo/App.js</a></span></td>
|
<td data-ice="filePath"><span><a href="file/src/demo/App.js.html">src/demo/App.js</a></span></td>
|
||||||
<td data-ice="identifier" class="identifiers"><span><a href="class/src/demo/App.js~App.html">App</a></span></td>
|
<td data-ice="identifier" class="identifiers"><span><a href="class/src/demo/App.js~App.html">App</a></span></td>
|
||||||
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">8/8</span></td>
|
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">8/8</span></td>
|
||||||
<td style="display: none;" data-ice="size">1921 byte</td>
|
<td style="display: none;" data-ice="size">2019 byte</td>
|
||||||
<td style="display: none;" data-ice="lines">84</td>
|
<td style="display: none;" data-ice="lines">88</td>
|
||||||
<td style="display: none;" data-ice="updated">2018-11-05 16:32:42 (UTC)</td>
|
<td style="display: none;" data-ice="updated">2018-11-02 19:39:25 (UTC)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-ice="file">
|
<tr data-ice="file">
|
||||||
<td data-ice="filePath"><span><a href="file/src/demo/index.js.html">src/demo/index.js</a></span></td>
|
<td data-ice="filePath"><span><a href="file/src/demo/index.js.html">src/demo/index.js</a></span></td>
|
||||||
@@ -74,9 +74,9 @@
|
|||||||
<td data-ice="filePath"><span><a href="file/src/lib/components/Keyboard.js.html">src/lib/components/Keyboard.js</a></span></td>
|
<td data-ice="filePath"><span><a href="file/src/lib/components/Keyboard.js.html">src/lib/components/Keyboard.js</a></span></td>
|
||||||
<td data-ice="identifier" class="identifiers"><span><a href="class/src/lib/components/Keyboard.js~SimpleKeyboard.html">SimpleKeyboard</a></span></td>
|
<td data-ice="identifier" class="identifiers"><span><a href="class/src/lib/components/Keyboard.js~SimpleKeyboard.html">SimpleKeyboard</a></span></td>
|
||||||
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">41/41</span></td>
|
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">41/41</span></td>
|
||||||
<td style="display: none;" data-ice="size">24443 byte</td>
|
<td style="display: none;" data-ice="size">24880 byte</td>
|
||||||
<td style="display: none;" data-ice="lines">759</td>
|
<td style="display: none;" data-ice="lines">774</td>
|
||||||
<td style="display: none;" data-ice="updated">2018-11-05 16:42:42 (UTC)</td>
|
<td style="display: none;" data-ice="updated">2018-11-02 21:51:35 (UTC)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-ice="file">
|
<tr data-ice="file">
|
||||||
<td data-ice="filePath"><span><a href="file/src/lib/index.js.html">src/lib/index.js</a></span></td>
|
<td data-ice="filePath"><span><a href="file/src/lib/index.js.html">src/lib/index.js</a></span></td>
|
||||||
@@ -106,9 +106,9 @@
|
|||||||
<td data-ice="filePath"><span><a href="file/src/lib/services/Utilities.js.html">src/lib/services/Utilities.js</a></span></td>
|
<td data-ice="filePath"><span><a href="file/src/lib/services/Utilities.js.html">src/lib/services/Utilities.js</a></span></td>
|
||||||
<td data-ice="identifier" class="identifiers"><span><a href="class/src/lib/services/Utilities.js~Utilities.html">Utilities</a></span></td>
|
<td data-ice="identifier" class="identifiers"><span><a href="class/src/lib/services/Utilities.js~Utilities.html">Utilities</a></span></td>
|
||||||
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">15/15</span></td>
|
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">15/15</span></td>
|
||||||
<td style="display: none;" data-ice="size">10567 byte</td>
|
<td style="display: none;" data-ice="size">11188 byte</td>
|
||||||
<td style="display: none;" data-ice="lines">352</td>
|
<td style="display: none;" data-ice="lines">360</td>
|
||||||
<td style="display: none;" data-ice="updated">2018-10-03 17:11:36 (UTC)</td>
|
<td style="display: none;" data-ice="updated">2018-11-02 22:28:58 (UTC)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr data-ice="file">
|
<tr data-ice="file">
|
||||||
<td data-ice="filePath"><span><a href="file/src/lib/tests/TestUtility.js.html">src/lib/tests/TestUtility.js</a></span></td>
|
<td data-ice="filePath"><span><a href="file/src/lib/tests/TestUtility.js.html">src/lib/tests/TestUtility.js</a></span></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user