You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to create two templates. The first positions the step along the x axis relative to the previous step that used this template. It would be similar to this:
However, I think this needs to be applied to the parent element, and I'm not sure if that works for my purposes, given what I need for the second template.
The second template would position the step below the previous but at the same point along the x axis. So, something like this (maybe?):
$.jmpress('template', 'down', {
children: function(i, child, children) {
return {x: i, y: i * 2000};
}
});
So, I want to be able to control the positioning of the steps by citing the template. Suppose each "right" stands for a div with data-template="right":
right right right right right right
down down
down down
down
Does that make sense? Is it possible? I know the templates I've given won't do it, but I was hoping this would help give you an idea of what I'm after.
The text was updated successfully, but these errors were encountered:
<divid="jmpress" data-template="auto"><divclass="step" data-template="top"><p>This is a first level step. Each new top level step is placed 2000 to the right.</p><divclass="step"><p>This is a second level step. Each new second level step is placed 2000 below the first level step it is nested in because it is a child of "top."</p></div></div><divclass="step" data-template="top"><p>Another first level step.</p><divclass="step"><p>Another second level step.</p></div></div></div>
I'm not sure if this is the most useful way to achieve this. I'd be happy to hear from more experienced people.
Also, I can create a another step, nested inside the downward moving "second level" step, with the following inline attributes:
<divclass="step" data-x="-500"><p> This step will be placed 500 to the left of the second level step it's nested in. That is, the "data-x" inline attribute of the child of the child of class "top" is handled as if it were relative as opposed to the absolute positioning I had expected.</p></div>
It wasn't obvious to me that this sort of relative positioning would be possible. I guess when using the inline attributes, the templates are not completely ignored. jmpress splits the difference. (Maybe?)
I wanted mimic reveal.js' automatic positioning, and this allows me to do it with the added bonus that I can occasionally place a slide relative to its parent. That's nice.
I would like to create two templates. The first positions the step along the x axis relative to the previous step that used this template. It would be similar to this:
However, I think this needs to be applied to the parent element, and I'm not sure if that works for my purposes, given what I need for the second template.
The second template would position the step below the previous but at the same point along the x axis. So, something like this (maybe?):
So, I want to be able to control the positioning of the steps by citing the template. Suppose each "right" stands for a div with data-template="right":
Does that make sense? Is it possible? I know the templates I've given won't do it, but I was hoping this would help give you an idea of what I'm after.
The text was updated successfully, but these errors were encountered: