Kaydet (Commit) 75358177 authored tarafından Marco Cecchetti's avatar Marco Cecchetti Kaydeden (comit) Marco Cecchetti

svg export: fall back to crossfade for not supported transitions

If we do not support the requested transition type we fall back to
crossfade transition.
If we do not provide an alternative transition and we set the state of
the animation node to 'invalid' the animation engine stops itself.

Change-Id: Ie476dd579248e9d776e27797dca2ea867f3e5e54
Reviewed-on: https://gerrit.libreoffice.org/21490Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarco Cecchetti <mrcekets@gmail.com>
üst 5dbd8085
......@@ -7024,6 +7024,7 @@ AnimationTransitionFilterNode.prototype.createActivity = function()
AnimationTransitionFilterNode.prototype.parseElement = function()
{
var bRet = AnimationTransitionFilterNode.superclass.parseElement.call( this );
var bIsValidTransition = true;
var aAnimElem = this.aElement;
......@@ -7036,7 +7037,7 @@ AnimationTransitionFilterNode.prototype.parseElement = function()
}
else
{
this.eCurrentState = INVALID_NODE;
bIsValidTransition = false;
log( 'AnimationTransitionFilterNode.parseElement: transition type not valid: ' + sTypeAttr );
}
......@@ -7051,10 +7052,20 @@ AnimationTransitionFilterNode.prototype.parseElement = function()
}
else
{
this.eCurrentState = INVALID_NODE;
bIsValidTransition = false;
log( 'AnimationTransitionFilterNode.parseElement: transition subtype not valid: ' + sSubTypeAttr );
}
// if we do not support the requested transition type we fall back to crossfade transition;
// note: if we do not provide an alternative transition and we set the state of the animation node to 'invalid'
// the animation engine stops itself;
if( !bIsValidTransition )
{
this.eTransitionType = FADE_TRANSITION;
this.eTransitionSubType = CROSSFADE_TRANS_SUBTYPE;
log( 'AnimationTransitionFilterNode.parseElement: in place of the invalid transition a crossfade transition is used' );
}
// direction attribute
this.bReverseDirection = false;
var sDirectionAttr = aAnimElem.getAttributeNS( NSS['smil'], 'direction' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment