Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
[FIX] Pointer events for Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainCscn committed Mar 20, 2018
1 parent 2d79134 commit 07ae57d
Show file tree
Hide file tree
Showing 13 changed files with 3,469 additions and 3,197 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [v4.1.2](https://github.com/MyScript/MyScriptJS/tree/v4.1.2)

## Bug fixed

- Pointer move was not detected on new Firefox 59 due to support for pointer events

# [v4.1.1](https://github.com/MyScript/MyScriptJS/tree/v4.1.1)

## Features
Expand Down
2 changes: 1 addition & 1 deletion dist/myscript.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/myscript.min.js.map

Large diffs are not rendered by default.

6,581 changes: 3,420 additions & 3,161 deletions docs/ast/source/grabber/PointerEventGrabber.js.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dump.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/file/src/grabber/PointerEventGrabber.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@

function pointerDownHandler(evt) { // Trigger a pointerDown
const pointerDownOnEditor = evt.target.id === editor.domElement.id || evt.target.classList.contains('ms-canvas');
if (this.activePointerId) {
if (this.activePointerId !== undefined) {
if (this.activePointerId === evt.pointerId) {
logger.trace(`${evt.type} event with the same id without any pointer up`, evt.pointerId);
}
Expand All @@ -384,7 +384,7 @@

function pointerMoveHandler(evt) { // Trigger a pointerMove
// Only considering the active pointer
if (this.activePointerId && this.activePointerId === evt.pointerId) {
if (this.activePointerId !== undefined && this.activePointerId === evt.pointerId) {
unfocus();
editor.pointerMove(extractPoint(evt, element, editor.configuration, offsetTop, offsetLeft));
} else if (this.smartGuidePointerDown) {
Expand Down Expand Up @@ -419,7 +419,7 @@
const pointerMovedWords = evt.relatedTarget && evt.target && (evt.target.tagName === 'SPAN' || evt.relatedTarget.tagName === 'SPAN');
if (pointerEnteredSmartGuide || pointerExitedSmartGuide || pointerMovedWords) {
evt.stopPropagation();
} else if (this.activePointerId && this.activePointerId === evt.pointerId) { // Only considering the active pointer
} else if (this.activePointerId !== undefined && this.activePointerId === evt.pointerId) { // Only considering the active pointer
this.activePointerId = undefined; // Managing the active pointer
evt.stopPropagation();
editor.pointerUp(extractPoint(evt, element, editor.configuration, offsetTop, offsetLeft));
Expand Down
11 changes: 9 additions & 2 deletions docs/manual/changelog/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
<div data-ice="manual" data-toc-name="changelog">
<ul class="manual-toc">

<li data-ice="manualNav" class="indent-h1 manual-color manual-color-changelog" data-section-count="&#x25A0;&#x25A0;&#x25A0;&#x25A0;" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#-v4-1-1-https-github-com-myscript-myscriptjs-tree-v4-1-1-" data-ice="link">v4.1.1</a></li>
<li data-ice="manualNav" class="indent-h1 manual-color manual-color-changelog" data-section-count="&#x25A0;&#x25A0;&#x25A0;&#x25A0;" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#-v4-1-2-https-github-com-myscript-myscriptjs-tree-v4-1-2-" data-ice="link">v4.1.2</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#bug-fixed" data-ice="link">Bug fixed</a></li>
<li data-ice="manualNav" class="indent-h1 manual-color manual-color-changelog" data-section-count="&#x25A0;&#x25A0;&#x25A0;&#x25A0;" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#-v4-1-1-https-github-com-myscript-myscriptjs-tree-v4-1-1-" data-ice="link">v4.1.1</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#features" data-ice="link">Features</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#bugs-fixed" data-ice="link">Bugs fixed</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#breaking-changes" data-ice="link">Breaking changes</a></li>
Expand All @@ -70,7 +72,12 @@
<span>&#xBB;</span>
<span data-ice="title">Changelog</span>
</div>
<div data-ice="content"><h1 id="-v4-1-1-https-github-com-myscript-myscriptjs-tree-v4-1-1-"><a href="https://github.com/MyScript/MyScriptJS/tree/v4.1.1">v4.1.1</a></h1>
<div data-ice="content"><h1 id="-v4-1-2-https-github-com-myscript-myscriptjs-tree-v4-1-2-"><a href="https://github.com/MyScript/MyScriptJS/tree/v4.1.2">v4.1.2</a></h1>
<h2 id="bug-fixed">Bug fixed</h2>
<ul>
<li>Pointer move was not detected on new Firefox 59 due to support for pointer events</li>
</ul>
<h1 id="-v4-1-1-https-github-com-myscript-myscriptjs-tree-v4-1-1-"><a href="https://github.com/MyScript/MyScriptJS/tree/v4.1.1">v4.1.1</a></h1>
<h2 id="features">Features</h2>
<ul>
<li>New export in <code>myscript.js</code> for better import using frameworks (as React).</li>
Expand Down
4 changes: 3 additions & 1 deletion docs/manual/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
<div data-ice="manual" data-toc-name="changelog">
<ul class="manual-toc">

<li data-ice="manualNav" class="indent-h1 manual-color manual-color-changelog" data-section-count="&#x25A0;&#x25A0;&#x25A0;&#x25A0;" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#-v4-1-1-https-github-com-myscript-myscriptjs-tree-v4-1-1-" data-ice="link">v4.1.1</a></li>
<li data-ice="manualNav" class="indent-h1 manual-color manual-color-changelog" data-section-count="&#x25A0;&#x25A0;&#x25A0;&#x25A0;" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#-v4-1-2-https-github-com-myscript-myscriptjs-tree-v4-1-2-" data-ice="link">v4.1.2</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#bug-fixed" data-ice="link">Bug fixed</a></li>
<li data-ice="manualNav" class="indent-h1 manual-color manual-color-changelog" data-section-count="&#x25A0;&#x25A0;&#x25A0;&#x25A0;" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#-v4-1-1-https-github-com-myscript-myscriptjs-tree-v4-1-1-" data-ice="link">v4.1.1</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#features" data-ice="link">Features</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#bugs-fixed" data-ice="link">Bugs fixed</a></li>
<li data-ice="manualNav" class="indent-h2" data-link="manual/changelog/CHANGELOG.html"><a href="manual/changelog/CHANGELOG.html#breaking-changes" data-ice="link">Breaking changes</a></li>
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"window-mock": "^0.0.13"
},
"scripts": {
"install": "bower install",
"build": "gulp",
"test": "gulp test",
"start": "gulp serve"
Expand Down
40 changes: 20 additions & 20 deletions docs/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
<td class="coverage"><span data-ice="coverage">89 %</span><span data-ice="coverageCount" class="coverage-count">53/59</span></td>
<td style="display: none;" data-ice="size">29045 byte</td>
<td style="display: none;" data-ice="lines">970</td>
<td style="display: none;" data-ice="updated">2018-02-06 14:42:38 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/EditorFacade.js.html">src/EditorFacade.js</a></span></td>
Expand All @@ -291,7 +291,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">2/2</span></td>
<td style="display: none;" data-ice="size">1313 byte</td>
<td style="display: none;" data-ice="lines">29</td>
<td style="display: none;" data-ice="updated">2018-02-02 09:50:32 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-02 10:26:39 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/callback/EventCallback.js.html">src/callback/EventCallback.js</a></span></td>
Expand All @@ -316,7 +316,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">2/2</span></td>
<td style="display: none;" data-ice="size">4741 byte</td>
<td style="display: none;" data-ice="lines">85</td>
<td style="display: none;" data-ice="updated">2018-01-04 15:19:11 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/configuration/DefaultConfiguration.js.html">src/configuration/DefaultConfiguration.js</a></span></td>
Expand All @@ -325,7 +325,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">2/2</span></td>
<td style="display: none;" data-ice="size">4778 byte</td>
<td style="display: none;" data-ice="lines">177</td>
<td style="display: none;" data-ice="updated">2018-02-02 09:51:38 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/configuration/DefaultPenStyle.js.html#errorLines=31,36">src/configuration/DefaultPenStyle.js</a></span></td>
Expand Down Expand Up @@ -379,9 +379,9 @@
<td data-ice="identifier" class="identifiers"><span><a href="function/index.html#static-function-attach">attach</a></span>
<span><a href="function/index.html#static-function-detach">detach</a></span></td>
<td class="coverage"><span data-ice="coverage">50 %</span><span data-ice="coverageCount" class="coverage-count">1/2</span></td>
<td style="display: none;" data-ice="size">8840 byte</td>
<td style="display: none;" data-ice="size">8882 byte</td>
<td style="display: none;" data-ice="lines">193</td>
<td style="display: none;" data-ice="updated">2018-02-02 09:51:38 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:41:52 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/model/InkModel.js.html">src/model/InkModel.js</a></span></td>
Expand All @@ -406,7 +406,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">18/18</span></td>
<td style="display: none;" data-ice="size">11842 byte</td>
<td style="display: none;" data-ice="lines">326</td>
<td style="display: none;" data-ice="updated">2018-01-02 09:38:57 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/model/RecognizerContext.js.html">src/model/RecognizerContext.js</a></span></td>
Expand All @@ -433,7 +433,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">5/5</span></td>
<td style="display: none;" data-ice="size">5177 byte</td>
<td style="display: none;" data-ice="lines">147</td>
<td style="display: none;" data-ice="updated">2018-01-04 15:22:30 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/model/Symbol.js.html">src/model/Symbol.js</a></span></td>
Expand Down Expand Up @@ -462,23 +462,23 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">4/4</span></td>
<td style="display: none;" data-ice="size">4263 byte</td>
<td style="display: none;" data-ice="lines">91</td>
<td style="display: none;" data-ice="updated">2017-12-02 16:29:14 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-05 15:16:00 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/myscript.js.html">src/myscript.js</a></span></td>
<td data-ice="identifier" class="identifiers">-</td>
<td class="coverage"><span data-ice="coverage">-</span></td>
<td style="display: none;" data-ice="size">739 byte</td>
<td style="display: none;" data-ice="lines">31</td>
<td style="display: none;" data-ice="updated">2018-02-02 09:51:38 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 11:28:58 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/recognizer/CryptoHelper.js.html">src/recognizer/CryptoHelper.js</a></span></td>
<td data-ice="identifier" class="identifiers"><span><a href="function/index.html#static-function-computeHmac">computeHmac</a></span></td>
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">1/1</span></td>
<td style="display: none;" data-ice="size">693 byte</td>
<td style="display: none;" data-ice="lines">17</td>
<td style="display: none;" data-ice="updated">2017-09-03 13:17:23 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/recognizer/DefaultRecognizer.js.html">src/recognizer/DefaultRecognizer.js</a></span></td>
Expand Down Expand Up @@ -524,7 +524,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">1/1</span></td>
<td style="display: none;" data-ice="size">887 byte</td>
<td style="display: none;" data-ice="lines">22</td>
<td style="display: none;" data-ice="updated">2017-09-03 13:17:23 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/recognizer/rest/networkInterface.js.html">src/recognizer/rest/networkInterface.js</a></span></td>
Expand All @@ -533,7 +533,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">2/2</span></td>
<td style="display: none;" data-ice="size">3168 byte</td>
<td style="display: none;" data-ice="lines">114</td>
<td style="display: none;" data-ice="updated">2017-09-03 13:17:23 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/recognizer/rest/v3/Cdkv3RestAnalyzerRecognizer.js.html">src/recognizer/rest/v3/Cdkv3RestAnalyzerRecognizer.js</a></span></td>
Expand Down Expand Up @@ -572,7 +572,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">1/1</span></td>
<td style="display: none;" data-ice="size">1438 byte</td>
<td style="display: none;" data-ice="lines">28</td>
<td style="display: none;" data-ice="updated">2017-09-03 13:17:23 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/recognizer/rest/v3/Cdkv3RestShapeRecognizer.js.html">src/recognizer/rest/v3/Cdkv3RestShapeRecognizer.js</a></span></td>
Expand Down Expand Up @@ -659,7 +659,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">1/1</span></td>
<td style="display: none;" data-ice="size">7355 byte</td>
<td style="display: none;" data-ice="lines">159</td>
<td style="display: none;" data-ice="updated">2018-01-04 15:22:30 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/recognizer/websocket/v4/Cdkv4WSIInkRecognizer.js.html#errorLines=204,211,218,57,68,80,89,98">src/recognizer/websocket/v4/Cdkv4WSIInkRecognizer.js</a></span></td>
Expand Down Expand Up @@ -693,7 +693,7 @@
<td class="coverage"><span data-ice="coverage">70 %</span><span data-ice="coverageCount" class="coverage-count">19/27</span></td>
<td style="display: none;" data-ice="size">20030 byte</td>
<td style="display: none;" data-ice="lines">552</td>
<td style="display: none;" data-ice="updated">2018-01-04 15:22:30 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/renderer/QuadraticUtils.js.html">src/renderer/QuadraticUtils.js</a></span></td>
Expand All @@ -716,7 +716,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">6/6</span></td>
<td style="display: none;" data-ice="size">7362 byte</td>
<td style="display: none;" data-ice="lines">200</td>
<td style="display: none;" data-ice="updated">2017-09-06 08:22:19 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-02-06 09:09:22 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/renderer/canvas/ImageRenderer.js.html">src/renderer/canvas/ImageRenderer.js</a></span></td>
Expand All @@ -733,7 +733,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">2/2</span></td>
<td style="display: none;" data-ice="size">4529 byte</td>
<td style="display: none;" data-ice="lines">107</td>
<td style="display: none;" data-ice="updated">2017-09-03 13:17:23 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-05 09:10:03 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/renderer/canvas/symbols/MathSymbolCanvasRenderer.js.html">src/renderer/canvas/symbols/MathSymbolCanvasRenderer.js</a></span></td>
Expand Down Expand Up @@ -793,7 +793,7 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">6/6</span></td>
<td style="display: none;" data-ice="size">7746 byte</td>
<td style="display: none;" data-ice="lines">211</td>
<td style="display: none;" data-ice="updated">2018-01-04 15:21:35 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/renderer/svg/stroker/QuadraticSVGStroker.js.html">src/renderer/svg/stroker/QuadraticSVGStroker.js</a></span></td>
Expand Down Expand Up @@ -821,7 +821,7 @@
<td class="coverage"><span data-ice="coverage">75 %</span><span data-ice="coverageCount" class="coverage-count">3/4</span></td>
<td style="display: none;" data-ice="size">20045 byte</td>
<td style="display: none;" data-ice="lines">503</td>
<td style="display: none;" data-ice="updated">2018-02-02 09:51:38 (UTC)</td>
<td style="display: none;" data-ice="updated">2018-03-03 14:35:08 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/util/ModelStats.js.html">src/util/ModelStats.js</a></span></td>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"window-mock": "^0.0.13"
},
"scripts": {
"install": "bower install",
"build": "gulp",
"test": "gulp test",
"start": "gulp serve"
Expand Down
Loading

0 comments on commit 07ae57d

Please sign in to comment.