impress / impress.js

It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.
http://impress.js.org
MIT License
37.62k stars 6.67k forks source link

Disable mouse navigation? #865

Closed b1ek closed 10 months ago

b1ek commented 10 months ago

I noticed that when I click on a .step element, the presentation jumps right to it. Is there any way to disable this?

I dont want to do .step { pointer-events: none } since my steps contain clickable elements

janishutz commented 10 months ago

I will have to look into this in more details, as I don't remember. If this isn't a thing yet, I will be adding this in the refactor for V3 I am currently planning. Couldn't you just do a

.whateversubclass { pointer-events: auto }

on all the ones where you actually need the events and do

.step { pointer-events: none }?

I hope this helps for now, I will have a look at the impress.js code base on this matter as I don't remember how exactly those events are handled.

b1ek commented 10 months ago

I will have to look into this in more details, as I don't remember. If this isn't a thing yet, I will be adding this in the refactor for V3 I am currently planning. Couldn't you just do a

.whateversubclass { pointer-events: auto }

on all the ones where you actually need the events and do

.step { pointer-events: none }?

I hope this helps for now, I will have a look at the impress.js code base on this matter as I don't remember how exactly those events are handled.

I have figured out a little workaround:

.step { pointer-events: none }
.step.active { pointer-events: all }

But that is just that, a workaround. Im pretty sure that it would make sense to be able to click on another step (which is not the active one)

janishutz commented 10 months ago

I have added this to the todo list for V3.

henrikingo commented 10 months ago

But that is just that, a workaround.

This is not a workaround, this is how impress is designed to work. You use CSS to make it behave how you want.

henrikingo commented 10 months ago

I will close this to keep the issues list tidy, but feel free to continue commenting or asking questions.