Skip to content

Commit

Permalink
v1.3.0-rc.3+sha.072b984
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Nov 17, 2017
1 parent 072b984 commit 056dc79
Show file tree
Hide file tree
Showing 14 changed files with 294 additions and 707 deletions.
2 changes: 1 addition & 1 deletion dist/docs/Interactable.html
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ <h4 class="name" id="dropzone"><span class="type-signature"></span>dropzone<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_actions_drop.js.html">src/actions/drop.js</a>, <a href="src_actions_drop.js.html#line322">line 322</a>
<a href="src_actions_drop.js.html">src/actions/drop.js</a>, <a href="src_actions_drop.js.html#line320">line 320</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion dist/docs/doclets.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/docs/module-interact.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h4 class="name" id=".dynamicDrop"><span class="type-signature">(static) </span>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_actions_drop.js.html">src/actions/drop.js</a>, <a href="src_actions_drop.js.html#line449">line 449</a>
<a href="src_actions_drop.js.html">src/actions/drop.js</a>, <a href="src_actions_drop.js.html#line447">line 447</a>
</li></ul></dd>


Expand Down Expand Up @@ -575,7 +575,7 @@ <h4 class="name" id=".maxInteractions"><span class="type-signature">(static) </s

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_autoStart_base.js.html">src/autoStart/base.js</a>, <a href="src_autoStart_base.js.html#line249">line 249</a>
<a href="src_autoStart_base.js.html">src/autoStart/base.js</a>, <a href="src_autoStart_base.js.html#line243">line 243</a>
</li></ul></dd>


Expand Down
20 changes: 9 additions & 11 deletions dist/docs/src_Interactable.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ <h1 class="page-title">src/Interactable.js</h1>
getElementRect,
nodeContains,
trySelector,
} = require('./utils/domUtils');
const { getWindow } = require('./utils/window');
const { indexOf, contains } = require('./utils/arr');
const { wheelEvent } = require('./utils/browser');
} = require('./utils/domUtils');
const { getWindow } = require('./utils/window');
const { contains } = require('./utils/arr');
const { wheelEvent } = require('./utils/browser');

// all set interactables
scope.interactables = [];
Expand Down Expand Up @@ -245,8 +245,8 @@ <h1 class="page-title">src/Interactable.js</h1>
}

if (is.array(eventType)) {
for (let i = 0; i &lt; eventType.length; i++) {
this[method](eventType[i], listener, options);
for (const type of eventType) {
this[method](type, listener, options);
}

return true;
Expand Down Expand Up @@ -403,7 +403,7 @@ <h1 class="page-title">src/Interactable.js</h1>

signals.fire('unset', { interactable: this });

scope.interactables.splice(indexOf(scope.interactables, this), 1);
scope.interactables.splice(scope.interactables.indexOf(this), 1);

// Stop related interactions when an Interactable is unset
for (const interaction of scope.interactions || []) {
Expand Down Expand Up @@ -436,16 +436,14 @@ <h1 class="page-title">src/Interactable.js</h1>
};

scope.interactables.forEachSelector = function (callback, element) {
for (let i = 0; i &lt; this.length; i++) {
const interactable = this[i];

for (const interactable of this) {
// skip non CSS selector targets and out of context elements
if (!is.string(interactable.target)
|| (element &amp;&amp; !interactable.inContext(element))) {
continue;
}

const ret = callback(interactable, interactable.target, interactable._context, i, this);
const ret = callback(interactable, interactable.target);

if (ret !== undefined) {
return ret;
Expand Down
16 changes: 6 additions & 10 deletions dist/docs/src_Interaction.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ <h1 class="page-title">src/Interaction.js</h1>

// if this interaction had been removed after stopping
// add it back
if (utils.indexOf(scope.interactions, this) === -1) {
if (scope.interactions.indexOf(this) === -1) {
scope.interactions.push(this);
}

Expand Down Expand Up @@ -361,7 +361,7 @@ <h1 class="page-title">src/Interaction.js</h1>
return 0;
}

return utils.indexOf(this.pointerIds, utils.getPointerId(pointer));
return this.pointerIds.indexOf(utils.getPointerId(pointer));
}

updatePointer (pointer, event, down = event &amp;&amp; /(down|start)$/i.test(event.type)) {
Expand Down Expand Up @@ -413,9 +413,7 @@ <h1 class="page-title">src/Interaction.js</h1>
}
}

for (let i = 0, len = methodNames.length; i &lt; len; i++) {
const method = methodNames[i];

for (const method of methodNames) {
listeners[method] = doOnInteractions(method);
}

Expand All @@ -428,8 +426,8 @@ <h1 class="page-title">src/Interaction.js</h1>
if (browser.supportsTouch &amp;&amp; /touch/.test(event.type)) {
prevTouchTime = new Date().getTime();

for (let i = 0; i &lt; event.changedTouches.length; i++) {
const pointer = event.changedTouches[i];
for (const changedTouch of event.changedTouches) {
const pointer = changedTouch;
const interaction = finder.search(pointer, event.type, eventTarget);

matches.push([pointer, interaction || new Interaction({ pointerType })]);
Expand Down Expand Up @@ -471,9 +469,7 @@ <h1 class="page-title">src/Interaction.js</h1>
}

function endAll (event) {
for (let i = 0; i &lt; scope.interactions.length; i++) {
const interaction = scope.interactions[i];

for (const interaction of scope.interactions) {
interaction.end(event);
signals.fire('endall', { event, interaction });
}
Expand Down
4 changes: 1 addition & 3 deletions dist/docs/src_actions_drop.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ <h1 class="page-title">src/actions/drop.js</h1>
? current._context.querySelectorAll(current.target)
: [current.target];

for (let i = 0; i &lt; dropElements.length; i++) {
const currentElement = dropElements[i];

for (const currentElement of dropElements) {
if (currentElement !== element) {
drops.push(current);
elements.push(currentElement);
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/src_actions_resize.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h1 class="page-title">src/actions/resize.js</h1>
return null;
},

cursors: (browser.isIe9OrOlder ? {
cursors: (browser.isIe9 ? {
x : 'e-resize',
y : 's-resize',
xy: 'se-resize',
Expand Down
12 changes: 3 additions & 9 deletions dist/docs/src_autoStart_base.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ <h1 class="page-title">src/autoStart/base.js</h1>
const Interaction = require('../Interaction');
const actions = require('../actions/base');
const defaultOptions = require('../defaultOptions');
const browser = require('../utils/browser');
const scope = require('../scope');
const utils = require('../utils');
const signals = require('../utils/Signals').new();
Expand Down Expand Up @@ -161,12 +160,8 @@ <h1 class="page-title">src/autoStart/base.js</h1>
let element = eventTarget;
let action = null;

function pushMatches (interactable, selector, context) {
const elements = (browser.useMatchesSelectorPolyfill
? context.querySelectorAll(selector)
: undefined);

if (utils.matchesSelector(element, selector, elements)) {
function pushMatches (interactable, selector) {
if (utils.matchesSelector(element, selector)) {

matches.push(interactable);
matchElements.push(element);
Expand Down Expand Up @@ -246,8 +241,7 @@ <h1 class="page-title">src/autoStart/base.js</h1>
// no actions if any of these values == 0
if (!(maxActions &amp;&amp; maxPerElement &amp;&amp; autoStart.maxInteractions)) { return; }

for (let i = 0, len = scope.interactions.length; i &lt; len; i++) {
const interaction = scope.interactions[i];
for (const interaction of scope.interactions) {
const otherAction = interaction.prepared.name;

if (!interaction.interacting()) { continue; }
Expand Down
2 changes: 1 addition & 1 deletion dist/docs/src_interact.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h1 class="page-title">src/interact.js</h1>
let index;

if (type in globalEvents
&amp;&amp; (index = utils.indexOf(globalEvents[type], listener)) !== -1) {
&amp;&amp; (index = globalEvents[type].indexOf(listener)) !== -1) {
globalEvents[type].splice(index, 1);
}
}
Expand Down
Loading

0 comments on commit 056dc79

Please sign in to comment.