Explore the community Forums Lectora Lectora Suggestions Cloning/duplicate action

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #307184 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    For the ‘Journal’ sample I needed dynamic elements.  For example.. the list of avatars on the right … no fixed order, no fixed number, so I needed to build that dynamically depending on users choices.
    In javascript I now fixed that by using ‘clone/cloneNode’ to duplicate the needed elements.
    In the ancient past in Actionscript you could use duplicateMovieclip to copy a MC and all of its contents.
    With clone I can do the same in JS, but I do need to get all elements separately and construct it the way I want.

    Would it not be nice if I could define a ‘group’ inside Lectora and have a Action ‘duplicateGroup’ ?

    Further there is a small bug in Lectora when using this like described above. An image in Lectora with a name with a capital in it… myImage.png will be renamed when published and zipped to myimage.png
    Breaking the dynamic setup because when you call myImage.png in your code..it wont find it. No biggie, but good to know…

    #307209 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    As you mentioned you can do this with clone(). I am curious as to what you would use something like this for in a lesson. Wouldn’t it be easier to have all necessary copies made and initially hidden? Why would you want to add something to the DOM at runtime?

    #307282 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    To do something like this:

    https://community.trivantis.com/shared-content/online-journal-proof-of-concept-v2/

    Diving in this technique more now.. imaging multi-user applications and games… 😉

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.