hammerjs / hammerjs.github.io Goto Github PK
View Code? Open in Web Editor NEWWebsite
Home Page: https://hammerjs.github.io
Website
Home Page: https://hammerjs.github.io
I'm looking at http://hammerjs.github.io/touch-emulator/ and using the bookmarklet to setup the fake touch.
When I drag and drop with shift, I see the 2 dots, but no pinch happening.
Tap gestures is not working on iOS 9 and I saw that the support is still not there for iOS 9. Is there any date decided for its release? If not, is there any alternative to fix it for now ? Thanks.
I'm writing you as a new user of Hammer. I can't get start with the very first simplest example in getting started page.
var hammertime = new Hammer(myElement, myOptions);
hammertime.on('pan', function(ev) {
console.log(ev);
});
myElement is clear enought, ok. myOptions is...? Some option I might want, ok, but you don't say anything about it. myOptions = null or {} gives me something like 'Uncaught TypeError: Cannot read property 'addEventListener' of null'.
I'm not expecting help here. I'm just telling you that the getting start may put away some new users.
I am seeing events fired consistently but do not see isFirst
set consistently on Pan and Pinch events. On Pan events, isFinal
is set to true consistently, but on Pinch events isFinal
is not set correctly.
It looks like eventType
consistently returns a 4 a the end of an event, but does not consistently return a value of 1 when pan and pinch events start.
Other details:
51.0.2704.63
Here is my setup code:
var tlFrame = this.$.tlFrame;
var mc = new Hammer(tlFrame);
mc.on("pan", function(e) {
_self.handleTrack(e);
});
mc.get('pinch').set({ enable: true });
mc.on('pinch', function(e) {
_self.pinchScale = e.scale;
if (e.eventType === 1) _self.consoleLog('[PINCH] Start');
if (e.eventType === 4) _self.consoleLog('[PINCH] End');
});
When I do 4 pinch actions on my laptop touchscreen, this is the console output I see:
I had this angular page.. working just fine ssr after correcting J's errors in code manually... But I started the same setup yesterday. And now no error messages anywhere to fix. And ever hammer element stuck. I use linode server Debian. With ssl secured signing. But it worked a month ago I tested 2 diff projects same silent error.
If no difference running nose or pm2.
But in dev setup locally it runs fine but not on server. Normally I'd get some errors to fix in logs but nothing at all and linode wanted me to report bug so here I am!
Cheers
Hey. I am using HammerJs with Angular. On Android the pan-event is working as expected, but on iOS it does not seem to work. Has anyone an idea what the problem could be?
Probably related to Mozilla re-enabling touch-event support on Windows desktops.
In tips.md and the PreventGhostClick gist, the link to the article is dead. https://gist.github.com/jtangelder/361052976f044200ea17#file-preventghostclick-js-L5
Here is a link to an archive of the article: https://web.archive.org/web/20130616015724/https://developers.google.com/mobile/articles/fast_buttons
The RecognizeWith with Pinch and Rotate pen linked to from http://hammerjs.github.io/examples/ has a typo.
This
var rotate = new Hammer.Rotation();
should be
var rotate = new Hammer.Rotate();
Hammer.js version 2.0.8
Pan
doesn't work as expected in Firefox (normal mouse). Panend
never fires.
Works fine in Chrome and Safari.
Hi,
I wanted to scale/pinch to zoom in/out my canvas but was not able to do it using the pinch event from my Desktop. Is there an easier tutorial how to do it? I saw that you have implemented in "http://cdn.rawgit.com/hammerjs/touchemulator/master/tests/manual/hammer.html" but too many to bind of event e.g. pan, swipe, rotate. I only need to scale the canvas without rotating the element. Below is the initialization based on your tutorial.
var hm = new Hammer.Manager(canvas);
hm.on("pinchstart pinchmove", onPinch);
And I want to mock the pinch by using your touch-emulator.js. but not so sure how to use this. the touch event is triggering but I guess we need a little tweak since the event properties return from the touch-emulator is different from the pinch event. Any suggestion to make it simplier? :D
The following DOM Elements get about every second a click from Selenium tests
Between them other actions taking place and the JS engine is quite busy.
<div class="taptest" (tap)="onTap($event)">
</div>
<div class="clicktest" (click)="onClick($event)">
</div>
public onTap(event: any) {
countTaps();
}
public onClick(event: any) {
countClicks();
}
Out of 1000 clicks:
Just in case somebody else has same or similar problem.
Versions used:
V8 engine (https://v8.dev/blog/v8-release-49) Chromium v49 (no pointerEvents)
Hammerjs 2.0.8
Angular 8.2.14
I wonder if you want to request the domain hammer.js.org
at JS.ORG for free (its just an alias, hammerjs.github.io will still work)
PanStart, Pan, Panend is working fine in iOS device. But PanEnd is not working in Android device. It collapse the whole functionality. Is there any solution for this?
At https://hammerjs.github.io/api
click on any of the first few links in the list at the top of the page (under "General API").
They are broken deep links that are supposed to link to #anchors in the page which don't exist.
For example:
https://hammerjs.github.io/api/#hammer-defaults
https://hammerjs.github.io/api/#hammer-manager
None of these scrolls to the corresponding section of the page.
This page:
https://github.com/hammerjs/hammerjs.github.io/blob/master/browser-support.md
seems to be missing some useful support information:
Could the table be updated
Is the maintainer of this project still around? There are a lot of good PR's that haven't been pulled, and they are getting old. There are dead links on the main page. There is a PR that fixes this. It has been sitting there ready to be pulled. Nobody appears to be around to pull it...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.