Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hammer lib and click event #1108

Open
zaquas77 opened this issue Jun 3, 2021 · 6 comments
Open

Hammer lib and click event #1108

zaquas77 opened this issue Jun 3, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@zaquas77
Copy link

zaquas77 commented Jun 3, 2021

Hi @kenwdelong and @Thomaash have found some solution?

I have the same problem with angular 12.

I have edit this stackblitz. It seem to works until I click a event.
I reciving: Cannot read property 'get' of undefined

The problem seem to be inside the use of hammer lib

this.hammer.get('press').set({
  time: 10000
});

image

I tried without angular and received the same problem

With the vis-timeline 7.4.7 it works!

thanks in advance

Originally posted by @seeiuu in #1022 (comment)

@cloakedninjas
Copy link
Contributor

Similar issue here, just upgrading to Angular 12 and vis-* libs are causing headaches...

Changed all imports to use vis-timeline/esnext, then got complains about missing vis-timeline/utils so installed that. Then got complaints about missing hammerjs

Error: node_modules/vis-util/declarations/shared/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'hammerjs'.

1 /// <reference types="hammerjs" />
                        ~~~~~~~~


Error: node_modules/vis-util/declarations/shared/index.d.ts:5:30 - error TS2304: Cannot find name 'HammerStatic'.

5 export declare const Hammer: HammerStatic;
                               ~~~~~~~~~~~~

Surely these are dependencies that vis-timeline needs to bring in itself ? No?

@kenwdelong
Copy link

I have not been able to get it to work. I am going to try to move to 7.4.4 for my project and see if that works...

@zaquas77 zaquas77 closed this as completed Jun 4, 2021
@zaquas77
Copy link
Author

zaquas77 commented Jun 4, 2021

Sorry I closed by mistake

@cloakedninjas as you see in my stackblitz I had have to import all dependecies in package.conf and (for now) seem to work only with 7.4.7 or bettest with 7.4.6

@kenwdelong you can try with 7.4.7 or bettest with 7.4.6

thanks

@zaquas77 zaquas77 reopened this Jun 4, 2021
@cloakedninjas
Copy link
Contributor

I had have to import all dependecies in package.conf and (for now) seem to work only with 7.4.7 or bettest with 7.4.6

If you need to install xss and hammerjs for it to work, these are not peer dependencies, these are hard dependencies that should be specified in vis-timelines own dependencies package.json

I don't think this is anything specific to Angular 12 Ivy compilation, I'm guessing upgrading to TypeScript 4.2.4 caused it.

I managed to get 7.4.8 to compile with npm i @types/hammerjs -D and also installing xss - but as I said, since my project does not need either of these, it should not be my responsibility to include them

@zaquas77
Copy link
Author

zaquas77 commented Jun 8, 2021

I managed to get 7.4.8 to compile with npm i @types/hammerjs -D and also installing xss - but as I said, since my project does not need either of these, it should not be my responsibility to include them

I have the same yours idea... Do you know the responsible for this kind of stuff? Because I can ask for some clarification to my issue with "hammer click" events.
Thanks in advance

@mojoaxel mojoaxel added the bug Something isn't working label Jul 7, 2021
@kenwdelong
Copy link

I think it's working now for me. Check my latest comment on #1022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants