@interactjs/reflow
Advanced tools
Comparing version 1.9.17 to 1.9.18
{ | ||
"name": "@interactjs/reflow", | ||
"version": "1.9.17", | ||
"version": "1.9.18", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@interactjs/core": "1.9.17", | ||
"@interactjs/utils": "1.9.17" | ||
"@interactjs/core": "1.9.18", | ||
"@interactjs/utils": "1.9.18" | ||
}, | ||
"devDependencies": { | ||
"promise-polyfill": "latest" | ||
}, | ||
"optionalDependencies": { | ||
"@interactjs/interact": "1.9.17" | ||
"@interactjs/interact": "1.9.18" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "1f894f19" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import Interactable from "../core/Interactable.js"; | ||
import { Interactable } from "../core/Interactable.js"; | ||
import { Interaction } from "../core/Interaction.js"; | ||
@@ -3,0 +3,0 @@ import * as arr from "../utils/arr.js"; |
@@ -1,2 +0,2 @@ | ||
import e from"../core/Interactable.min.js";import{Interaction as t}from"../core/Interaction.min.js";import*as o from"../utils/arr.min.js";import n from"../utils/extend.min.js";import r from"../utils/is.min.js";import*as i from"../utils/pointerUtils.min.js";import{tlbrToXywh as s}from"../utils/rect.min.js";export function install(e){const{Interactable:t}=e;e.actions.phases.reflow=!0,t.prototype.reflow=function(t){return function(e,t,n){const a=r.string(e.target)?o.from(e._context.querySelectorAll(e.target)):[e.target],m=n.window.Promise,c=m?[]:null;for(const r of a){const a=e.getRect(r);if(!a)break;const p=o.find(n.interactions.list,o=>o.interacting()&&o.interactable===e&&o.element===r&&o.prepared.name===t.name);let f;if(p)p.move(),c&&(f=p._reflowPromise||new m(e=>{p._reflowResolve=e}));else{const o=s(a),m={page:{x:o.x,y:o.y},client:{x:o.x,y:o.y},timeStamp:n.now()},c=i.coordsToEvent(m);f=l(n,e,r,t,c)}c&&c.push(f)}return c&&m.all(c).then(()=>e)}(this,t,e)}}function l(e,t,o,r,i){const s=e.interactions.new({pointerType:"reflow"}),l={interaction:s,event:i,pointer:i,eventTarget:o,phase:"reflow"};s.interactable=t,s.element=o,s.prepared=n({},r),s.prevEvent=i,s.updatePointer(i,i,o,!0),s._doPhase(l);const a=e.window.Promise,m=a?new a(e=>{s._reflowResolve=e}):null;return s._reflowPromise=m,s.start(r,t,o),s._interacting?(s.move(l),s.end(i)):s.stop(),s.removePointer(i,i),s.pointerIsDown=!1,m}export default{id:"reflow",install:install,listeners:{"interactions:stop"({interaction:e},t){"reflow"===e.pointerType&&(e._reflowResolve&&e._reflowResolve(),o.remove(t.interactions.list,e))}}}; | ||
import{Interactable as e}from"../core/Interactable.min.js";import{Interaction as t}from"../core/Interaction.min.js";import*as o from"../utils/arr.min.js";import n from"../utils/extend.min.js";import r from"../utils/is.min.js";import*as i from"../utils/pointerUtils.min.js";import{tlbrToXywh as s}from"../utils/rect.min.js";export function install(e){const{Interactable:t}=e;e.actions.phases.reflow=!0,t.prototype.reflow=function(t){return function(e,t,n){const a=r.string(e.target)?o.from(e._context.querySelectorAll(e.target)):[e.target],m=n.window.Promise,c=m?[]:null;for(const r of a){const a=e.getRect(r);if(!a)break;const p=o.find(n.interactions.list,o=>o.interacting()&&o.interactable===e&&o.element===r&&o.prepared.name===t.name);let f;if(p)p.move(),c&&(f=p._reflowPromise||new m(e=>{p._reflowResolve=e}));else{const o=s(a),m={page:{x:o.x,y:o.y},client:{x:o.x,y:o.y},timeStamp:n.now()},c=i.coordsToEvent(m);f=l(n,e,r,t,c)}c&&c.push(f)}return c&&m.all(c).then(()=>e)}(this,t,e)}}function l(e,t,o,r,i){const s=e.interactions.new({pointerType:"reflow"}),l={interaction:s,event:i,pointer:i,eventTarget:o,phase:"reflow"};s.interactable=t,s.element=o,s.prepared=n({},r),s.prevEvent=i,s.updatePointer(i,i,o,!0),s._doPhase(l);const a=e.window.Promise,m=a?new a(e=>{s._reflowResolve=e}):null;return s._reflowPromise=m,s.start(r,t,o),s._interacting?(s.move(l),s.end(i)):s.stop(),s.removePointer(i,i),s.pointerIsDown=!1,m}export default{id:"reflow",install:install,listeners:{"interactions:stop"({interaction:e},t){"reflow"===e.pointerType&&(e._reflowResolve&&e._reflowResolve(),o.remove(t.interactions.list,e))}}}; | ||
//# sourceMappingURL=plugin.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28530
0