allow positioning relative to previous step #131

Closed
wants to merge 1 commit into
from

Projects

None yet

9 participants

This makes it easier to start at origin of canvas and move at each step relative to the previous step. Use data-x="+=1000" instead of absolute value, for example.

niuage commented Mar 30, 2012

I can see that being really helpful.
I'm wondering if it wouldn't be even easier if you could set some data attribute to say it's inheriting every attributes from the previous slide, and then only increment/decrement the values you want to change? Just a thought.

Owner
bartaz commented Mar 31, 2012

That's a very interesting addition.

I'm not going to merge it right now, but will think about including it in future releases.

nchauvat commented Apr 1, 2012

@niuage what you ask for is the way it works already (unless I misunderstood your suggestion).

With this patch:

step data-x="1000" data-y="1000" -> (x=1000, y=1000)
step data-x="+=1000" -> (x=2000, y=1000)

niuage commented Apr 1, 2012

Ok cool, I'm the one who misunderstood then ;)

Owner
bartaz commented Apr 1, 2012

@niuage your suggestion is totally valid, it doesn't work this way right now. What you want to get is possible with @nchauvat feature by using "+=0" on the values you don't want to change from previous step.

nchauvat commented Apr 2, 2012

@bartaz there is no need for "+=0" see line 288: prev_step = step.

juristr commented Jul 6, 2012

Just wanted to submit exactly the same request. I just started to use impressjs today and being able to position the next step relative to the previous one is a must-have. Especially when you have to move some steps, then you have to adjust all of them whereas with this feature they would move all "automatically".

Are there already some news on when this will be merged into the main impressjs lib?

githof commented Nov 18, 2012

A big +1 for this one.
Think of a stand-alone part in your presentation. If your want to move it from one position to another, or to another presentation, you're bound to manually translate all the coordinates.
Anyway, even if you have drawn you whole presentation map on a large sheet of paper with computer off, once before the screen you'll have some minor changes in the way you position the elements, that always yield annoying manual translating in data-xyz, making you unwilling to make any fine tuning.
@bartaz, I can't believe you don't use some trick to make it, don't you?

m42e commented Dec 3, 2012

The current implementation doesn't respect the scale factor for the placement. Both, the last and the current scale factor should be used calculating the next position, or everything gets weird.

Another big +1 for this. Real pain with larger presentations.

jejb commented Mar 4, 2014

Turns out I needed this feature as well. This is my implementation:

http://git.kernel.org/cgit/linux/kernel/git/jejb/impress.js.git/commit/?id=46f041b7340cba58356e7782bf3d7377ae278530

It uses a data-relative tag which is either relative to the last slide or to a named previous slide

Member
FagnerMartinsBrack commented Feb 4, 2016 edited

Hi @nchauvat, in an effort to clear up older issues/PRs we are pinging back to know if you are still tracking this request.

To give a little bit of context, recently a decision was made in the project to make the development more active and the first task is to clear up older issues like this one to see if the OP is still interested in keep it going.

The lack of response from the original maintainer made me look at other projects. I do not have time for impress.js nowadays. Please feel free to take over this PR or reject it. I think the feature is needed and the implementation was simple, someone else will surely take care of it.

Member
FagnerMartinsBrack commented Mar 5, 2016 edited

I do not have time for impress.js nowadays.

Closing due to the lack of feedback from the OP. If you want to work in the PR again, feel free to comment here to open up the discussion again.

In the meantime we will try to follow other requests such as #485 and #425. Thanks for the PR!

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