Closed ljcsilvert closed 10 months ago
Hi! I'm sorry, animations are not yet supported. I'll take a look!
Huh, that's complicated...
There is <p:bldLst>
and <p:timing>
that needs to get in sync with removeElement
... The latter is nested deeply and I have no idea how this will look when there are lots of animations on a slide.
What about slide.hideElement
? This function does not exist yet, but I could imagine there is only hidden
that needs to be update:
<p:sp>
<p:nvSpPr>
<p:cNvPr id="11" name="Drum" hidden="1">
<a:extLst>
///
What do yo think? This will be the same effect as ALT+F10
and toggle the eye-symbol right besides a shape.
I thought about that but I didn't saw the function in the documentation but yes it would work that would be great :) Do you think it would be possible to implement the function soon? :)
This should do the job:
pres.addSlide('animations', 1, (slide) => {
slide.modifyElement('Drum', (shape) => {
// You need to update the 'hidden' attribute with a callback:
shape.getElementsByTagName('p:cNvPr').item(0).setAttribute('hidden', '1');
// XmlHelper.dump(shape);
});
});
Feel free to create a helper & PR from this! :smile:
It works really well thank you a lot you're the best 😀 I'll try to do a PR :)
I'm happy to help :smile:
Hello,
I've noticed that whenever I want to remove an element that has an animation on it, Powerpoint makes me repair the pptx and remove all of the animations in the slide. Do I do something wrong here? Is there already a workaround for this issue? Otherwise, would it be possible to reorganize the animations while removing the element?
I have this issue with this code for example:
My temporary solution would be to have a slightly different template for each time I have to remove an element, but it's not handy nor maintainable.