thomas
07-28-2004, 08:39 AM
Hi.
I'm having a problem in animating translation of a rect element. What I wan't to do is to move the rect (that only has stroke color) over currently selected rect element, that is I've got three rect elements and I want to move the fourth rect always over the one that has the mouseover - event called.
So what I would like to accomplish is to move the stroked rectangle to defined global position from it's current position (whatever that is). I've tried the animation with additive='replace' and additive='sum' with fill='freeze' but neither of them works.
I'm using SVG-T (tiny) profile so script usage is out of the question as well. Is there any way to make the element to remember its position and go from the previous position to a new position that is defined in global coordinates when event is raised?
As a reference, here's the code I've recently tried:
<path id="path1" d="m0 0 L29 5.5 " fill="none" stroke="none" />
<path id="path2" d="m0 0 L59 5.5 " fill="none" stroke="none" />
<path id="path3" d="m0 0 L118 5.5 " fill="none" stroke="none" />
<!-- Current slide indicator -->
<g id="currentSlideCs" transform="translate(29,5.5)">
<animateMotion dur="4s" begin="indicator2.mouseover" fill="freeze" additive="sum">
<mpath xlink:href="#path2" />
</animateMotion>
<animateMotion dur="4s" begin="indicator3.mouseover" fill="freeze" additive="sum">
<mpath xlink:href="#path3" />
</animateMotion>
<rect x="-19" y="-2.5" width="38" height="5" fill="none" stroke="blue" />
</g>
Thank You in advance,
thomas
I'm having a problem in animating translation of a rect element. What I wan't to do is to move the rect (that only has stroke color) over currently selected rect element, that is I've got three rect elements and I want to move the fourth rect always over the one that has the mouseover - event called.
So what I would like to accomplish is to move the stroked rectangle to defined global position from it's current position (whatever that is). I've tried the animation with additive='replace' and additive='sum' with fill='freeze' but neither of them works.
I'm using SVG-T (tiny) profile so script usage is out of the question as well. Is there any way to make the element to remember its position and go from the previous position to a new position that is defined in global coordinates when event is raised?
As a reference, here's the code I've recently tried:
<path id="path1" d="m0 0 L29 5.5 " fill="none" stroke="none" />
<path id="path2" d="m0 0 L59 5.5 " fill="none" stroke="none" />
<path id="path3" d="m0 0 L118 5.5 " fill="none" stroke="none" />
<!-- Current slide indicator -->
<g id="currentSlideCs" transform="translate(29,5.5)">
<animateMotion dur="4s" begin="indicator2.mouseover" fill="freeze" additive="sum">
<mpath xlink:href="#path2" />
</animateMotion>
<animateMotion dur="4s" begin="indicator3.mouseover" fill="freeze" additive="sum">
<mpath xlink:href="#path3" />
</animateMotion>
<rect x="-19" y="-2.5" width="38" height="5" fill="none" stroke="blue" />
</g>
Thank You in advance,
thomas