Skip to content

Template Question #181

@sa-mm

Description

@sa-mm

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:

$.jmpress('template', 'right', {
  children: function(i, child, children) {
    return {x: i * 2000};
  }
});

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions