Picture of John Niezen
Narrative static graphs
by John Niezen - Friday, 11 September 2015, 10:12 AM
 

Hi,

Does anybody know if you can keep the graphics in the narrative component static? What I mean is that they do not fly in.

I would like to use it as a kind of build up for similar kind of pictures but want to keep the component rather clean and not too busy.

John

Picture of Oliver Foster
Re: Narrative static graphs
by Oliver Foster - Thursday, 24 September 2015, 10:08 AM
 

As discussed on gitter, give it a shot and let us know how you get on:

https://github.com/adaptlearning/adapt-contrib-narrative/blob/master/js/adapt-contrib-narrative.js#L165-L178 < this is where the current implementation is done for the sliding, need to setup a new attribute in the component, like this.model.get("_isStacked") == true / false, bury the current code in an if statement if _isStacked == false and write some new animation code in the other half of the if statement
https://github.com/adaptlearning/adapt-contrib-narrative/blob/master/js/adapt-contrib-narrative.js#L165-L178 < this is where the images sizes are currently calculated, and their container's width is set to be (numberofimages X imagewidth) you'll need it to be (1 X imagewidth)
https://github.com/adaptlearning/adapt-contrib-narrative/blob/master/less/narrative.less#L128-L134 < this is where the graphics are lined up to the right, so that'll need changing so they stack ontop of each other

Picture of sander van zijl
Re: Narrative static graphs
by sander van zijl - Friday, 25 September 2015, 7:32 AM
 

I think finding the code is not the problem.

knowing what it is doing and how to change this, is ;-)