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

Exclude Visual Element From Direct Access #8

Closed
danny opened this issue Jan 2, 2012 · 5 comments
Closed

Exclude Visual Element From Direct Access #8

danny opened this issue Jan 2, 2012 · 5 comments

Comments

@danny
Copy link

danny commented Jan 2, 2012

So I really like this tool, but I thought it'd be cool to be able to position elements on the canvas but not have them as slides - i.e. you only view them when zooming/moving etc. I implemented this functionality by including a new attribute: data-exclude="true" (defaults to false if not present so it doesn't break existing code).

<div id="its" class="step" **data-exclude="true"** data-x="850" data-y="0" data-rotate="90" data-scale="5">

And I filter the steps right before the select method is set, insert @ line 180:

var tempSteps = [];
for (var i = 0; i < steps.length; i++)
{
  if(!steps[i].dataset['exclude'] && true)
    tempSteps.push(steps[i]);
}    
steps = tempSteps; 

//make given step active

I didn't want to issue a pull request since this is a new feature, and I'm not sure what the design/style of this js file will be, I can issue one if you'd like.

@bartaz
Copy link
Member

bartaz commented Jan 2, 2012

I also see a need for such a feature.

It's not implemented yet as I am wavering between having it as a additional class or (as in your solution) as yet another data attribute.

It is also connected to another the feature I need - having a possibility of displaying steps in a different order that in markup (and being get to a single step more that one time - without going back and forward).

So basically yes, the excluding will be included at some point, I'm just not sure yet how it should be done.

@hhill
Copy link

hhill commented Mar 2, 2013

I see this is still open... is it still in the works?

@SiegeWizard
Copy link

Didn't see this before my comment in the API issue. There you have what I think is the easiest way to implement the "having a possibility of displaying steps in a different order that in markup (and being get to a single step more that one time - without going back and forward)"

About the feature requested here, I would say that the right way to do this was not to use the step class as it is not an step, but using a "background" class for example, that would be loaded into the presentation before the steps so that they are always in the background (I'm not sure if this background would be a problem when having a step deep in the z-axis, maybe a style should be applied so that they are always behind the steps.

The last reason why I would do this with another class is because this will make the selector easier.

@henrikingo
Copy link
Member

Hi @danny

As you may have noticed, I've been working on adding a new plugin api to impress.js, and then on adding new features as plugins. It now has a skip plugin which can be used to add steps to a presentation, which will nevertheless be skipped when navigating through the presentation.

@henrikingo
Copy link
Member

skip plugin is now merged to impress.js master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants