Skip to content

Commit

Permalink
v1.4.0-alpha.6+sha.194d23e
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Jun 4, 2018
1 parent 194d23e commit bafadcc
Show file tree
Hide file tree
Showing 13 changed files with 490 additions and 459 deletions.
4 changes: 0 additions & 4 deletions dist/docs/actions_drag.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ <h1 class="page-title">actions/drag.js</h1>
if (is.bool(options)) {
this.options.drag.enabled = options;

if (!options) {
this.ondragstart = this.ondragstart = this.ondragend = null;
}

return this;
}

Expand Down
5 changes: 0 additions & 5 deletions dist/docs/actions_drop_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,6 @@ <h1 class="page-title">actions/drop/index.js</h1>
if (utils.is.bool(options)) {
interactable.options.drop.enabled = options;

if (!options) {
interactable.ondragenter = interactable.ondragleave = interactable.ondrop
= interactable.ondropactivate = interactable.ondropdeactivate = null;
}

return interactable;
}

Expand Down
4 changes: 0 additions & 4 deletions dist/docs/actions_gesture.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ <h1 class="page-title">actions/gesture.js</h1>
if (utils.is.bool(options)) {
this.options.gesture.enabled = options;

if (!options) {
this.ongesturestart = this.ongesturestart = this.ongestureend = null;
}

return this;
}

Expand Down
4 changes: 0 additions & 4 deletions dist/docs/actions_resize.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@ <h1 class="page-title">actions/resize.js</h1>
if (utils.is.bool(options)) {
this.options.resize.enabled = options;

if (!options) {
this.onresizestart = this.onresizestart = this.onresizeend = null;
}

return this;
}
return this.options.resize;
Expand Down
17 changes: 14 additions & 3 deletions dist/docs/autoStart_base.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1 class="page-title">autoStart/base.js</h1>
const target = interaction.target;

if (target &amp;&amp; target.options.styleCursor) {
target._doc.documentElement.style.cursor = '';
setCursor(interaction.element, '', scope);
}
});

Expand Down Expand Up @@ -140,6 +140,7 @@ <h1 class="page-title">autoStart/base.js</h1>
// Allow this many interactions to happen simultaneously
maxInteractions: Infinity,
withinInteractionLimit,
cursorElement: null,
signals: new Signals(),
};
}
Expand Down Expand Up @@ -214,7 +215,7 @@ <h1 class="page-title">autoStart/base.js</h1>
action = action || {};

if (interaction.target &amp;&amp; interaction.target.options.styleCursor) {
interaction.target._doc.documentElement.style.cursor = '';
setCursor(interaction.element, '', scope);
}

interaction.target = target;
Expand All @@ -223,7 +224,7 @@ <h1 class="page-title">autoStart/base.js</h1>

if (target &amp;&amp; target.options.styleCursor) {
const cursor = action? scope.actions[action.name].getCursor(action) : '';
interaction.target._doc.documentElement.style.cursor = cursor;
setCursor(interaction.element, cursor, scope);
}

scope.autoStart.signals.fire('prepared', { interaction: interaction });
Expand Down Expand Up @@ -282,6 +283,16 @@ <h1 class="page-title">autoStart/base.js</h1>
return scope.autoStart.maxInteractions;
}

function setCursor (element, cursor, scope) {
if (scope.autoStart.cursorElement) {
scope.autoStart.cursorElement.style.cursor = '';
}

element.ownerDocument.documentElement.style.cursor = cursor;
element.style.cursor = cursor;
scope.autoStart.cursorElement = cursor ? element : null;
}

export default {
init,
maxInteractions,
Expand Down
19 changes: 9 additions & 10 deletions dist/docs/core_interactablePreventDefault.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ <h1 class="page-title">core/interactablePreventDefault.js</h1>

<section>
<article>
<pre class="prettyprint source linenums"><code>import * as is from '@interactjs/utils/is';
import events from '@interactjs/utils/events';
import browser from '@interactjs/utils/browser';
<pre class="prettyprint source linenums"><code>import * as is from '@interactjs/utils/is';
import events from '@interactjs/utils/events';

import { nodeContains, matchesSelector } from '@interactjs/utils/domUtils';
import { getWindow } from '@interactjs/utils/window';
Expand Down Expand Up @@ -74,12 +73,12 @@ <h1 class="page-title">core/interactablePreventDefault.js</h1>

// setting === 'auto'

// don't preventDefault of touch{start,move} events if the browser supports passive
// events listeners. CSS touch-action and user-selecct should be used instead
if (events.supportsPassive
&amp;&amp; /^touch(start|move)$/.test(event.type)
&amp;&amp; !browser.isIOS) {
const docOptions = scope.getDocIndex(getWindow(event.target).document);
// if the browser supports passive event listeners and isn't running on iOS,
// don't preventDefault of touch{start,move} events. CSS touch-action and
// user-select should be used instead of calling event.preventDefault().
if (events.supportsPassive &amp;&amp; /^touch(start|move)$/.test(event.type)) {
const doc = getWindow(event.target).document;
const docOptions = scope.getDocOptions(doc);

if (!(docOptions &amp;&amp; docOptions.events) || docOptions.events.passive !== false) {
return;
Expand Down Expand Up @@ -116,7 +115,7 @@ <h1 class="page-title">core/interactablePreventDefault.js</h1>
* - `'never'` to never prevent
* - `'auto'` to let interact.js try to determine what would be best
*
* @param {string} [newValue] `true`, `false` or `'auto'`
* @param {string} [newValue] `'always'`, `'never'` or `'auto'`
* @return {string | Interactable} The current setting or this Interactable
*/
Interactable.prototype.preventDefault = function (newValue) {
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/doclets.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/docs/styles/jsdoc-default.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ blockquote {
width: calc(100% - 240px);
padding: 0;
min-width: initial; }
#main > *:not(section):not(ol):not(ul), #main .article > *:not(section):not(ol):not(ul) {
#main > * , #main .article > * {
padding-left: 10px;
padding-right: 10px; }

Expand Down
Loading

0 comments on commit bafadcc

Please sign in to comment.