dseif / slide-drive

Slideshow using audio/video to drive content
45 stars 9 forks source link

Allow SVG Sub-Slides To Be Specified From Butter #43

Open banksJeremy opened 12 years ago

banksJeremy commented 12 years ago

Sub-slides are supported in both HTML and SVG slides, but there's no way to specify them from Butter. Add some way to do so for SVGs.

It probably makes sense to add this to Slide Drive's custom Butter editor.

Adding a new sub-slide means adding a new TrackEvent, which is a little weird. We'll need to think about how we want the relationship between parent- and sub-slides to work.

banksJeremy commented 12 years ago

We currently parse sub-slides into distinct events occurring after the master slide. This is fine when the events are used internally, but we might not want to directly expose this to the user in an editable format.

What should we do when part of a slide is marked as a sub-slide in Butter?

  1. Add a new track event for it...

    1. ...on the same track.

      Do we just insert it after the master slide? Do we split the master slide event into two slides? What happens if the user tries to move the sub-slide to the end of the presentation, far away from the master slide? (This might allow elements to appear in the presentation in a different order than they appear in the DOM, by reusing the master slide.)

    2. ...on a different track.

      Use on track for sub-slides, one track for master slides. Require (how?) that sub-slides occur only within the same time frame as their master slides. They could be dragged around relative to each other, within their constraints.

      How would this work for nested sub-slides? Add another track for each level?

  2. Don't add a new event, just add properties to the master slide indicating the time offset for the sub-slide. Display these to the user in the editor panel for the master slide.

    This might be the easiest for us, and it's most equivalent to the way things work in slideshow software.

I had been leaning towards (1) until I actually wrote this out. (2) now seems like a much better choice.

banksJeremy commented 12 years ago

Even if the sub-slides don't get a distinct event on the timeline, they'll require distinct events internally to trigger their hiding and showing.


The parent event's options will require a new key. Perhaps:

"subslides": [
  { "target": "s-193851635",
    "start": 1 },
  { "target": "s-193851635",
    "start": 3 },
]

SlideButterOptions will need to also hold pointers to these internal events in order to change their times.