Comments (3)
I wrote the simulate
method to allow starting an action sequence without a mouse down. "simulate" is probably not the best name to have chosen. If you want to fire InteractEvents on an interactable you can use Interactable#fire
:
interact(divElement).fire(eventToSimulate);
from interact.js.
Thanks, taye. Could you elaborate on the purpose of simulate? It seems like "starting an action sequence" would trigger the actionChecker function, however, replacing:
interact(divElement).draggable({
onstart: function(event) {
console.log(event);
eventToSimulate = event;
}
});
in the repro with:
interact(divElement).actionChecker(function(event) {
console.log(event);
eventToSimulate = event;
return "drag";
});
also fails to log anything to the console when eventToSimulate is assigned and and used in a call to interact.simulate.
from interact.js.
The idea behind the method was to allow you to enter an action sequence programatically without the initial touchstart or pointerdown event. The call to simulate would fire a start event and then any further pointer movement would fire move events on the target element.
"startAction" would be a more suitable name and it should be an Interactable method. I actually thought that I had removed the documentation for the function to avoid confusion.
from interact.js.
Related Issues (20)
- Missing TypeScript types (e.g. `styleCursor` option) HOT 1
- Issue on dropzones with 1.10.20 release HOT 7
- How to implement elements snapping to each other functionality? HOT 1
- @Interacrt/Interact cannot trigger the move event
- draggable and gesturable div, behavior lock with inertia
- Issue with Module Parsing in Project Using react-multi-crops HOT 3
- Vite production builds fail after v1.10.25
- TypeScript compile errors - version 1.10.26 HOT 4
- Resize modifier - wrong types HOT 1
- Gestures not working in ShadowDom
- Incompatible with Angular (v17) HOT 3
- New Snap syntax not working HOT 1
- Can't drag element when wrap drag item inside div HOT 1
- Restricting a drag with parent as origin. HOT 4
- Set snap on or off by user
- Demo Page down (https://interactjs.io/) HOT 1
- Is there a way to set the z-index of dropactive?
- interactjs.io is down
- mouseButtons typescript type definitions
- Web server is down (interactjs.io) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interact.js.